vault/sdk/helper/keysutil
Alexander Scheel daf72aa427
Fix transit import/export of hmac-only keys (#20864)
* Fix export of HMAC typed keys

When initially implemented, exporting HMAC keys resulted in returning
the unused, internal HMACKey value rather than the main Key value that
is used for HMAC operations.

This is a breaking change.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Consistently handle HMAC keys in keysutil

When generating HMAC-typed keys, set HMACKey = Key consistently, to
allow users of HMAC-typed keys to use them backwards compatibly.

Notably, this could discard the (unused) HMACKey field set today.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add test proving export of HMAC keys work

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add changelog entry

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-05-31 18:04:08 +00:00
..
cache.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
consts.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
encrypted_key_storage_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
encrypted_key_storage.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
lock_manager.go Provide public key encryption via transit engine (#17934) 2023-05-11 11:56:46 +00:00
managed_key_util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
policy_test.go Provide public key encryption via transit engine (#17934) 2023-05-11 11:56:46 +00:00
policy.go Fix transit import/export of hmac-only keys (#20864) 2023-05-31 18:04:08 +00:00
transit_lru.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
transit_syncmap.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
util.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00