feat: add Alibaba Cloud KMS Support#2069
Open
peiliqiancdt wants to merge 11 commits intogetsops:mainfrom
Open
Conversation
f58bc35 to
f3d0a4d
Compare
Signed-off-by: Perrie Qian <perrie-qian@outlook.com>
f3d0a4d to
cb1a856
Compare
…nd adjusting permissions
feat: add support for Alibaba Cloud KMS
Signed-off-by: Perrie Qian <perrie-qian@outlook.com>
Signed-off-by: Perrie Qian <perrie-qian@outlook.com>
…use ARN format Signed-off-by: Perrie Qian <perrie-qian@outlook.com>
Signed-off-by: Peili Qian <115339223+peiliqiancdt@users.noreply.github.com>
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 Alibaba Cloud KMS Support
Summary
This PR adds support for Alibaba Cloud KMS as a new key provider in SOPS.
Changes
Core Implementation
acskmspackage with ARN parsing, encrypt/decrypt, metadata serialization, and tests.acskmsentries and ensure round-trip conversions..sops.yamlcreation_rules/key_groupsto declareacs_kms, with parsing, deduping, and tests.CLI & Config Integration
--acs-kms,--add-acs-kms,--rm-acs-kms, andSOPS_ACS_KMS_ARNflags/env vars across encrypt/edit/rotate/set/unset flows..sops.yamlfallbacks.Keyservice / gRPC
AcsKmsKeyprotobuf message and regenerate clients/servers so remote keyservice instances can wrap ACS KMS.keyservice.KeyFromMasterKeyplus Encrypt/Decrypt RPC handlers to cover ACS KMS master keys.Dependencies
Pull in Alibaba Cloud SDK modules required by the new integration.
Authentication
SOPS will use the Alibaba Cloud SDK's default credential provider chain to authenticate with KMS. This means it will look for credentials in the following order:
ALIBABA_CLOUD_ACCESS_KEY_IDandALIBABA_CLOUD_ACCESS_KEY_SECRET).Usage
sops encrypt --acs-kms acs:kms:cn-shanghai:1234567890:key/your-key secrets.yaml > secrets.enc.yamlOr via
.sops.yaml: