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

Extract more certificate-extensions for validation #1456

Closed
ckotzbauer opened this issue Feb 15, 2022 · 5 comments · Fixed by #1515
Closed

Extract more certificate-extensions for validation #1456

ckotzbauer opened this issue Feb 15, 2022 · 5 comments · Fixed by #1515
Labels
enhancement New feature or request

Comments

@ckotzbauer
Copy link
Contributor

Description
Prerequisite for kyverno/kyverno#3216

In the signature package there are functions to extract the issuer (CertIssuerExtension) and subject (CertSubject) from a generated certificate. In sigstore/fulcio#306 I implemented several extensions (https://github.com/sigstore/fulcio/blob/main/docs/oid-info.md) extracted from GitHub OIDC claims.

I suggest to add the ability to read those extensions too with additional functions (or a generic function which receives the name as parameter) to make it possible for kyverno to validate this values too with a policy.

I would be happy to make a PR for that if desired. 😉

@ckotzbauer ckotzbauer added the enhancement New feature or request label Feb 15, 2022
@JimBugwadia
Copy link
Contributor

JimBugwadia commented Feb 21, 2022

Hi @ckotzbauer - this will be great to have!

I like the idea of having a generic function, to allow for future custom claims. Is there an available map of names to extension IDs, or would this need to be defined? Instead of the clients asking for each claim, may be best to return the entire list with names, so it can be used to display in the cosign verify output and in policy checks.

@ckotzbauer
Copy link
Contributor Author

I don't think that there's a mapping for names to extension-IDs yet, but I'm not sure.
I think working with lists here would be great, this would be a generic approach and could be used in other places.

@dlorenc
Copy link
Member

dlorenc commented Feb 24, 2022

This sounds good to me! @nsmith5 had a proposal to add more things to the certs as well.

@JimBugwadia
Copy link
Contributor

Hi @ckotzbauer - are you planning a PR for this? If not, I can take a look at proposing the changes.

@ckotzbauer
Copy link
Contributor Author

I can take a look at the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants