v0.0.25 - Add --allow-all flag and short aliases for CLI options

This commit is contained in:
Laan Tungir
2026-05-06 12:09:08 -04:00
parent cca1254740
commit f4413b7969
27 changed files with 1190 additions and 95 deletions

View File

@@ -61,7 +61,17 @@ In server mode:
This mode is server-side only in the current CLI (the `client` subcommand still targets AF_UNIX).
### 2.4 TCP mode authentication (required)
### 2.4 qrexec authentication posture (`--auth`)
qrexec now supports configurable auth-envelope handling:
- `--listen qrexec --auth off` (default): legacy behavior. Requests are authorized as `qubes:<vm-name>` only.
- `--listen qrexec --auth optional`: if the request includes an `auth` field, it is verified using the same auth envelope rules as TCP. On success, caller identity is upgraded to `qubes:<vm-name>+pubkey:<hex>`.
- `--listen qrexec --auth required`: every request must carry a valid `auth` envelope, and caller identity is `qubes:<vm-name>+pubkey:<hex>`.
When `--auth optional` is used, a malformed or invalid `auth` object is rejected with auth-layer errors (`2010..2017`) rather than silently falling back to `qubes:<vm-name>`.
### 2.5 TCP mode authentication (required)
For TCP transport, requests MUST include an `auth` object containing a signed Nostr-style event envelope.

View File

@@ -49,6 +49,16 @@ Still missing for complete Qubes integration:
- qrexec policy in dom0 remains first enforcement boundary.
- `n_signer` policy/approval remains second boundary.
### 3.4 Optional per-program identity inside one qube (`--auth optional`)
qrexec now supports an optional auth-envelope layer:
- `nsigner --listen qrexec --auth off` (default): identity remains `qubes:<source-vm>`.
- `nsigner --listen qrexec --auth optional`: if a caller includes a valid auth envelope, identity becomes `qubes:<source-vm>+pubkey:<hex>`.
- `nsigner --listen qrexec --auth required`: all requests must carry valid envelopes and identity is always `qubes:<source-vm>+pubkey:<hex>`.
This enables per-program approvals inside a single caller qube while preserving existing behavior for legacy callers that do not emit auth envelopes.
---
## 4. Required implementation tasks
@@ -102,6 +112,12 @@ In qrexec mode, default prompt behavior is now:
This replaces the previous permissive `PROMPT_NEVER` temporary setting.
If qrexec auth envelopes are enabled (`--auth optional` or `--auth required`), approved callers can also be recorded as composite identities:
- `qubes:<vm>+pubkey:<hex>`
This gives independent approval rows for distinct programs running in the same source qube.
## 4.4 Client helper examples ✅ Implemented
Added:
@@ -135,6 +151,7 @@ Includes:
- from caller qube, invoke test request (`get_public_key`)
- confirm signer qube receives request
- confirm activity log displays `qubes:<source-vm>` caller prefix
- with `--auth optional`, confirm envelope-enabled clients show `qubes:<source-vm>+pubkey:<hex>`
- validate deny behavior from unauthorized qube
## 5.4 Failure checks

View File

@@ -94,12 +94,13 @@ An identity is a tagged caller record built from the transport. Different transp
|---|---|---|
| `unix_peer` | `uid`, `pid` from `SO_PEERCRED` on an abstract Unix socket. | Kernel — the client cannot forge it. |
| `qubes` | source qube name from `QREXEC_REMOTE_DOMAIN`. | Qubes RPC framework. |
| `qubes_pubkey` | source qube + verified auth-envelope pubkey (`qubes:<vm>+pubkey:<hex>`). | Qubes RPC framework + application-layer signature verification. |
| `tcp_local` | Loopback address of caller. | TCP socket peer address — opt-in transport. |
| `tcp_remote` | Address plus an authenticated pubkey (planned). | Application-layer authentication. |
| `tcp_remote` | Verified auth-envelope pubkey (`pubkey:<hex>`). | Application-layer authentication. |
| `fips` | Peer npub from a NIP-46 style flow (planned). | Application-layer authentication. |
| `usb_serial` | Device path plus an asserted caller (planned). | Trust-on-first-use. |
Identity quality varies. `unix_peer` and `qubes` are vouched for by the kernel or hypervisor — strong. `tcp_local` and `tcp_remote` are transport-asserted only — only as good as the human at the terminal who chose to approve them.
Identity quality varies. `unix_peer` and `qubes` are vouched for by the kernel or hypervisor — strong. `qubes_pubkey` is stronger still for multi-program qubes because it combines hypervisor-vouched source-qube identity with a per-program cryptographic identity. `tcp_local` and `tcp_remote` rely on transport/app-layer checks and are only as strong as deployment choices.
### Index (or path) — *which key*
@@ -423,7 +424,8 @@ Different transports give different identity quality. The wire format (4-byte le
### 11.2 Stdio / qrexec mode
- One framed request, one framed response, then exit.
- Identity: `qubes:<vm-name>` from `QREXEC_REMOTE_DOMAIN`, vouched for by Qubes.
- Identity defaults to `qubes:<vm-name>` from `QREXEC_REMOTE_DOMAIN`, vouched for by Qubes.
- With `--listen qrexec --auth optional|required`, requests carrying a valid auth envelope are upgraded to `qubes:<vm-name>+pubkey:<hex>`.
- Risk surface: only what Qubes RPC policy permits. See [`packaging/qubes/`](../packaging/qubes/).
### 11.3 TCP (advanced / opt-in)