-
Notifications
You must be signed in to change notification settings - Fork 565
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 validate against remote sig src #1754
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1754 +/- ##
==========================================
+ Coverage 30.55% 30.63% +0.08%
==========================================
Files 143 143
Lines 8651 8661 +10
==========================================
+ Hits 2643 2653 +10
Misses 5709 5709
Partials 299 299
Continue to review full report at Codecov.
|
pkg/apis/cosigned/v1alpha1/clusterimagepolicy_validation_test.go
Outdated
Show resolved
Hide resolved
@@ -44,6 +47,9 @@ type Authority struct { | |||
Sources []v1alpha1.Source `json:"source,omitempty"` | |||
// +optional | |||
CTLog *v1alpha1.TLog `json:"ctlog,omitempty"` | |||
// RemoteOpts are not marshalled because they are an unsupported type | |||
// +optional | |||
RemoteOpts []remote.Option `json:"-"` |
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.
If we can't marshal it, how is it going to be used? I know this is draft, but just noticed this and just curious how we envision the flow from Reconciler->CIP-Resolved->Webhook to behave.
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.
We keep the sources as a string in authority.source[].oci
RemoteOpts are populated during the unmarshal that occurs when store.go
creates the clusterImagePolicy object from the configmap. We use an overridden func (a *Authority) UnmarshalJSON(data []byte) error
to then populate the RemoteOpts at that time.
So summary
- Reconciler->CIP-resolved->webhook->configmap will store source[].oci as string
- configmap->webhook in store.go is where we do the pre-processing for remoteOpts where the string gets converted during unmarshal
9921d4b
to
bb6f3fa
Compare
d6021d6
to
c443e6b
Compare
e830229
to
3573cc0
Compare
Add github workflow steps for remote signatures Signed-off-by: Denny Hoang <dhoang@vmware.com>
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.
Awesomesauce! Thanks for doing!
Add github workflow steps for remote signatures Signed-off-by: Denny Hoang <dhoang@vmware.com>
Signed-off-by: Denny Hoang dhoang@vmware.com
Summary
Ticket Link
Fixes #1651
Release Note
cc: @coyote240 @hectorj2f @vaikas