Skip to content

Commit f05d510

Browse files
joelanfordci-robot
authored andcommitted
containers/image: remove signatures when copying in to OCI layout (#1664)
This does not affect signature validation, and we do not need to preserve signatures _after_ validation because we will never need to propagate those signatures to another image transport/destination. Signed-off-by: Joe Lanford <[email protected]> Upstream-repository: operator-registry Upstream-commit: eac150441577762280273f638af50eb84addd137
1 parent ab01b4f commit f05d510

File tree

2 files changed

+14
-0
lines changed
  • staging/operator-registry/pkg/image/containersimageregistry
  • vendor/github.com/operator-framework/operator-registry/pkg/image/containersimageregistry

2 files changed

+14
-0
lines changed

staging/operator-registry/pkg/image/containersimageregistry/registry.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ func (r *Registry) Pull(ctx context.Context, ref orimage.Reference) error {
161161
SourceCtx: sourceCtx,
162162
DestinationCtx: r.cache.getSystemContext(),
163163
OptimizeDestinationImageAlreadyExists: true,
164+
165+
// We use the OCI layout as a temporary storage and
166+
// pushing signatures for OCI images is not supported
167+
// so we remove the source signatures when copying.
168+
// Signature validation will still be performed
169+
// accordingly to a provided policy context.
170+
RemoveSignatures: true,
164171
}); err != nil {
165172
return err
166173
}

vendor/github.com/operator-framework/operator-registry/pkg/image/containersimageregistry/registry.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)