Commit Graph

8 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
0b12cdcfd1
[COMPLIANCE] License changes (#22290)
* Adding explicit MPL license for sub-package.

This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository.

* Adding explicit MPL license for sub-package.

This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository.

* Updating the license from MPL to Business Source License.

Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl.

* add missing license headers

* Update copyright file headers to BUS-1.1

* Fix test that expected exact offset on hcl file

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Sarah Thompson <sthompson@hashicorp.com>
Co-authored-by: Brian Kassouf <bkassouf@hashicorp.com>
2023-08-10 18:14:03 -07:00
Steven Clark
66052d5431
Refactor ACME for enterprise CIEPS integration (#22188) 2023-08-03 11:24:46 -04:00
Steven Clark
e3b3c7a8de
Fix OpenAPI spec definitions for PKI EAB APIs (#21458)
* Fix OpenAPI spec definitions for PKI EAB APIs

 - Do not generate duplicate operation ids for the various new-eab apis
 - Fill out proper operation verb for eab delete call
 - Pluralize operation verb for list-eab-keys api
 - Fill out proper response data for new-eab and list-eab-keys

* Add cl
2023-06-27 08:44:21 -04:00
Steven Clark
0bd356f6cd
Generate ACME EAB tokens that do not start with '-' (#20945)
* Generate ACME EAB tokens that do not start with -

 - To avoid people having issues copying EAB tokens and using them on command lines when they start with - from the base64 encoded values, append a prefix.
 - Remove the key_bits data from the eab api, not really useful and now technically wrong
 - Fix up some issues with tests not running in parallel.
 - Update docs to reflect new EAB apis.

* Add ACME directory to the various EAB output APIs

* Update EAB token prefix to be divisable by 3

 - Our decoded prefix was not divisable by 3, which meant the last
   character might be tweaked by the rest of the input
2023-06-05 14:38:03 +00:00
Steven Clark
000d754c40
Make ACME EAB keys specific to the ACME directory they are created within (#20803)
* Update EAB management urls underneath pki/eab

 - It was decided that for ease of ACLing, the management
   paths for EAB apis should be outside of the acme path
   prefix
 - Delete duplicated tests, rely on the proper cluster
   based tests for EAB management.

* Update ACME EAB creation paths to be directory specific

 - Make the EAB creation APIs directory specific.
 - This commit is still missing the enforcement that
   they can be redeemed on a specific path.

* Enforce EAB tokens per ACME directory context like accounts

 - Do not allow an EAB from one ACME directory to be used
   in another.
 - Rework the ACME directory function to simply get the path from the request instead of parsing out the role/issuer name.
 - Add some commentary around expectations if operators change issuer names

* Add an EAB certbot integration test

 - Verify with the 3rd party certbot cli that our EAB workflow works as expected.

* Fix unit test

 - Unit test wasn't setting up r.Path within the request
   that we now use to determine the acme directory.
2023-05-30 11:49:01 -04:00
Steven Clark
32532c61d1
Address various issues related to ACME EAB (#20755)
* Fix various EAB related issues

 - List API wasn't plumbed through properly so it did not work as expected
 - Use random 32 bytes instead of an EC key for EAB key values
 - Update OpenAPI definitions

* Clean up unused EAB keys within tidy

* Move Vault EAB creation path to pki/acme/new-eab

* Update eab vault responses to match up with docs
2023-05-24 21:17:33 +00:00
Steven Clark
38982a0744
Update ACME endpoint help synopsis and description (#20624)
- Use generic help synopsis and help description values for the various ACME endpoints defined.
 - Add missing values for the Vault ACME EAB apis
2023-05-17 13:59:30 +00:00
Steven Clark
0b9f4048af
Add External Account Binding support to ACME (#20523)
* Add Vault APIS to create, list, delete ACME EAB keys

 - Add Vault authenticated APIs to create, list and delete ACME
   EAB keys.
 - Add supporting tests for all new apis

* Add require_eab to acme configuration

* Add EAB support to ACME

* Add EAB support to ACME

* PR feedback 1

 - Address missing err return within DeleteEab
 - Move verifyEabPayload to acme_jws.go no code changes in this PR
 - Update error message returned for error on account storage with EAB.

* PR feedback 2

 - Verify JWK signature payload after signature verification

* Introduce an ACME eab_policy in configuration

 - Instead of a boolean on/off for require_eab, introduce named policies for ACME behaviour enforcing eab.
 - The default policy of always-required, will force new accounts to have an EAB, and all operations in the future, will make sure the account has an EAB associated with it.
 - Two other policies, not-required will allow any anonymous users to use ACME within PKI and 'new-account-required' will enforce new accounts going forward to require an EAB, but existing accounts will still be allowed to use ACME if they don't have an EAB associated with the account.
 - Having 'always-required' as a policy, will override the environment variable to disable public acme as well.

* Add missing go-docs to new tests.

* Add valid eab_policy values in error message.
2023-05-15 13:15:20 -04:00