Skip to content

Commit f435bc4

Browse files
committed
doc: update qrexec-remotevm
1 parent 7c99be6 commit f435bc4

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

doc/qrexec-remotevm.rst

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,27 @@ SSH-based communication between Local‑Relay and Remote‑Relay
102102
------------------------------------------------------------
103103

104104
Prerequisites
105-
~~~~~~~~~~~~~
105+
^^^^^^^^^^^^^
106106

107107
- SSH key-based authentication is configured between all involved hosts (Local‑Relay, Remote‑Relay, and any intermediate jump hosts).
108108
- (Optional) Configure any necessary proxies or jump hosts by following the OpenSSH Cookbook guidelines: Proxies and Jump Hosts <https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts>.
109109

110-
Example Transport RPC: ``qubesair.SSHProxy``
111-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110+
Workflow Overview
111+
^^^^^^^^^^^^^^^^^
112+
113+
1. **Local-Qube to Local-Relay**: The `transport_rpc` property of `Remote‑Relay` is used to refer to RPC call to be made from Local-Qube to Local-Relay with arguments of the form:
114+
115+
``Remote-Qube+<service>``
116+
117+
where `<service>` contains the original service with argument that has been processed by policies.
118+
119+
2. **Destination lookup**: The RPC script extracts `Remote-Qube` and queries QubesDB `/remotes/Remote-Qube` on Local‑Relay to verify and translate it into the actual qube name in `Remote-QubesOS` (in this example it is assumed to be the same).
120+
The QubesDB path is set based on `Remote-Qube` property `remote_name`.
121+
122+
3. **RPC**: The RPC connects to Remote‑Relay and runs ``qrexec-client-vm`` on that host.
123+
124+
4. **Remote-QubesOS policy evaluation**: `Remote‑QubesOS` applies its policy rules for a request from `Local‑Relay` to `Remote‑Qube` with information that source qube is `Local-Qube`.
125+
The information about source qube has to be resolved to a registered RemoteVM into `Remote-QubesOS` referencing `Local-Qube`.
112126

113127
Below is an example Bash script implementing the ``qubesair.SSHProxy`` transport RPC. It parses a destination and service, looks up the remote Qube name, and invokes ``qrexec-client-vm`` over SSH.
114128

@@ -143,31 +157,19 @@ Below is an example Bash script implementing the ``qubesair.SSHProxy`` transport
143157
# Forward the qrexec call via SSH
144158
ssh "$remote_qube" qrexec-client-vm --source-qube="$QREXEC_REMOTE_DOMAIN" "$remote_qube" "$service"
145159
146-
Workflow Overview
147-
"""""""""""""""""
148-
149-
1. **Local-Qube to Local-Relay**: A Qubes RPC call is made from Local-Qube to Local-Relay with arguments of the form:
150-
151-
``Remote-Qube+<service>``
152-
153-
where `<service>` contains the original service with argument that has been processed by policies.
154-
155-
2. **Destination lookup**: The RPC script extracts `Remote-Qube` and queries QubesDB on Local‑Relay to verify and translate it into the actual qube name in `Remote-QubesOS` (in this example it is assumed to be the same).
156-
157-
3. **SSH**: The script uses SSH to connect to the identified host (configured to forward to the Remote‑Relay). It then runs ``qrexec-client-vm`` on that host, passing along the original source domain via the environment variable ``$QREXEC_REMOTE_DOMAIN``.
158-
159-
4. **Remote-QubesOS policy evaluation**: `Remote‑QubesOS` applies its policy rules for a request from `Local‑Relay` to `Remote‑Qube` with information that source qube is `Local-Qube`.
160+
.. note::
161+
Using QREXEC_REMOTE_DOMAIN directly here assumes that a RemoteVM called `Local-Qube` exists in `Remote-QubesOS`.
160162

161163
SSH Client Configuration Hint
162164
+++++++++++++++++++++++++++++
163165

164-
To ensure that any SSH connection to a given host actually lands on the corresponding `Remote‑Relay`, add an entry like the following to your ``/etc/ssh/ssh_config``:
166+
To ensure that any SSH connection to a given host actually lands on the corresponding `Remote‑Relay`, add an entry like the following to your ``~/.ssh/config``:
165167

166168
.. code-block:: ini
167169
168170
Host *
169171
HostName <Remote-Relay_ip>
170172
171173
Adjust the pattern, hostname, and jump host settings to match your environment.
172-
This guarantees that SSH connections intended for a RemoteVM are transparently proxied through Remote‑Relay./
174+
This guarantees that SSH connections intended for a RemoteVM are transparently proxied through Remote‑Relay.
173175

0 commit comments

Comments
 (0)