21 Commits

Author SHA1 Message Date
jenkins
bd63b568e1 security(hermes): strip inbound X-Hux-* at the router boundary
Defense in depth: the tenant router deletes every browser-supplied
X-Hux-* header before asserting its own HUX identity headers, so no
client can forge subject, trust class, or relay key. Regression covers
X-Hux-Subject, X-Hux-Trust and X-Hux-Relay-Key forgeries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BvMSXH8VH2tMWXanb8SJdf
2026-08-24 04:12:03 -03:00
Hermes Agent
79be4d1c71 refactor(hermes): rename chat and triage public hosts 2026-08-21 06:43:19 +00:00
Hermes Agent
d22588dddb fix(hermes): poll the session contract the chat tenants actually serve
Returning to chat.hermes.bstein.dev after a Keycloak logout/login showed
"This session is unavailable to this account. Start a new chat." even
though the session was intact and owned by the same subject.

The banner comes from the continuity fallback the router injects into
every chat page. It polled `/api/sessions/<id>` and
`/api/sessions/<id>/messages` — routes that belong to the Hermes agent
dashboard (added by scripts/patch_web_session_activity.py, applied only
in agent-deployment.yaml). The router proxies browser traffic to the
tenant Hermes WebUI instead, whose only session read is
`GET /api/session?session_id=<id>`; the dashboard paths are unrouted
there, so server.py answered its generic 404 for every poll and the
fallback reported a false ownership failure.

The script runs only on a full document load of `/session/<id>`, which is
exactly what the OIDC round-trip produces when oauth2-proxy returns the
browser to `rd=/session/<id>` — hence the "only after relogin" symptom.

Poll the WebUI contract instead, and let its own answers decide what the
banner claims: 409 `session_profile_mismatch` is the single response that
means the session is outside this account's active scope, 404 now means
the conversation is no longer stored, and 401/403 still re-enter OIDC.
The steady-state poll drops to one request and backs off to 3s/15s now
that it reaches a real endpoint on the tenant Raspberry Pi.

`boundSessionSnapshot` follows the same move: it caps the WebUI envelope
`{"session": {..., "messages": [...]}}`, relaying every other session key
verbatim rather than re-serializing a fixed struct that would silently
drop metadata the banner depends on.

Isolation is unchanged and now covered: the router still resolves the
slot from the salted Keycloak subject, overwrites any client-supplied
X-Hermes-Tenant-Identity, and forwards only the two tenant cookies.

Tests: relogin keeps a stable slot and resolves the durable session; a
second subject replaying the owner's session id, WebUI cookie and a
forged tenant header gets 404 from its own backend and never reaches the
owner's; the legacy dashboard paths are pinned as permanent 404s against
a stub of the deployed WebUI dispatch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 18:14:55 +00:00
jenkins
f83c59a1c9 hermes: declutter chat to a chat-only surface
Extend the chat router HTML-injection bridge so tenants see a clean
chat + conversation-history experience instead of the full agent
cockpit. hideChatAdministration now hides the rail buttons and panels
for logs, insights, memory, skills, workspaces, todos, tasks and
profiles (alongside the existing Kanban), and bridgeCSS hides the same
[data-panel] targets pre-JS to avoid a flash. Also hide the redundant
legacy settings model dropdown (#settingsModel) via bridgeCSS while
keeping the composer routing chip. Chat, history/sessions, new-chat,
composer and the model chip are untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 06:55:43 -03:00
Hermes Agent
c943ad4537 test: guard chat disconnect continuity 2026-08-17 14:42:08 +00:00
Hermes Agent
c867ae52fb hermes: harden chat continuity and activity 2026-08-17 14:39:21 +00:00
jenkins
0dd6ea0f02 hermes: add durable Telegram topics 2026-08-16 15:59:09 -03:00
jenkins
8c73906e6e hermes: preserve exact routes and accept Telegram images 2026-08-15 22:15:40 -03:00
jenkins
c21203b7ea hermes: deliver generated media to Telegram 2026-08-15 00:34:08 -03:00
jenkins
bf9f31e9e9 hermes: deploy Telegram readiness diagnostics 2026-08-13 13:05:17 -03:00
jenkins
88f06e178a hermes: verify Telegram bot readiness 2026-08-13 12:39:11 -03:00
jenkins
cd28f5b5cc hermes: make Telegram setup actionable 2026-08-13 04:52:04 -03:00
jenkins
cd434435e4 hermes: expose Telegram operator setup 2026-08-13 04:32:02 -03:00
jenkins
c11408258c hermes: restore native provider routing 2026-08-12 23:08:21 -03:00
jenkins
f406297c74 hermes: preserve SSO and image continuations 2026-08-12 01:07:50 -03:00
jenkins
dad7d39c05 fix(hermes): enable browser tools and private files 2026-08-09 12:55:36 -03:00
jenkins
9bedec9cad fix(hermes): expose private files and reconnect Herdr 2026-08-09 09:33:30 -03:00
jenkins
9bdcddad7c feat(hermes): add Jetson-assisted auto routing 2026-08-09 02:42:30 -03:00
jenkins
e182d19950 fix(hermes): recover agent and chat sessions 2026-08-09 01:04:27 -03:00
jenkins
5bb04b37c7 fix(hermes): restore isolated user features 2026-08-08 21:28:33 -03:00
jenkins
bb73efb285 feat(hermes): split chat agent and triage surfaces 2026-08-08 17:59:57 -03:00