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

cli: Use unique subjects in cockroach cert create-ca #121285

Open
bdarnell opened this issue Mar 28, 2024 · 0 comments
Open

cli: Use unique subjects in cockroach cert create-ca #121285

bdarnell opened this issue Mar 28, 2024 · 0 comments
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@bdarnell
Copy link
Contributor

bdarnell commented Mar 28, 2024

Is your feature request related to a problem? Please describe.

cockroach cert create-ca uses a hard-coded subject of O=Cockroach,CN=Cockroach CA for all CA certificates. If the ca.crt file contains the wrong CA certificate but the subject is correct, the Go crypto libraries produce a cryptic error message crypto/rsa: verification error. If the subjects didn't match, we'd get a (slightly) better error message of x509: certificate signed by unknown authority.

Describe the solution you'd like

All CA certificates generated by cockroach cert commands should have unique subjects, probably by adding a UID field to the subject containing a UUID.

Describe alternatives you've considered
It would also be nice to allow and encourage people to set their own subject instead of just using O=Cockroach,CN=Cockroach CA,UID=234543... all the time.

Jira issue: CRDB-37173

@bdarnell bdarnell added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

1 participant