freedomofpress / securedrop-workstation

Qubes-based SecureDrop Journalist Workstation environment for submission handling
GNU Affero General Public License v3.0
138 stars 43 forks source link

Use pillarenv/saltenv to remove branching logic in provisioning #1053

Open rocodes opened 4 months ago

rocodes commented 4 months ago

Description

Filing for discussion

Right now our provisioning logic copies everything needed for provisioning into one common Salt directory, and uses conditionals in .sls files to choose the right path(s) for provisioning, leading to lots of branching logic {% if d.environment == "staging" %} ... {% elif d.environment == "prod" %}. Part of why the provsioning is complex is because it's trying to deal with different build flavours/environments, and can't tell which one to use until orchestration/apply time.

I think we could use saltenv/pillarenv and simplify our lives:

How will this impact SecureDrop/SecureDrop Workstation users?

How would this affect the SecureDrop Workstation threat model?

cfm commented 4 months ago

I support this approach wholeheartedly. As you point out, @rocodes, it has precedent in how we parameterize securedrop's Ansible playbooks. It would be wonderful to be able to separate configuration from provisioning logic.