-
Notifications
You must be signed in to change notification settings - Fork 163
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
proposal: amend extended key usage of CPPKI Root and CA certificates #4664
Comments
IIUC, most of the TLS implementations mandate that the How does this work with the RFC?
If this is a common practice in most of the TLS implementations, do they provide some justification for this? |
I think you are right. Roots do not have these extend key usages, I will need to dig in more. Current problem that I'm facing is that Go stdlib does not find a valid verification path if we use our CPPKI as a regular WebPKI root certificate |
Please let us know if we should update the PKI IETF draft. Right now we might still be in time |
I think the key part is in:
If I understand correctly, because we have the extended key usage cppki-root-key, we cannot use the certificate for regular client/server auth, unless we specify anyExtendedKeyUsage too. I am currently debating what is better:
I would need to double check how the Go std library deals with this. |
Based on a small test: https://gist.github.com/oncilla/7584759ca580ad644d3fd876677592e1
I would say the best option is to also include the ExtKeyUsageAny alongside the existing key usages. The good thing is that this does not really deviate from the existing spec. If we change the spec to recommend including this extended key usage, all previous TRCs are still spec compliant. |
TL;DR: I think it would be good to change https://docs.scion.org/en/latest/cryptography/certificates.html#extension-constraints to state:
|
Would this also apply to the PKI draft? Right now we describe this in |
Thank you @oncilla for checking this, it is now more clear how the verification process works and I may be able to understand the RFC a bit better. I do have some questions/doubts on this (aligned with your internal debate between 1 and 2).
So, conceptually, in my non-expert opinion, I would argue in favor of dropping those EKUs, if we can (i.e., your option 1.). Of course, I understand that from a practical point of view, adding the "anyExtendedKeyUsage" will make the regular TLS verification work, while not having to "deviate too much" from the spec, but perhaps now is the best moment to change the spec, or better said, it's "the least bad time" to do this. |
I appreciate that right now you have the opportunity to amend the spec, but you need to consider that all the existing productive deployments will then be no-longer spec compliant. So I would push for backwards compatible amendments. I think we took inspiration from https://github.com/github/smimesign/blob/dbf59be7e92556ee5a9be731611ad96299219629/ietf-cms/verify.go#L65, but I agree that in hindsight, this might not have been a good choice. |
Currently, the specification of the root and ca mandate that in the
Extended key usage
extension,id-kp-serverAuth
andid-kp-clientAuth
must not be present.This leads to a problem when trying to use CPPKI certificates in TLS handshake, as most implementation will only have a valid verification path from leaf to root certificate, if the extended key usages of the leaf are a subset of the extended key usage of the certificates in the chain. In other words, because CA and Root certificates do not have id-kp-serverAuth set, they cannot really be used for standard TLS without additional work arounds.
This is an oversight and makes CPPKI certificates less ergonomic to use than they could be.
My proposal would be to first adjust the implementation to not validate the absence anymore, and once that has found wide adoption in the network, to adjust the specification accordingly. This needs a phased roll out, because simply starting to create Root and CA certificates with id-kp-*Auth set would lead to verification errors on all relying parties that have not been adjusted yet.
The text was updated successfully, but these errors were encountered: