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

Concerns about using the common name "root" in our root client cert #9

Open
a-robinson opened this issue Mar 2, 2018 · 3 comments
Open

Comments

@a-robinson
Copy link
Contributor

As discussed at https://youtu.be/JMCCeAb9eY4?t=1h41s, using the common name "root" for the root client inside a Kubernetes cluster is a bad idea, because it could potentially give the certificate root access to the Kubernetes cluster itself (given that we're using the Kubernetes cluster's CA). We should try to scope this down using some other common name if possible.

@mberhault

@mberhault
Copy link
Contributor

Given the fact that root is a hard-coded user in cockroach, I'm not entirely sure this is feasible. We could create a less common username and add it to the newly-introduced admin role (eg: crdb-root) and grant a certificate for that, but there's still nothing preventing you from creating a certificate for root and leaking it.

@bdarnell
Copy link

bdarnell commented Mar 8, 2018

I think the point is that we should mark our user certificates in some way instead of just interpreting the common name on any cert from our CA as a username. (if this is an issue, it sounds like kubernetes may have made the same mistake).

@mberhault
Copy link
Contributor

We have to use the CN with exactly the user name, or we're not longer pg compatible. see: https://www.postgresql.org/docs/10/static/auth-methods.html#AUTH-CERT

If k8s does the same, and only requires a valid certificate chain and the client auth capability, then there's not much we can do in the certificate itself.

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

No branches or pull requests

3 participants