proxy: allow forwarding vault secrets to the management DispVM#51
Open
Guiiix wants to merge 3 commits into
Open
proxy: allow forwarding vault secrets to the management DispVM#51Guiiix wants to merge 3 commits into
Guiiix wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
=======================================
Coverage 83.72% 83.72%
=======================================
Files 1 1
Lines 215 215
=======================================
Hits 180 180
Misses 35 35
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When using vaults in inventory vars, dom0's Ansible decrypts vault content and
values are threated like any other inventory variable: the host's associated values are copied to the disposable VM in clear text inside the merged
host_vars/<host>.yamlfile. This is fine when using inventory variables and when dom0 may see the decrypted values, butit does not allow keeping content encrypted until it reaches the target or working with vaults in roles.
This PR adds an opt-in way to forward vault passwords to the management DispVM so
that decryption happens inside the disposable VM instead of in dom0 /
ManagementVM.
What's new
New play variable
qubes_proxy_pass_vault_secret: a list of vault ids whosepasswords should be forwarded to the disposable VM. Only the listed ids are sent.
The matching secrets are written into the archive sent to the DispVM, and the executor adds the corresponding arguments to the in-VM ansible-playbook call:
--vault-password-filefor the default id,--vault-id <id>@<file>for any other id.qubes.AnsibleVM now cds into the extracted directory so vault files are resolved by relative path.
Fixes QubesOS/qubes-issues#10307