-
Notifications
You must be signed in to change notification settings - Fork 9
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
Plaintext secrets #1096
Comments
Hi @MartinAltmayerTMH have you tried disabling all conversions? const secret = new SopsSecret(this, 'SopsComplexSecretJSON', {
convertToJSON: false, // disable converting the encrypted content to JSON
stringify: false, // disable stringifying all values
flatten: false, // disable flattening of the object structure
sopsFilePath: 'secrets/sopsfile-encrypted.json',
}); If it does not work, can you provide an example content? |
Disabling the conversions will create a plaintext secret in AWS. However, it will still contain the key and the value from the SOPS file. I'd like to store just the value, e.g. The problem is that SOPS requires a top-level object (so they can store their metadata below
And this is the secret created with all conversions disabled: |
Understood! I think adding an option called "plaintext" that removes the "data" key from the decrypted sops file would solve this issue. The key to be removed should be configurable by the user and default to "data" – that's what sops creates when you encrypt plain text. In your case, it is the key "value". |
Is there an option to sync plaintext values to AWS Secrets Manager? From what I can see, SOPS requires me to specify a JSON/YAML object and cdk-sops-secrets will just copy this object (without the special 'sops' key) as a key/value secret.
I'd like to have just a string, without any JSON/YAML around it:
The text was updated successfully, but these errors were encountered: