feature: add HuaweiCloud KMS wrapper support for auto unseal #31631
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds HuaweiCloud KMS wrapper support to Vault for auto unseal, addressing issue #31630.
What it accomplishes:
Adds HuaweiCloud KMS wrapper support to Vault for auto unseal (fixes #31630).
This enables organizations using HuaweiCloud infrastructure to leverage Vault’s auto unseal feature with the same behavior as existing KMS providers (AWS, Azure, GCP, etc.).
Changes
GetHuaweiCloudKMSFuncto initialize the HuaweiCloud KMS wrapperconfigureWrapperandgetEnvConfigHUAWEICLOUD_REGION,HUAWEICLOUD_ACCESS_KEY, etc.)go-kms-wrapping/wrappers/huaweicloudkms/v2packageRationale
Testing
Security
Related Issue:
Fixes #31630
TODO only if you're a HashiCorp employee
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
Reason: HuaweiCloud KMS support was missing in Vault (issue Add HuaweiCloud KMS support for auto unseal #31630). Organizations using HuaweiCloud infrastructure cannot take advantage of Vault's auto unseal feature. This PR adds complete HuaweiCloud KMS wrapper support, including environment variable and config file support, enabling seamless integration with existing HuaweiCloud infrastructure.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
Revert Plan: These changes only add new code and do not modify existing code. Reverting the PR is sufficient. There are no breaking changes, and existing KMS wrappers are not affected. The revert would simply remove HuaweiCloud KMS support without impacting other functionality.
If applicable, I've documented the impact of any changes to security controls.
Security Impact:
WithDisallowEnvVars(true)is used to disable the wrapper's own env var reading, keeping it under Vault's control