Giter Site home page Giter Site logo

Comments (4)

jvehent avatar jvehent commented on May 17, 2024

I'd like to understand your use case better here: what are you trying to achieve?

Decrypting a file does not require setting the KMS ARN of the PGP FP, because the encrypted file keeps the information about which keys can decrypt it in the sops metadata at the bottom of the file. Upon decryption, sops tries all the master keys and the first one that is available is used to decrypt the file.

from sops.

bhourigan avatar bhourigan commented on May 17, 2024

@jvehent Ahh, I called out decryption since that on my mind at the time. The use case here is to replicate the functionality of git-crypt, where I can configure a filter in gitattributes and automatically encrypt all files in a directory. I'd like to programmatically specify the KMS ARNs and/or PGP FPs so new files are automatically encrypted with the same keys.

The goal is to reduce the chance of accidental check in of secret data.

from sops.

jvehent avatar jvehent commented on May 17, 2024

You can set the KMS ARN and the PGP FPs using command line flags, as follows:

sops --kms "arn:aws:kms:us-west-2:927034868273:key/fe86dd69-4132-404c-ab86-4269956b4500+arn:aws:iam::927034868273:role/hiera-sops-dev, arn:aws:kms:us-west-2:361527076523:key/5052f06a-5d3f-489e-b86c-57201e06f31e+arn:aws:iam::361527076523:role/hiera-sops-prod" \
--pgp 6F73539153B31C193A2154EAF7A9B793541A953D \
/path/to/my/file

The syntax of the --kms and --pgp flags is identical to the environment variables.

Does that solve your issue?

from sops.

bhourigan avatar bhourigan commented on May 17, 2024

Does that solve your issue?

Yes, this should be fine. Thank you!

from sops.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.