-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cosigned] Add signature pull secrets #1805
Conversation
Signed-off-by: Denny Hoang <[email protected]>
Signed-off-by: Denny Hoang <[email protected]>
Signed-off-by: Denny Hoang <[email protected]>
Signed-off-by: Denny Hoang <[email protected]>
Signed-off-by: Denny Hoang <[email protected]>
Signed-off-by: Denny Hoang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1805 +/- ##
==========================================
+ Coverage 32.73% 32.85% +0.11%
==========================================
Files 147 147
Lines 9313 9346 +33
==========================================
+ Hits 3049 3071 +22
- Misses 5907 5919 +12
+ Partials 357 356 -1
Continue to review full report at Codecov.
|
Signed-off-by: Denny Hoang <[email protected]>
Signed-off-by: Denny Hoang <[email protected]>
@DennyHoang this is ready for review? |
Signed-off-by: Denny Hoang <[email protected]>
Signed-off-by: Denny Hoang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, we can fix the comment in a followup. Thanks for doing this!
Thinking about how we want to add e2e tests for this. Thinking that we can create a local image in the registry we spin up, but then maybe push the signatures / attestations to another registry and use a different secret for that then?
@@ -314,7 +314,7 @@ func validatePolicies(ctx context.Context, ref name.Reference, policies map[stri | |||
// signatures OR attestations if atttestations were specified. | |||
// Returns PolicyResult, or errors encountered if none of the authorities | |||
// passed. | |||
func ValidatePolicy(ctx context.Context, ref name.Reference, cip webhookcip.ClusterImagePolicy, remoteOpts ...ociremote.Option) (*PolicyResult, []error) { | |||
func ValidatePolicy(ctx context.Context, namespace string, ref name.Reference, cip webhookcip.ClusterImagePolicy, remoteOpts ...ociremote.Option) (*PolicyResult, []error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, we should document in the signature what namespace this is. It's the namespace where we allow the signature pull secrets to come from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Add signaturePullSecrets support Signed-off-by: Denny Hoang <[email protected]> * Abstract signaturePullSecrets remoteOpts Signed-off-by: Denny Hoang <[email protected]> * Add validation and signaturePullSecrets test cases Signed-off-by: Denny Hoang <[email protected]> * Test Authorities RemoteOpts count Signed-off-by: Denny Hoang <[email protected]> * Comment on not storing in Authority RemoteOpts Signed-off-by: Denny Hoang <[email protected]> * Fix lint issue Signed-off-by: Denny Hoang <[email protected]> * Add podSpec signaturePullSecrets test Signed-off-by: Denny Hoang <[email protected]> * Add valid signaturePullSecrets test Signed-off-by: Denny Hoang <[email protected]> * early return err; add signaturePullSecrets comment Signed-off-by: Denny Hoang <[email protected]> * codegen update Signed-off-by: Denny Hoang <[email protected]>
Summary
signaturePullSecrets
toClusterImagePolicy
's Authorities sources.Ticket Link
Resolves #1655
Release Note
Potential outstanding todo
cc: @coyote240 @hectorj2f @vaikas