-
Notifications
You must be signed in to change notification settings - Fork 73
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
Populate Subject Fields in Certificate #244
Comments
Based on the conversation in the bi-weekly meeting we identified that when the istio-csr starts it requests a certificate for itself: https://github.com/cert-manager/istio-csr/blob/main/pkg/tls/tls.go#L294-L314 It does this using the same flow that Istio CSRs use, by generating a CSR PEM and then calling the The issue is that the The ideal solution would be instead generate the CSR PEM using alternative libraries (potentially the same one cert-manager uses), that allow us to specify the CommonName, then add a flag to allow users to configure the CommonName. We must be careful not to change other behaviours and attributes of the CSR to ensure other users are not impacted. It would also be worth validating that Istio itself produces CSRs with a common name, or you will hit this issue all over again later. |
Just to add that this issue exists for the Google CAS Issuer too, where Google use zlint package to enforce that the subject is not empty https://cloud.google.com/certificate-authority-service/docs/rfc-compliance (see 4.1.2.6). This makes it impossible to use it with Google CAS. Another option we looked at was Venafi but that appears to have the same issue too #184 We were looking at if we could modify the CSR using a Kyverno policy but it's pretty difficult to do that so we would probably need to develop a custom mutating webhook as @JoshuaFurman suggested but we too would like to avoid that and feel it's pretty hacky. |
It doesn't seem to be possible to even create a webhook because the private key is created in the code. It may be possible to workaround this by setting |
The Makefile setup is not great for reading and needs documentation, in general
For local dev there is also the make target
|
I've connected cert-manager to a remote instance of Vault, where Vault is acting as my certificate issuer. However, I have some restraints generating certificates from this CA. Specifically i need to set a number of subject fields:
There does not seem to be a way to set these for the certificates that istio-csr is attempting to create. My istio-csr deployment is failing because it cannot issue the initial certificate because Vault will not issue certificates with wildcard values for those subject fields above.
Is there anyway for me to set these values? there does not seem to be in the istio-csr helm chart...
If there is not way to do this I suppose I will have to write a custom mutating webhook to handle this but would like to avoid doing so.
Thanks.
The text was updated successfully, but these errors were encountered: