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

Configuring sops to use different AWS KMS keys in different accounts #1093

Closed
WillerWasTaken opened this issue Jul 21, 2022 · 0 comments · Fixed by #1049
Closed

Configuring sops to use different AWS KMS keys in different accounts #1093

WillerWasTaken opened this issue Jul 21, 2022 · 0 comments · Fixed by #1049

Comments

@WillerWasTaken
Copy link

Hey

I am trying to configure SOPS to encrypt secrets with kms keys that will come from different AWS accounts. Essentially if one has access to at least one of the keys he will be able to decrypt the file.
The way we configure our AWS in our workflow is through the usage of named aws profiles.

We'd like to automatically configure our sops secrets with several of those keys:

# any_secrets.yaml
foo: [<snip>]
sops:
    kms:
        - arn: <arn-of-account-1>
          aws_profile: "account-1"
        - arn: <arn-of-account-2>
          aws_profile: "account-2"
    gcp_kms: []
    azure_kv: []
    hc_vault: []
    age: []

I then tried to configure the .sops.yaml configuration file configuring the various keys and associated aws profile like so:

# .sops.yaml
creation_rules:
  - key_groups:
    - kms:
      - arn: '<arn-of-account-1>'
        aws_profile: 'account-1'
      - arn: '<arn-of-account-2>'
        aws_profile: 'account-2'

But when trying to encrypt anything with sops using this configuration file is trying to get the arn using the default aws profile. Basically the creation_rules[*].key_groups[*].kms[*].aws_profile are completely ignored.

How can I update my configuration to get sops working with several kms keys with different aws profiles?

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 a pull request may close this issue.

1 participant