Skip to content
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

Make public all types required to use ValidatePolicy #1727

Merged
merged 1 commit into from Apr 8, 2022

Conversation

jdolitsky
Copy link
Contributor

Unable to use ValidatePolicy without access to the Authority type (and subtypes)

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
@vaikas
Copy link
Contributor

vaikas commented Apr 8, 2022

Sweet! Now we can reuse the validation of policies. Need to just expose the Convert from External to Webhook.

@vaikas vaikas merged commit bb624ef into sigstore:main Apr 8, 2022
@github-actions github-actions bot added this to the v1.8.0 milestone Apr 8, 2022
@hectorj2f
Copy link
Contributor

@jdolitsky @vaikas Question: Why do we want to make an internal-only resource type available ? Why don't we use the external type v1alpha1 ?

@vaikas
Copy link
Contributor

vaikas commented Apr 9, 2022

Great question! The motivation for the CIP work was two fold:

  1. User facing way to configure policies (aka, the ClusterImagePolicy CRD)
  2. Expose a SDK for other tooling (for example Kyverno, or even cosign the CLI command, etc.).

For the second point, the ValidatePolicy method was exposed, but the argument takes the 'normalized' variant, that has everything that can be resolved into public keys so that the method doesn't need access to secrets, etc. So we needed to expose the struct that the method takes so that it can be reused, we also need to expose a method that takes a CIP CRD and converts to the normalized variant.
Does that make sense @hectorj2f

@hectorj2f
Copy link
Contributor

@vaikas Thanks for the comment. It makes sense.

mlieberman85 pushed a commit to mlieberman85/cosign that referenced this pull request May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants