api: add GET /intermediate.crt for AIA caIssuers#2655
Open
Yannik wants to merge 1 commit intosmallstep:masterfrom
Open
api: add GET /intermediate.crt for AIA caIssuers#2655Yannik wants to merge 1 commit intosmallstep:masterfrom
Yannik wants to merge 1 commit intosmallstep:masterfrom
Conversation
Adds a new endpoint that returns the CA's issuing intermediate certificate as a single DER-encoded X.509 certificate for use as an Authority Information Access (AIA) caIssuers URI. RFC 5280 Section 4.2.2.1 permits HTTP caIssuers URIs to point to a single DER certificate as specified by RFC 2585 Section 3. For that single-certificate representation, RFC 5280 recommends Content-Type application/pkix-cert, the media type registered by RFC 2585 Section 4.1. The existing /intermediates.pem endpoint serves PEM on the HTTPS listener only. Neither property is suitable for TLS subscriber certificate AIA use: PEM over AIA has been flagged as a compliance issue by browser root programs (see Mozilla bug 1637093), and the CA/Browser Forum Baseline Requirements Section 7.1.2.7.7 describe id-ad-caIssuers as an HTTP URL of the issuing CA certificate. This lets clients fetch the issuer before they can validate the CA's TLS certificate. The endpoint is mounted on both the secure and insecure muxes, mirroring /crl. The insecure server now starts for this endpoint when insecureAddress is configured and the CA has an issuer certificate.
8f90322 to
4e021fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Name of feature:
api: add GET /intermediate.crt for AIA caIssuers
Pain or issue this feature alleviates:
step-ca currently exposes
/intermediates.pem, but that endpoint is not a goodfit for a certificate's AIA
caIssuersURL:id-ad-caIssuersaccessLocationmust point to either a singleDER-encoded certificate as specified by RFC 2585 Section 3, or a certs-only
CMS bundle. For a single-certificate response, RFC 5280 recommends
Content-Type: application/pkix-cert, the media type registered by RFC 2585Section 4.1.
CA/Browser Forum Baseline Requirements Section 7.1.2.7.7 describe
id-ad-caIssuersas an HTTP URL of the issuing CA certificate, so clientscan fetch the issuer before they can validate the CA's TLS certificate.
Why is this important to the project (if not answered above):
This makes step-ca able to serve the issuing intermediate certificate in the
format and scheme expected by common AIA
caIssuersclients, without requiringextra infrastructure around step-ca.
Is there documentation on how to use this feature? If so, where?
No standalone documentation is added in this PR. The endpoint can be used
by setting a certificate template's
issuingCertificateURLto the HTTPendpoint:
{ "issuingCertificateURL": ["http://ca.example.com/intermediate.crt"] }In what environments or workflows is this feature supported?
When step-ca is an intermediate CA.
In what environments or workflows is this feature explicitly NOT supported (if any)?
If step-ca is a Root CA (GetIntermediateCertificates() returns no certificates)
Supporting links/other PRs/issues:
Operational Protocols: FTP and HTTP
id-ad-caIssuersfor TLS subscriber certificatescaIssuersflagged as a complianceissue