bazooka-ci / bazooka

Continuous Integration and Continuous Deployment Server
http://docs.bazooka-ci.io/
MIT License
60 stars 5 forks source link

Protect the encrypted values in a job's metadata #221

Closed jawher closed 9 years ago

jawher commented 9 years ago

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 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