Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Compose API Access lifetime repair with session withdrawal

pulse-triage[bot]881edc49da2e
diff --cc docs/release-control/v6/internal/subsystems/api-contracts.md
index 2cc02cdc3d,af874be32a..44e38b8431
--- a/docs/release-control/v6/internal/subsystems/api-contracts.md
+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md
@@@ -13487,34 -13486,33 +13487,65 @@@ value grammars, detached projections, l
ownership. Consuming browser evidence exercises the unchanged download control
with the exact synthetic native ZIP; it is not installed/customer recovery.
+### Logged-out sessions cannot retain confidential live reads
+
+Successful route authentication records the exact selected browser session in
+server-only request context. The existing protected WebSocket, agent-event,
+System Logs, progress and Assistant stream/result boundaries retain that
+session's store, creation identity, principal and recovery kind. Each protected
+write (and existing idle recheck) refuses a deleted, expired, replaced or
+rebound session. Reads never extend session expiry, re-authenticate with a
+fallback credential or refresh an identity provider. Recovery reads retain their
+original direct-loopback/IP binding. Proxy/basic/development admission and
+explicit-token precedence are unchanged; an ambient cookie or response header
+cannot establish session authority.
+
+Before a synchronous result commits, session withdrawal returns generic `401`
+and withholds handler-specific headers; an admitted stream ends without new
+private data or an appended HTTP error. Monitoring WebSocket uses its existing
+`1008`/`Monitoring access ended` close, so its current web consumer returns to
+sign-in; System Logs observes EOF and a denied reconnect, not live monitoring.
+An already-admitted write can be in flight. This does not erase previously
+received data, cancel independent jobs/legacy executions, introduce dynamic
+role-policy rechecks or qualify installed/identity-provider recovery. Chat
+retains its existing request-bound work lifetime.
+
+`session_read_authority_test.go` covers detached identity, secure-cookie choice,
+expiry without sliding extension, replacement, recovery/store withdrawal,
+credential precedence and idle/result closure. `session_read_logout_test.go`
+and the native Assistant/Logs/event cases exercise real persisted logout and
+independent sessions. `TestContractSessionReadLogoutBoundary` asserts native
+HTTP/WS logout, private-line withholding and fresh denial, optionally exporting
+safe wire evidence for the existing browser consumers; the browser-only fixture
+is retained evidence, not product source.
++
+ ### API token panel requests retain their confirmed context
+
+ The existing API Access token inventory and create, rename, scope-edit and revoke
+ calls accept an abort signal and expected organisation. They use the ordinary
+ credentials, retain backend permission/scope/owner checks, and do not automatically
+ retry a refusal or switch a confirmation to the default organisation. CSRF
+ preparation must finish without dispatching an aborted or differently scoped
+ write. The Relay/mobile issuer and token detail API are unchanged.
+
+ The consuming panel rejects results after disposal, an organisation/user change
+ or management-authority change, including leave-and-return cycles. Only one write
+ runs at once; an inventory read interrupted by a write resumes as a new read,
+ never an old snapshot. An unreadable inventory remains unknown and read-only
+ accounts retain explicit inventory recovery. These guarantees are exercised by
+ `security.transport.test.ts`, `security.test.ts`, `APITokenLifetimes.test.tsx`
+ and the registered API token panel tests; browser proof covers the actual API
+ Access consumer with synthetic responses, not installed administrator recovery.
+
+ Authority and authenticated-user watchers compare their effective primitive
+ values, not the containing security-status object's identity. An ordinary status
+ refresh or primary-token hint change with the same user/permission must not
+ withdraw a confirmed token or start another inventory read. The registered
+ unchanged-principal status-refresh test pins this boundary.
+
+ Accepted token rows retain their inventory-read generation across confirmed
+ scope/name replacements. Keyed desktop-table reconciliation may retain the
+ earlier raw object; that current-read object remains usable for the same live
+ ID. A later full read, context withdrawal or deletion invalidates the old
+ confirmation. The registered sequential scope-edit/revoke consumer regression
+ and earlier-read rejection test cover both sides without ID-only admission.