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

secret/pki: fix key_usage panic and unset function #2036

Merged
merged 7 commits into from
Oct 5, 2023

Conversation

fairclothjm
Copy link
Contributor

@fairclothjm fairclothjm commented Oct 2, 2023

Description

Do not panic when setting key_usage to an array of empty string. Also make this unset the key usage constraints on the pki engine.

Closes #1533, closes #2028

Checklist

  • Added CHANGELOG entry (only for user-facing changes)
  • Acceptance tests where run against all supported Vault Versions

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

@fairclothjm fairclothjm force-pushed the VAULT-20361/secret/pki/fix-key-usage-panic branch from 2d628f3 to ed81aac Compare October 2, 2023 21:40
@fairclothjm fairclothjm requested a review from a team October 2, 2023 21:42
@fairclothjm fairclothjm added this to the 3.21.0 milestone Oct 2, 2023
@github-actions github-actions bot added size/M and removed size/XS labels Oct 3, 2023
@fairclothjm
Copy link
Contributor Author

@vinay-gopalan Thanks for the review! I made a few improvements and now we handle the case where key_usage is an empty list which is the "official" way of unsetting the default constraints: https://developer.hashicorp.com/vault/api-docs/secret/pki#key_usage

@fairclothjm fairclothjm merged commit b672cb4 into main Oct 5, 2023
10 checks passed
@fairclothjm fairclothjm deleted the VAULT-20361/secret/pki/fix-key-usage-panic branch October 11, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants