This solution extends BzkString to make a string instead of a just an alias for string with 3 fields:
name: the environement variable name
value: the environement variable value
secured: a boolean flag indicating if the variable is secured or not
When unmarshalling a .bazooka.yml, the custom BzkString unmarshaller fills these fields accordingly.
BzkString now also implements the yaml.Marshaller interface. This way, when a config struct is persisted to disk, the secured values get encrypted again
When language parser generates the variants bazooka files, and the parser parses them, the secured values are correctly marked so.
Finally, when the parser generates the metadata file for a variant, the secured variables are encrypted before storing them.
Fixes #193
Be sure to test with a patched golang parser suing this patch: bazooka-ci/bazooka-lang-go#5
This solution extends BzkString to make a string instead of a just an alias for string with 3 fields:
When unmarshalling a
.bazooka.yml
, the custom BzkString unmarshaller fills these fields accordingly.BzkString
now also implements theyaml.Marshaller
interface. This way, when a config struct is persisted to disk, the secured values get encrypted againWhen language parser generates the variants bazooka files, and the parser parses them, the secured values are correctly marked so.
Finally, when the parser generates the metadata file for a variant, the secured variables are encrypted before storing them.
Fixes #193
Be sure to test with a patched golang parser suing this patch: bazooka-ci/bazooka-lang-go#5