-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add certificate field to TrustAnchor struct behind a feature flag? #15
Comments
Why do you need the entire certificate? Why couldn't that work while maintaining your own type that contains both the |
With regards to why we need the entire certificate, the short answer is FIPS compliance. With regards to maintaining our own mapping, I apologize I didn't explain the second step of my proposal. I would also submit a PR to the 'webpki-roots' crate that populated this proposed new field behind a feature flag of the 'webpki-roots' crate. The PR to 'webpki-roots' would update /tests/codegen.rs with the changes guarded by the feature flag. |
Could you please be more precise and go into more detail about this? Many of are actively working on FIPS compliance and also NIST SP800-52 compliance and it would be good to find a solution that isn't so expensive as what you are proposing. |
I will do my best to provide more detail about FIPS compliance with the caveat that I am not an expert on FIPS compliance. I believe that an implementation is certified as FIPS compliance. I believe the root certificates are out of scope with regards to FIPS compliance. Maybe that last statement is incorrect? My intended use case is to use a different TLS library and use the 'webpki-roots' crate as the source of truth for the root certificates. I'd like to understand more, what part of my proposal is expensive? I believe the patch to 'pki-types' would be limited to the TrustAnchor struct and the patch to 'webpki-roots' would modify /tests/codegen.rs to populate the new field. These changes would be behind a feature flag is that disabled by default. To rephrase my request: are you amenable to downstream consumers of the webpki-root crate as a source of certificates? |
If you're looking to use a different TLS library then I think don't think that's a compelling use case for changing pki-types (to make the |
When a field is added using Basically, it creates a lot of problems to have a ( |
I understand your concerns. With regards to the feedback, "You can quite easily fork webpki-roots to generate whatever you need based on the CCADB." The downside of this approach is that when '/tests/codegen.rs' changes over time, those improvements need to be recognized and transferred to the fork. We know this is a challenge with forking open-source software. A different proposal is to create a new crate |
I'd propose instead that we change the webpki-roots repo to be a workspace that includes a crate that pulls the CCADB stuff and exposes some kind of API on that. Then the |
I think @djc's proposal would be an OK direction. Making a separate
Making a separate crate for the codegen is also additional maintainer overhead to cater to a usecase that we don't have in the Rustls ecosystem, but it at least wouldn't require as much ongoing maintenance (changes to that code are infrequent compared to root data updates). |
Yes, getting open source maintainers (often, as in my case, volunteers) to do your maintenance work is helpful to organizations, including VC-funded startups such as your employer's. I'm not sure it's fair to describe this as the forking itself being a problem. |
This discussion has prompted another possible design. How about a proposed change only to the webpki-roots crate that would add a feature flag. The feature flag determines whether a new global const exists in the webpki-roots crate that stores the root certificates? I believe that doesn’t break semver compatibility. |
I don't think you'll convince us that this stuff should appear in the public webpki-roots API. |
I like this proposal. Any objections if I make a pull request to webpki-roots with this change? |
Please closely read the rustls CONTRIBUTING.md before you submit your PR. |
I'll close this issue and submit a PR to the webpki-roots repo. |
Change the webpki-roots repo to be a workspace that includes a crate that pulls the CCADB stuff and exposes an API. References rustls/pki-types#15
Resolved w/ rustls/webpki-roots#56 |
@mspiegel In case it ends up being helpful to you I wanted to mention that we ended up finding some other use-cases that benefited from access to the self-signed certs. We're now publishing a separate crate with that data. |
The TrustAnchor struct stores the elements of a trust anchor needed for verifying certificates. I have a use case where I need the entire certificate of each trust anchor. I recognize the reasons against adding a new field to the TrustAnchor struct: (1) requires a semver update and (2) increases the size of the webpki-roots library with data that the common use case does not use.
Would you consider the addition of a field
certificate
of typeCertificateDer
to the structTrustAnchor
that was behind a feature flag? I believe that would address the concerns above. The tradeoff is the complexity of the feature flag. I would volunteer to submit the PR. I didn't want to write the code if there's no interest. Thanks.The text was updated successfully, but these errors were encountered: