Hi. I want to have a tool for automating configuration of VMs. But I don’t know
- Is this a reinvention of the wheel?
- Is this safe?
- Can qrexec do this safely?
- Is there a simpler way?
- Is auditing the tool difficult?
So I want to know what you think about this.
Thanks.
What?
- I want a meta-tool that helps me write a Python library for automating configurations, connection, and validation of VMs.
Why?
- Automation speeds up configurations such as recreating compromised Qubes or adding lots of ip to Qube firewall.
- A Python library approach to automation is far more reusable, readable, testable, and documentable than a bunch of scripts and configuration files.
- The meta-tool can encourage validation of configurations and secure transmission of configuration commands from dom0 to the VMs.
Minimal Goals
Meta-tool
- Enable the user’s Library to issue commands to dom0 and VMs
- Enforce secure transmission of commands to VMs
- Enable execution of commands in VMs
- Enforce secure receipt of success/failure of the commands
User’s Library
- Create VMs with dom0 commands
- Execute commands within VM
Stretch Goals
Meta-tool
- Encourage validation of steps in the workflow by combining implementation and validation of the step into a ‘state’.
- Wrap shell commands and ssh keys into Python function / class
- Enable dry running a workflow
- Plot a workflow
Command and Response
Chain of command
- Dom0 → Management VM → Minion VM.
User’s Library and Script
- Trust the user’s library and script
- The library and script have no hard-coded secrets (such as ssh keys).
Command
- Each command consists of pickled python function and pickled arguments
- Dom0 signs each command
Response
- Each response is a number that indicates success / failure and a text that explains the reason.
- If the text has more than X characters, the meta-tool truncates the text.
- Minion VM signs each response
- The response is not a python pickle because of pickle bomb
Dom0
- Import user’s library
- Sign user’s library
- Distribute the signed user’s library from Dom0 to the Management VM
- Run user’s script, which sends commands to Management VM
- Receive responses from Management VM
Management VM
- This is a Disposable VM
- Receive user’s library from dom0
- Send user’s library to Minion VM
- Relay commands from Dom0 to Minion VM
- Relay response of the commands from Minion VM to Dom0
Minion VM
- Receive user’s library from dom0
- Import user’s library
- Receive command from the Management VM
- Execute the commands
- Sign response of the commands
- Send response to the Management VM