v0.0.7 - Allow TCP non-loopback IPv4/IPv6 binds for FIPS reachability
This commit is contained in:
@@ -214,22 +214,22 @@ Use Qubes' native inter-qube primitive instead of inventing one.
|
||||
- Tests: a unit test that injects fake qrexec env vars and a stdio framing harness; an integration script that documents end-to-end install in a Qubes VM (manual, not in CI).
|
||||
- Docs: add a "Qubes deployment" section to [`README.md`](../README.md) and to [`CLIENT_IMPLEMENTATION.md`](../CLIENT_IMPLEMENTATION.md).
|
||||
|
||||
### 7.2 Phase T2 — TCP loopback transport
|
||||
### 7.2 Phase T2 — TCP transport
|
||||
|
||||
Smallest IP-based step; on-ramp for non-Linux clients and for FIPS later.
|
||||
|
||||
- New CLI: `nsigner --listen tcp:127.0.0.1:PORT`.
|
||||
- Default-deny non-loopback binds (reject `0.0.0.0` / non-`127.x` / non-`::1` unless `--allow-remote`, see T3).
|
||||
- Caller identity for loopback: `tcp_local { addr }`. Approval prompt still mandatory.
|
||||
- New CLI: `nsigner --listen tcp:HOST:PORT` (IPv4 literal) or `nsigner --listen tcp:[IPv6]:PORT`.
|
||||
- Current behavior: accepts operator-selected local/remote bind addresses (including `[::]` and `fd..`), pending later transport hardening.
|
||||
- Caller identity for TCP: endpoint address/port in caller descriptor. Approval prompt still mandatory.
|
||||
- `nsigner list` extended to enumerate active TCP listeners (from internal registry; not from `/proc/net/tcp`).
|
||||
- Same framing as AF_UNIX path; no protocol changes.
|
||||
- Tests: integration coverage that spawns a child signer with `--listen tcp:127.0.0.1:0`, captures the bound port, runs the same NIP-04/NIP-44/sign_event matrix as AF_UNIX.
|
||||
- Tests: integration coverage that spawns a child signer with `--listen tcp:127.0.0.1:0` (and one IPv6 case), captures the bound port, runs the same NIP-04/NIP-44/sign_event matrix as AF_UNIX.
|
||||
- Docs: extend [`documents/CLIENT_IMPLEMENTATION.md`](../documents/CLIENT_IMPLEMENTATION.md) section 2 with `tcp:` discovery rules and section 3 confirming framing parity.
|
||||
|
||||
Implementation checklist (Tier-1 delivery):
|
||||
|
||||
- [x] Parse `--listen tcp:HOST:PORT` in [`src/main.c`](../src/main.c).
|
||||
- [x] Reject invalid/non-loopback listen targets in [`src/server.c`](../src/server.c).
|
||||
- [x] Parse and validate literal IPv4/IPv6 listen targets in [`src/server.c`](../src/server.c).
|
||||
- [x] Bind/listen non-blocking TCP sockets and run server loop without TUI dependence.
|
||||
- [x] Keep existing framed JSON-RPC protocol unchanged via shared [`src/transport_frame.c`](../src/transport_frame.c).
|
||||
- [ ] Add integration test coverage for `tcp:127.0.0.1:PORT` request flow.
|
||||
@@ -250,7 +250,7 @@ Only after T2 is solid.
|
||||
|
||||
FIPS is a *substrate* for an existing TCP listener, not a new transport in nsigner code.
|
||||
|
||||
- Deployment topology: nsigner binds TCP loopback inside the FIPS network namespace (or on a host where `fips0` is up); peers reach it via `fd00::/8` IPv6 derived from the signer's npub.
|
||||
- Deployment topology: nsigner binds a chosen TCP endpoint inside the FIPS network namespace (or on a host where `fips0` is up); peers reach it via `fd00::/8` IPv6 derived from the signer's npub.
|
||||
- Optional `caller_kind=fips` enrichment: a small sidecar query (`fipsctl show sessions` style) maps the connecting IPv6 address to a peer npub and feeds it into `caller_identity_t.fips { peer_npub }`. If unavailable, fall back to `tcp_remote` identity.
|
||||
- nsigner does not embed FIPS, does not depend on libfips, and does not require Rust.
|
||||
- New optional flag: `--peer-id-source fips:/var/run/fips/fips.sock` (path/method TBD per FIPS API).
|
||||
@@ -259,7 +259,7 @@ FIPS is a *substrate* for an existing TCP listener, not a new transport in nsign
|
||||
|
||||
Execution tasks for initial FIPS trial:
|
||||
|
||||
- [x] Deliver T2 TCP loopback listener as FIPS substrate prerequisite.
|
||||
- [x] Deliver T2 TCP listener as FIPS substrate prerequisite.
|
||||
- [x] Document signer/caller qube deployment flow in [`documents/FIPS_DEPLOYMENT.md`](../documents/FIPS_DEPLOYMENT.md).
|
||||
- [ ] Add two-node operator validation script (manual) using `fipsctl` + framed JSON-RPC client.
|
||||
- [ ] Evaluate optional caller identity enrichment from FIPS session metadata.
|
||||
|
||||
Reference in New Issue
Block a user