Soluto / kamus

An open source, git-ops, zero-trust secret encryption and decryption solution for Kubernetes applications
https://kamus.soluto.io
Apache License 2.0
930 stars 68 forks source link

cannot encrypt a secret starting with "-----BEGIN PRIVATE KEY-----\n #555

Closed gilm123 closed 4 years ago

gilm123 commented 4 years ago

Describe the bug can't find a way to encrypt a secret with the prefix of "-----BEGIN PRIVATE KEY-----\n". tried with wrapping the secret with " or `, each one giving a different error

Versions used Kamus CLI: latest

To Reproduce Steps to reproduce the behavior:

az acr login --name acreastus \
&& docker pull acreastus.azurecr.io/kamus-cli:latest \
&& docker run -it --init acreastus.azurecr.io/kamus-cli:latest encrypt --secret "-----BEGIN PRIVATE KEY-----\nbla bla bla\n-----END PRIVATE KEY-----\n" --service-account some-name --namespace some-name

Expected behavior be able to encrypt a value starting with the mentioned prefix

omerlh commented 4 years ago

You can pass a file to the CLI using the -f flag, which was added exactly for those cases :)