Skip to content

WFE2: Improve support for multiple issuers & chains#5247

Merged
aarongable merged 8 commits intomainfrom
wfe2-multi-issuer
Jan 27, 2021
Merged

WFE2: Improve support for multiple issuers & chains#5247
aarongable merged 8 commits intomainfrom
wfe2-multi-issuer

Conversation

@aarongable
Copy link
Copy Markdown
Contributor

@aarongable aarongable commented Jan 23, 2021

This change simplifies and hardens the wfe2's support for having
multiple issuers, and multiple chains for each issuer, configured
and loaded in memory.

The only config-visible change is replacing the old two separate config
values (certificateChains and alternateCertificateChains) with a
single value (chains). This new value does not require the user to
know and hand-code the AIA URLs at which the certificates are available;
instead the chains are simply presented as lists of files. If this new
config value is present, the old config values will be ignored; if it
is not, the old config values will be respected.

Behind the scenes, the chain loading code has been completely changed.
Instead of loading PEM bytes directly from the file, and then asserting
various things (line endings, no trailing bits, etc) about those bytes,
we now parse a certificate from the file, and in-memory recreate the
PEM from that certificate. This approach allows the file loading to be
much more forgiving, while also being stricter: we now check that each
certificate in the chain is correctly signed by the next cert, and that
the last cert in the chain is a self-signed root.

Within the WFE itself, most of the internal structure has been retained.
However, both the internal issuerCertificates (used for checking
that certs we are asked to revoke were in fact issued by us) and the
certificateChains (used to append chains to end-entity certs when
served to clients) have been updated to be maps keyed by IssuerNameID.
This allows revocation checking to not have to iterate through the
whole list of issuers, and also makes it easy to double-check that
the signatures on end-entity certs are valid before serving them. Actual
checking of the validity will come in a follow-up change, due to the
invasive nature of the necessary test changes.

Fixes #5164

Loading
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 this pull request may close these issues.

Support multiple issuers in the WFEs

5 participants