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

Request: add subject CN for client certificates #257

Closed
antong opened this issue Apr 17, 2020 · 5 comments
Closed

Request: add subject CN for client certificates #257

antong opened this issue Apr 17, 2020 · 5 comments

Comments

@antong
Copy link

antong commented Apr 17, 2020

For server authentication, SAN DNS is what is required. However, many TLS servers that perform client authentication (mutual TLS) use the subject CN in the client certificate as the identity. An example is Mosquitto (see https://mosquitto.org/man/mosquitto-conf-5.html and use_identity_as_username).

I read the discussion in #205. However, I would argue that the situation is different for client certificates. There are common servers and configurations that do not work without the CN in client certificates. Also, TLS clients do not necessarily correspond to DNS names in the way TLS servers do, but may be apps or people (for a person the email address is already supported).

antong added a commit to antong/mkcert that referenced this issue Apr 17, 2020
Many TLS servers and configurations perform client authentication
using the subject CN in the client certificate. This change
adds a subject CN to client certificates.

Fixes FiloSottile#257.
@petr-motejlek
Copy link

Hi.

This is a must for me. As it is now, I can't seem to be able to generate a client cert that would actually be usable with PgSQL, as PgSQL uses CN to identify users. mkcert certs don't have a CN...

@FiloSottile
Copy link
Owner

I understand that this is a real need, but I think part of mkcert's role in the ecosystem is to encourage movement towards modern usage. Applications should use DNS, IP, URL, or email SANs on client certificates as well, rather than rely on completely unstructured CNs.

It's very easy to fork mkcert for custom needs, and we'll make it even easier to build derived tools by making the root installation into a library, but the core tool will keep encouraging best practices.

@antong
Copy link
Author

antong commented Oct 26, 2020

I understand and agree. Thank you!

@petr-motejlek
Copy link

Tell that to our company who's OK with using a 20-year-old procedure :D

@m2acgi
Copy link

m2acgi commented Nov 16, 2023

https://github.com/txthinking/mad can custom the cert O OU and CN

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

Successfully merging a pull request may close this issue.

4 participants