Skip to content

Conversation

kitography
Copy link
Contributor

@kitography kitography commented Mar 26, 2025

Description

Allows Root and Intermediate Key_Usage to be set via CLI, not just in the CSR

Fixes: #29362

The test here doesn't successfully fail on a bad branch, so this is a draft right now.

TODO only if you're a HashiCorp employee

  • Backport Labels: If this fix needs to be backported, use the appropriate backport/ label that matches the desired release branch. Note that in the CE repo, the latest release branch will look like backport/x.x.x, but older release branches will be backport/ent/x.x.x+ent.
  • ENT Breakage: If this PR either 1) removes a public function OR 2) changes the signature
    of a public function, even if that change is in a CE file, double check that
    applying the patch for this PR to the ENT repo and running tests doesn't
    break any tests. Sometimes ENT only tests rely on public functions in CE
    files.
  • Jira: If this change has an associated Jira, it's referenced either
    in the PR description, commit message, or branch name.

@kitography kitography added this to the 1.19.1 milestone Mar 26, 2025
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Mar 26, 2025
Copy link

github-actions bot commented Mar 26, 2025

CI Results:
All Go tests succeeded! ✅

@kitography kitography marked this pull request as ready for review March 26, 2025 17:35
@kitography kitography requested review from a team as code owners March 26, 2025 17:35
@kitography kitography requested a review from angelocordon March 26, 2025 17:35
Copy link

github-actions bot commented Mar 26, 2025

Build Results:
All builds succeeded! ✅

victorr
victorr previously approved these changes Mar 26, 2025
Copy link
Contributor

@victorr victorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

Copy link
Contributor

@stevendpclark stevendpclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather we follow the CAB forum guidelines section 7.1.2.10.7 and limit CA key_usages to just digitalSignature, keyCertSign and cRLSign.

Can we add a check within the root generate and sign-intermediate paths to error out if we are provided any key usage value outside of those , along with updating the relevant docs?

stevendpclark
stevendpclark previously approved these changes Mar 27, 2025
Copy link
Contributor

@stevendpclark stevendpclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kitography kitography changed the title Allow Root + Intermediate Key_Usage and Ext_Key_Usage to be set Allow Root + Intermediate Key_Usage to be set Mar 27, 2025
@kitography kitography enabled auto-merge (squash) March 27, 2025 19:31
stevendpclark
stevendpclark previously approved these changes Mar 28, 2025
stevendpclark
stevendpclark previously approved these changes Apr 2, 2025
Copy link
Contributor

@stevendpclark stevendpclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kitography kitography self-assigned this Apr 3, 2025
Style correction suggested by Sarah Chavis.

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
@kitography kitography merged commit 2a14b1c into main Apr 3, 2025
88 checks passed
@kitography kitography deleted the bugfix/VAULT-34410 branch April 3, 2025 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cryptosec hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Generate root API doesn't consider changes of field key_usage
4 participants