-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
use_csr_serial_number
option for PKI roles
#25708
Comments
Hi @devon-mar, I've been looking a bit at the PR and your use-case, I don't think the As of today, what controls the subject's serial number field in an issued certificate is either the
Edit: proposal was completely wrong, as I conflated the certificate serial number and the subject serial number, we are talking about the subject serial as devon-mar corrected me below. |
Thanks for taking a look. I'd like to clarify that this issue and PR is only for the serial number in the certificate's subject, not the serial number field. I don't think Vault ever generates a value for the subject serial number, only the serial number field. For example:
In the above example, I can only control the The
|
Hi @devon-mar, Yup that was a fail on my part, but the fundamental issue exists just my proposal is irrelevant, the You are correct as well that the docs are missing which is another issue... |
Would a And the implementation would look something like: if (role.SerialNumberSource == "" || role.SerialNumberSource == "json-csr") && ridSerialNumber == "" && csr != nil {
ridSerialNumber = csr.Subject.SerialNumber
} |
@stevendpclark do you have any feedback on the above proposal? |
@devon-mar sorry about not getting back to you on the above proposal. The proposal is good. One nit on the implementation would be that we test/switch on all the supported values just to document them in code explicitly along with a fall-through error if we somehow end up with a value in |
Sorry for the delay @stevendpclark. I've opened up PR #29369 with the changes described above. |
Is your feature request related to a problem? Please describe.
Some applications generate a CSR with a serial number in the certificate's subject (not the serial number field). Sometimes it's desirable to ignore this value.
The other values that can be taken from the CSR, namely SANs and
common_name
, have ause_csr_*
option to control whether or not they take their values from the CSR.serial_number
does not.Describe the solution you'd like
A
use_csr_serial_number
role parameter which controls whether or not the serial number in the CSR is used.Describe alternatives you've considered
Some applications do not have the ability to remove the serial number from the generated CSR.
/pki/sign-verbatim
is not an option since it is not possible to restrict the values of other certificate attributes.Explain any additional use-cases
Additional context
The text was updated successfully, but these errors were encountered: