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

Add support for HMAC type to vault_transit_secret_backend_key #2034

Merged
merged 3 commits into from
Oct 3, 2023

Conversation

roberteckert
Copy link
Contributor

@roberteckert roberteckert commented Sep 29, 2023

  • Add key_size as it is necessary for HMAC. Default to 0 bits as that is the default for all key types except HMAC currently.

Description

This PR updates the vault_transit_secret_backend_key to accept the hmac key type along with the requisite key_size argument so that transit keys of the hmac type can be created.

Relates OR Closes #0000

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

* Add key_size as it is necessary for HMAC. Default to 0 bits as that
  is the default for all key types _except_ HMAC currently.
@hashicorp-cla
Copy link

hashicorp-cla commented Sep 29, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

Thanks! Looking good so far! Had a few comments on checking the Vault server version.

Could we also add a Changelog entry under Unreleased?

@fairclothjm fairclothjm added this to the 3.21.0 milestone Oct 2, 2023
* Removed ValidateFunc to rely on Vault's internal validation
* Updated CHANGELOG.md
* Slightly tweaked the description of `key_size`
* Wrapped the `data["key_size"]` allocation in a check for Vault version
* Added `SkipFunc` blocks to the `hmac` tests
@roberteckert
Copy link
Contributor Author

Thanks for the feedback. I:

  • Removed ValidateFunc to rely on Vault's internal validation
  • Updated CHANGELOG.md
  • Slightly tweaked the description of key_size
  • Wrapped the data["key_size"] allocation in a check for Vault version
  • Added SkipFunc blocks to the hmac tests

Copy link
Contributor

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@roberteckert
Copy link
Contributor Author

This seems done - is there anything else you require from me?

@fairclothjm fairclothjm merged commit 95a3230 into hashicorp:main Oct 3, 2023
10 checks passed
@fairclothjm
Copy link
Contributor

We don't require anything else, thanks @roberteckert!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants