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.13.x #20901

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.13.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

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/cipherboy-fix-transit-import-export-hmac-keys/gratefully-possible-malamute branch from 60e3b13 to 61368bb Compare May 31, 2023 18:04
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/cipherboy-fix-transit-import-export-hmac-keys/gratefully-possible-malamute branch from 61368bb to 60e3b13 Compare May 31, 2023 18:04
@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.12.7, 1.13.3 May 31, 2023
@cipherboy cipherboy force-pushed the backport/cipherboy-fix-transit-import-export-hmac-keys/gratefully-possible-malamute branch from aeae638 to a06ed4e Compare May 31, 2023 18:17
@cipherboy cipherboy marked this pull request as ready for review May 31, 2023 18:18
@cipherboy cipherboy requested a review from a team 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 <alex.scheel@hashicorp.com>
@cipherboy cipherboy force-pushed the backport/cipherboy-fix-transit-import-export-hmac-keys/gratefully-possible-malamute branch from a06ed4e to c3dae71 Compare May 31, 2023 18:19
@cipherboy cipherboy enabled auto-merge (squash) May 31, 2023 18:19
…ort-export-hmac-keys/gratefully-possible-malamute
@cipherboy cipherboy merged commit d59a1ed into release/1.13.x May 31, 2023
@cipherboy cipherboy deleted the backport/cipherboy-fix-transit-import-export-hmac-keys/gratefully-possible-malamute 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