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

Adding support for multiple issuers to publisher #5272

Merged
merged 4 commits into from
Feb 8, 2021

Conversation

beautifulentropy
Copy link
Member

@beautifulentropy beautifulentropy commented Feb 4, 2021

Publisher currently loads a PEM formatted certificate bundle from file
using LoadCertBundle a utility function in the core package.
LoadCertBundle parses the PEM file to a slice of x509.Certificates and
returns them to boulder-publisher (without checking validity). Using
these x509 Certificates, boulder-publisher to construct an ASN1Cert
bundle. This bundle is passed to each new publisher instance. When
publisher receives a request it unconditionally appends this bundle to
each end-entity precertificate for submission to CT logs.

This change augments this process to add support for multiple issuers
using the IssuerNameID concept in the Issuance package. Config field
Common.CT.CertificateBundleFilename has been replaced with the Chains
field. LoadChain, a utility function added in PR #5271, loads and
validates the chain (which nets us some added deploy-time safety) before
returning it to boulder-publisher. Using these x509 Certificates,
boulder-publisher constructs a mapping of IssuerNameID to ASN1Cert
bundle and passes this to each new publisher instance. When publisher
receives a request it determines the IssuerNameID of the precertificate
to select and append the correct ASN1Cert bundle for a given Issuer.

A followup issue #5269 has been created to address removal of the Common
field from the publisher configuration and code has been commented with
TODOs where code will need to be removed or refactored.

Fixes #1669

Publisher currently loads a PEM formatted certificate bundle from file
using LoadCertBundle a utility function in the core package.
LoadCertBundle parses the PEM file to a slice of x509.Certificates and
returns them to boulder-publisher (without checking validity). Using
these x509 Certificates, boulder-publisher to construct an ANSN1Cert
bundle. This bundle is passed to each new publisher instance. publisher
then unconditionally appends this bundle to each end-entity
precertificate for submission to CT logs.

This change augments this process to add support for multiple issuers
using the IssuerNameID in the Issuance package. config field
Common.CT.CertificateBundleFilname has been replaced with the Chains
field. LoadChain a utility function added in PR #5271. LoadChain
validates the chain (which nets us some added deploy-time safety) before
returning it to boulder-publisher. Using these x509 Certificates,
boulder-publisher constructs a mapping of IssuerNameID to ASN1Cert
bundle and passes this to each new publisher instance. When publisher
receives a request it determines the IssuerNameID of the precertificate
to select and append the correct ASN1Cert bundle for a given Issuer.

A followup issue #5269 has been created to address removal of the Common
field from the publisher configuration and code has been commented with
TODOs where code will need to be removed or refactored.

Fixes #1669
@beautifulentropy beautifulentropy requested review from jsha, aarongable and a team February 4, 2021 21:12
publisher/publisher.go Outdated Show resolved Hide resolved
publisher/publisher.go Outdated Show resolved Hide resolved
cmd/boulder-publisher/main.go Outdated Show resolved Hide resolved
cmd/boulder-publisher/main.go Outdated Show resolved Hide resolved
publisher/test/178.pem Outdated Show resolved Hide resolved
publisher/publisher_test.go Outdated Show resolved Hide resolved
publisher/publisher_test.go Outdated Show resolved Hide resolved
Publisher currently loads a PEM formatted certificate bundle from file
using LoadCertBundle a utility function in the core package.
LoadCertBundle parses the PEM file to a slice of x509.Certificates and
returns them to boulder-publisher (without checking validity). Using
these x509 Certificates, boulder-publisher to construct an ANSN1Cert
bundle. This bundle is passed to each new publisher instance. publisher
then unconditionally appends this bundle to each end-entity
precertificate for submission to CT logs.

This change augments this process to add support for multiple issuers
using the IssuerNameID in the Issuance package. config field
Common.CT.CertificateBundleFilname has been replaced with the Chains
field. LoadChain a utility function added in PR #5271. LoadChain
validates the chain (which nets us some added deploy-time safety) before
returning it to boulder-publisher. Using these x509 Certificates,
boulder-publisher constructs a mapping of IssuerNameID to ASN1Cert
bundle and passes this to each new publisher instance. When publisher
receives a request it determines the IssuerNameID of the precertificate
to select and append the correct ASN1Cert bundle for a given Issuer.

A followup issue #5269 has been created to address removal of the Common
field from the publisher configuration and code has been commented with
TODOs where code will need to be removed or refactored.

Fixes #1669
@jsha jsha merged commit 2efabf5 into main Feb 8, 2021
@jsha jsha deleted the publisher-multi-issuer-update branch February 8, 2021 20:23
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.

Update Publisher to support multiple chains
3 participants