adds option to specify CRL Distribution Point. #2612#2625
adds option to specify CRL Distribution Point. #2612#2625jetstack-bot merged 2 commits intocert-manager:masterfrom skra-space:crl
Conversation
|
Hi @srbraun. Thanks for your PR. I'm waiting for a jetstack or cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: srBraun <dev@skra.space>
|
/ok-to-test |
|
/retest |
|
|
||
| type SelfSignedIssuer struct{} | ||
| type SelfSignedIssuer struct { | ||
| CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"` |
There was a problem hiding this comment.
Please add a comment on this field explaining:
- What it does
- What values are valid
- What the default behaviour is if not specified
You should also have a // +optional line (similar to some other fields in this file) as the field is optional 😄
There was a problem hiding this comment.
This text is displayed to users through both our docs and kubectl explain so it really helps to provide clearly information about fields and how they should be used 😄
There was a problem hiding this comment.
Ah, we can also include // +kubebuilder:validation:UniqueItems here too to avoid users specifying duplicates.. not sure if it's strictly required, but it's easier to relax validation in future than it is to enforce additional validation 😄
|
This is looking good. Are there any restrictions/requirements around the format for these strings? Do they have to be URLs? If so, we should add validation to check that invalid values are not entered 😄 |
|
Also: would it be possible to extend this PR to support the 'CA' issuer type in a similar way? The implementation of these two issuers are very similar, so it shouldn't require too much extra code to do it 😄 |
Yes, I will add support for CDP to 'CA' issuer. I am currently working on it. I just wanted to show you what I have first. I will work through your comments and prepare a full PR. Thank you for the review. |
Signed-off-by: Sergey Braun <dev@skra.space>
munnerz
left a comment
There was a problem hiding this comment.
Only one more comment... it'd also be good if we could also add a // +kubebuilder:validation:Pattern here to restrict the types of values users can specify. I'm not 100% certain on what a good regex for this would be, as I imagine we'd have to support a variety of different URL formats (e.g. here you can see URLs starting with ldap:/// and containing commas: https://www.sysadmins.lv/blog-en/designing-crl-distribution-points-and-authority-information-access-locations.aspx).
|
|
||
| type SelfSignedIssuer struct{} | ||
| type SelfSignedIssuer struct { | ||
| CRLDistributionPoints []string `json:"crlDistributionPoints,omitempty"` |
There was a problem hiding this comment.
Ah, we can also include // +kubebuilder:validation:UniqueItems here too to avoid users specifying duplicates.. not sure if it's strictly required, but it's easier to relax validation in future than it is to enforce additional validation 😄
I am not sure how to validate it. According to RFC 5280, CDP name can be directory name or path relative to CRL issuer. In x509 go lib, CDP is an array of strings. |
|
This all looks good, we can look into tightening validation after this merges as I think it may require us to bump our controller-tools dependency 😄 Would you be able to open a PR against the docs repo to note this new option, in both the https://github.com/cert-manager/website/blob/release-next/content/en/docs/configuration/selfsigned.md && https://github.com/cert-manager/website/blob/release-next/content/en/docs/configuration/ca.md /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: munnerz, srbraun The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
|
/retest |
|
@srbraun Is there any possibility that you could add the feature to Vault, as you mentioned a few years ago? Thank you in advance! |
|
Hi! Thank you for reaching out to me. Unfortunately, I am not working on it anymore. I was planning to implement it for my employer but plans have changed there. I hope you'll find a solution. Good luck! |
What this PR does / why we need it:
WIP adds option to specify CRL Distribution Point. Proposal
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #2612Special notes for your reviewer:
Here is only changes for API and self-signed. I also have plan for Vault but didn't implement it.
Release note: