Closed uvsmtid closed 8 years ago
The secret repository can be plugged-in using configure_saly.py
script and properties.yaml
file.
Alternatively, (instead of hiding secret data physically and recreating it on the spot) there can be two approaches.
Approach A: Sensitive data can be encrypted and committed to pillars in encrypted form as text, for example, using gpg
renderer - see this link to explained use case. NOTE: It requires installation of Python libraries for GPG for Salt before 2015.8.3 (e.g. python2-gnupg
package for Fedora 24).
Approach B: This way is provided by vault pillar module (which will only be available in Carbon release - not available as of 23 JUL 2016). It stores sensitive data in Vault (which encrypts persistent storage) and provides it through pillar. This way it is not maintained through source revision control in pillars (which slightly complicates things as requires more infrastructure services).
At this moment, approach A using gpg
renderer seems the best choice - simpler and readily available.
Commit e352055f7806129e3adc047a02bbee3efd402914 starts using pillar data encrypted using GPG (approach A).
Vault is postponed for now.
Two things to note:
gpg
setup has to be done manually - bootstrap package does not handle it at the moment. See #16.
At the moment only
primary_user
's password is configured throughsystem_secrets
.There is also no clear procedure (and automatic support for it) how to plug in arbitrary storage (e.g. specific path on the filesystem with all secret data provided) so that Salt can use it. Adding key-values pairs through pillar has this bad encouragement that one day someone will commit the secret data into pillars repository.
Security
It is required to to provide secret pillar data to specific minions only, otherwise any minion can request anything via
salt-call pillar.items
.UPDATE: It seems there is no issue to continue using Jinja templates in pillars (as long as no grains except
id
are used) because pillars are rendered on Salt master before being sent to minions - see this answer and this question.