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

Support customer-managed KMS key for environment variables #123

Open
brandond opened this issue Dec 4, 2016 · 4 comments
Open

Support customer-managed KMS key for environment variables #123

brandond opened this issue Dec 4, 2016 · 4 comments
Assignees

Comments

@brandond
Copy link
Contributor

brandond commented Dec 4, 2016

Optional, of course

@brandond brandond changed the title Support user-managed KMS key for environment variables Support customer-managed KMS key for environment variables Dec 4, 2016
@jarosser06
Copy link
Contributor

@brandond Would you mind elaborating on what you are thinking with this request.

@brandond
Copy link
Contributor Author

brandond commented Jan 5, 2017

See this section of the documentation:
http://docs.aws.amazon.com/lambda/latest/dg/env_variables.html#env_encrypt

If you use the Lambda management console and enable environment variable encryption, the console has some back-end functionality to encrypt the plaintext content of the variables that you enter into the web form using the KMS key specified. The ciphertext is then stored in the lambda configuration The Lambda code you write then has to make some KMS calls to decrypt the contents. Sample code for this is provided in the console as well.

From a lambda-uploader perspective, the implementation should probably function similarly - make a KMS call to encrypt the plaintext variable contents, using the specified KMS key, and store the ciphertext in place of the original contents.

@martinb3
Copy link
Contributor

From a lambda-uploader perspective, the implementation should probably function similarly - make a KMS call to encrypt the plaintext variable contents, using the specified KMS key, and store the ciphertext in place of the original contents.

It seems like this would require we:

  1. Have some way to mark which secrets should be encrypted
  2. Prompt for the plaintext version of those secrets
  3. Have a feature or wrap the aws kms CLI feature so that we can encipher the secrets
  4. Be able to set the ciphertext in an environment variable(s)

@jarosser06 jarosser06 self-assigned this Jan 19, 2017
@nsaje
Copy link

nsaje commented Oct 1, 2020

could use https://github.com/Zemanta/py-secretcrypt for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants