Commit Graph

16 Commits

Author SHA1 Message Date
Roland Bracewell Shoemaker 75dc93db01
Document EKU inclusion (#5055) 2020-08-27 13:40:16 -07:00
Jacob Hoffman-Andrews 56b98bd665
ceremony: add cross-certificate ceremony type. (#5031)
This is like an intermediate ceremony, but the EKU and path length
constraints are omitted.

Fixes #5029
2020-08-19 17:32:24 -07:00
Roland Bracewell Shoemaker 85851a6f2e
ca: implement our own certificate issuance lib (#5007)
Adds a replacement issuance library that replaces CFSSL. Usage of the
new library is gated by a feature, meaning until we fully deploy the
new signer we need to support both the new one and CFSSL, which makes
a few things a bit complicated.

One Big follow-up change is that once CFSSL is completely gone we'll
be able to stop using CSRs as the internal representation of issuance
requests (i.e. instead of passing a CSR all the way through from the
WFE -> CA and then converting it to the new signer.IssuanceRequest,
we can just construct a signer.IssuanceRequest at the WFE (or RA) and
pass that through the backend instead, making things a lot less opaque).

Fixes #4906.
2020-08-17 15:53:28 -07:00
Jacob Hoffman-Andrews dcb42cbe66
Don't require OCSP URL for intermediates. (#5015)
Per ballot SC30, assuming the review period passes with no objections,
OCSP is no longer required on intermediates.
2020-08-11 09:16:20 -07:00
Jacob Hoffman-Andrews ccec6cfa19
Move X509Signer from ceremony to pkcs11helpers. (#5004) 2020-07-31 13:24:37 -07:00
Jacob Hoffman-Andrews 0834ca4a19
pkcs11helper: add a Session abstraction (#4989) 2020-07-29 12:38:45 -07:00
Roland Bracewell Shoemaker 1864325d87
cmd/ceremony: add delegated crl signer generation (#4913) 2020-07-02 08:44:45 -07:00
Roland Bracewell Shoemaker c4813cc340
cmd/ceremony: merge single-ocsp tool into ceremony (#4878)
Fixes #4658.
2020-06-23 11:30:31 -07:00
Shiloh Heurich bdd6034a80
Add x509.ExtKeyUsageClientAuth to intermediate certificate. (#4844)
Fixes #4843
2020-06-08 11:13:38 -07:00
Roland Bracewell Shoemaker 7673f02803
Use cmd/ceremony in integration tests (#4832)
This ended up taking a lot more work than I expected. In order to make the implementation more robust a bunch of stuff we previously relied on has been ripped out in order to reduce unnecessary complexity (I think I insisted on a bunch of this in the first place, so glad I can kill it now).

In particular this change:

* Removes bhsm and pkcs11-proxy: softhsm and pkcs11-proxy don't play well together, and any softhsm manipulation would need to happen on bhsm, then require a restart of pkcs11-proxy to pull in the on-disk changes. This makes manipulating softhsm from the boulder container extremely difficult, and because of the need to initialize new on each run (described below) we need direct access to the softhsm2 tools since pkcs11-tool cannot do slot initialization operations over the wire. I originally argued for bhsm as a way to mimic a network attached HSM, mainly so that we could do network level fault testing. In reality we've never actually done this, and the extra complexity is not really realistic for a handful of reasons. It seems better to just rip it out and operate directly on a local softhsm instance (the other option would be to use pkcs11-proxy locally, but this still would require manually restarting the proxy whenever softhsm2-util was used, and wouldn't really offer any realistic benefit).
* Initializes the softhsm slots on each integration test run, rather than when creating the docker image (this is necessary to prevent churn in test/cert-ceremonies/generate.go, which would need to be updated to reflect the new slot IDs each time a new boulder-tools image was created since slot IDs are randomly generated)
* Installs softhsm from source so that we can use a more up to date version (2.5.0 vs. 2.2.0 which is in the debian repo)
* Generates the root and intermediate private keys in softhsm and writes out the root and intermediate public keys to /tmp for use in integration tests (the existing test-{ca,root} certs are kept in test/ because they are used in a whole bunch of unit tests. At some point these should probably be renamed/moved to be more representative of what they are used for, but that is left for a follow-up in order to keep the churn in this PR as related to the ceremony work as possible)
Another follow-up item here is that we should really be zeroing out the database at the start of each integration test run, since certain things like certificates and ocsp responses will be signed by a key/issuer that is no longer is use/doesn't match the current key/issuer.

Fixes #4832.
2020-06-03 15:20:23 -07:00
Roland Bracewell Shoemaker 286271f0db
cmd/ceremony: set id-kp-serverAuth by default on intermediates (#4828)
Always add id-kp-serverAuth to intermediate certificates.
2020-05-28 13:24:22 -07:00
Roland Bracewell Shoemaker 5fd2ef5802
cmd/ceremony: set max path len to 0 for intermediates (#4823)
Fixes #4743
2020-05-27 13:58:18 -07:00
Roland Bracewell Shoemaker 8dcd66883a
Add OCSP signer generation to ceremony tool (#4813)
Initially this was going to just be a bool on the `intermediate` type,
but there is enough different in terms of what is generated that I think
it makes sense to add a completely separate type. Internally they share
the same config, since basically everything else is the same (apart from
a few constraints on what fields can be populated in the profile).

This additionally fixes a bug where we weren't actually validating
root/intermediate/key configs.

Fixes #4741
2020-05-26 19:34:59 -07:00
Roland Bracewell Shoemaker 69a3baa72d
cmd/ceremony: support qualified CPS policies (#4811)
Adds support for qualified CPS policies to root/intermediate generation.
This changes the existing policy-oids fields to a policies field which covers both bare policies and id-qt-cps qualified policies.

Fixes #4724
2020-05-20 17:49:16 -07:00
Jacob Hoffman-Andrews 0e9ac0c638
Use bytes.Equal instead of bytes.Compare == 0 (#4758)
staticcheck cleanup: https://staticcheck.io/docs/checks#S1004
2020-04-08 17:20:56 -07:00
Roland Bracewell Shoemaker 81bb4047d5
Ceremony monolith (#4678)
Merges gen-ca and gen-key into a single tool that can be used to complete a key/certificate generation ceremony. The driving idea here is that instead of having to write out multiple long commands in a specific order in order to complete a ceremony a configuration file is fed to a single binary. This config file contains all of the information needed to complete the ceremony, and can be easily tested outside of the secure environment before hand without fear of later typing a command/flag incorrectly etc.

The tooling works against the test hardware I have (there are minimal changes to the actual PKCS#11 code behind the scenes). Specific attention should be given to the documentation, and the general UX of the tool.

Fixes #4639 and fixes #4667.
2020-03-27 13:54:56 -07:00