hiera-eyaml icon indicating copy to clipboard operation
hiera-eyaml copied to clipboard

-d option in recrypt overrides encryption_method from config.yaml

Open oveaurs opened this issue 5 years ago • 1 comments

If you have a config.yaml with encryption_method: 'gpg' and do a eyaml recrypt, pkcs7 is still used, because the -d option added in https://github.com/voxpupuli/hiera-eyaml/pull/232/files overrides it. I see that there also is a -n option for the recrypt command that is possibly trying to do the same thing. This also fails: eyaml recrypt -n gpg somefile and tries to use pkcs7.

I've worked around the problem by adding change_encryption: 'gpg' to my config.yaml, but it seems to me that the -d and -n options are redundant, and -d should be removed (or added as an alias somehow for the -n option perhaps to avoid breaking it for those using the -d option).

oveaurs avatar Nov 14 '19 07:11 oveaurs

Thank you for the workaround. I can confirm that setting change_encryption: 'gpg' fixes the problem.

On a side note, looks like eyaml recrypt has been broken for gpg for over 3 years, which isn't a good sign for users of eyaml. :(

mricon avatar Oct 09 '20 13:10 mricon