MeltwaterArchive/lighter

Encrypted keys generated by secretary are not being validated by lighter

alinur-meltwater opened this issue · 2 comments

Hi,

I encrypted an api key using secretary as follows:

echo -n <some_api_key> | ../../secretary encrypt

Then I placed this encrypted key in a yaml file and ran lighter verify:

./lighter verify /path/tomy/config/config.yml

I am getting the following error:

RuntimeError: The env var 'bugsnag.apiKey' is not a valid shell script identifier and not supported by Secretary. Only alphanumeric characters and underscores are supported, starting with an alphabetic or underscore character.

Not sure if this is a secretary issue or lighter, but I thought I would file an issue here to get some help. Thank you for your time.

@alinur-meltwater the problem is that the "." character can't be evaluated as an environment variable name (it's not POSIX standard and sh/bash doesn't support it correctly). So your startup script won't work if the encrypted envvar contains a dot

@mikljohansson ah i see, then the error message should be more descriptive, and we should probably put this in the readme. I will try to cook up a PR for this.