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

Client certs also specify Server usage #273

Open
travisgroth opened this issue Jun 29, 2020 · 3 comments · May be fixed by #274
Open

Client certs also specify Server usage #273

travisgroth opened this issue Jun 29, 2020 · 3 comments · May be fixed by #274

Comments

@travisgroth
Copy link

Using the -client flag results in a certificate valid for both Client and Server usage. This can lead to some unexpected validation scenarios. I think they should be mutually exclusive in practice.

@travisgroth travisgroth linked a pull request Jun 29, 2020 that will close this issue
@FiloSottile
Copy link
Owner

mTLS certificates are often used for both the client and server sides. What's a use case where the extra serverAuth usage is a problem rather than just superfluous?

@travisgroth
Copy link
Author

If you're using mkcert for test certificates, you can unintentionally write code that is only validating the client certificate against Server usage, and looks correct until faced with real world client-only certs. This is the scenario I encountered.

I'm not sure I've directly seen any client certs also marked for server usage, but you are correct; that probably happens in mTLS services that aren't on the edge of a system. Maybe it's best to have additional control over both usages. The least surprising behavior would probably be:

  • if no usage flags passed, default to server
  • if usage flags are set, only set the ones present. eg, current behavior would require --client and --server

@moparisthebest
Copy link

moparisthebest commented Mar 24, 2022

The real issue is that server certs should set client usage too, to match LetsEncrypt (and most other CAs ?)

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.

3 participants