Open
Conversation
Add support for Tencent Cloud Key Management Service (KMS) as a new encryption provider for SOPS. This implementation follows the same pattern as existing cloud KMS integrations. Features: - Encrypt/decrypt SOPS data keys using Tencent Cloud KMS - CLI flags: --tencent-kms, --add-tencent-kms, --rm-tencent-kms - Environment variable: SOPS_TENCENT_KMS_IDS - Configuration file support: tencent_kms key in .sops.yaml - Optional STS token support via TENCENTCLOUD_TOKEN - Customizable endpoint for CVM/TKE internal networks Authentication via environment variables: - TENCENTCLOUD_SECRET_ID (required) - TENCENTCLOUD_SECRET_KEY (required) - TENCENTCLOUD_TOKEN (optional, for STS) - TENCENTCLOUD_REGION (optional, default: ap-guangzhou) - TENCENTCLOUD_KMS_ENDPOINT (optional) Signed-off-by: frank <frankstarye@tencent.com>
- Add usage guide in README.rst - Add CHANGELOG entry - Include internal endpoint hint for CVM/TKE environments Signed-off-by: frank <frankstarye@tencent.com>
b264bff to
4cdbc7e
Compare
Author
|
Hi maintainers — this PR is now ready for review. |
Author
|
Hi maintainers, this PR is ready. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add Tencent Cloud KMS Support
Summary
This PR adds support for encrypting and decrypting SOPS files using Tencent Cloud KMS, similar to existing AWS KMS, GCP KMS, Azure Key Vault, and HuaweiCloud KMS integrations.
Changes
Core Implementation
tencentkmspackage implementingMasterKeyinterface for Tencent Cloud KMSgithub.com/tencentcloud/tencentcloud-sdk-go)CLI Integration
--tencent-kmsflag for encrypt and edit commands--add-tencent-kmsand--rm-tencent-kmsflags for rotate commandSOPS_TENCENT_KMS_IDSenvironment variableConfiguration Support
.sops.yamlconfiguration fileskey-uuid(e.g.,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)gRPC Keyservice Integration
TencentKmsKeymessage to protobuf definitionsStorage Format
tencent_kmskey serialization in stores packageUsage
Set credentials:
Encrypt a file:
Edit encrypted file:
Rotate keys:
Configuration File Example
Authentication
Tencent Cloud credentials can be provided via environment variables:
TENCENTCLOUD_SECRET_IDTENCENTCLOUD_SECRET_KEYTENCENTCLOUD_TOKENTENCENTCLOUD_REGIONap-guangzhou)TENCENTCLOUD_KMS_ENDPOINTkms.internal.tencentcloudapi.comfor CVM/TKE environments)Testing
make checkdocs)Implementation Notes