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

Backport of Fix transit import/export of hmac-only keys into release/1.12.x #20900

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #20864 to be assessed for backporting due to the inclusion of the label backport/1.12.x.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@cipherboy
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/vault/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


Fundamentally the second commit is the important one: we need to ensure HMAC-only keys exposes the same interface as non-HMAC keys, that is, the HMAC key is in .HMACKey and the "real" key is in .Key -- but in our case, HMAC should be the same value across both in case anyone is using the field directly in applications.

The first is more or less a duplicate, for backwards compatibility: we won't nuke the existing HMAC keys with different-HMACKey-field-values, so we'll want to export the real one under export/hmac-keys/.... For anyone who inadvertently used the wrong HMAC key, they can use a plaintext backup (and/or sys/raw) to import the separate, incorrect versions as proper versions into this key.


Related: #20804
Jira: VAULT-16702


Overview of commits

@hashicorp-cla
Copy link

hashicorp-cla commented May 31, 2023

CLA assistant check
All committers have signed the CLA.

@cipherboy cipherboy self-assigned this May 31, 2023
@cipherboy cipherboy modified the milestones: 1.13.3, 1.12.7 May 31, 2023
@cipherboy cipherboy force-pushed the backport/cipherboy-fix-transit-import-export-hmac-keys/supposedly-adjusted-mongoose branch from 829b679 to f72226c Compare May 31, 2023 18:18
Removed byok test; this is unfortunate as it was the strongest
exerciser of this, but sadly it doesn't exist in 1.13 and previous
versions.

Signed-off-by: Alexander Scheel <[email protected]>
@cipherboy cipherboy force-pushed the backport/cipherboy-fix-transit-import-export-hmac-keys/supposedly-adjusted-mongoose branch from f72226c to 70dc3f3 Compare May 31, 2023 18:19
@cipherboy cipherboy marked this pull request as ready for review May 31, 2023 18:19
@cipherboy cipherboy enabled auto-merge (squash) May 31, 2023 18:19
…ort-export-hmac-keys/supposedly-adjusted-mongoose
@cipherboy cipherboy merged commit b6d7758 into release/1.12.x May 31, 2023
@cipherboy cipherboy deleted the backport/cipherboy-fix-transit-import-export-hmac-keys/supposedly-adjusted-mongoose branch May 31, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants