diff --git a/.custodian-brief.md b/.custodian-brief.md index f6a724b..428115a 100644 --- a/.custodian-brief.md +++ b/.custodian-brief.md @@ -2,11 +2,17 @@ # Custodian Brief — user-engine **Domain:** communication -**Last synced:** 2026-10-11 21:14 UTC +**Last synced:** 2026-10-14 07:30 UTC **State Hub:** http://127.0.0.1:8000 *(adjust if running on a remote machine)* ## Active Workstreams +### Runtime image OS-package hardening for RISK-F-0016 +Progress: 0/1 done | workplan_id: `5ce5f3eb-e1dd-59bc-9cce-b0172431b9f0` + +**Open tasks:** +- · Remove or replace unfixed-HIGH OS packages in the runtime image `59584b44` + ### User account journeys and recovery Progress: 1/3 done | workplan_id: `145df9d5-a7e9-5d20-8280-9d3ea069838b` @@ -36,7 +42,8 @@ Progress: 2/3 done | workplan_id: `0aea0a52-13f9-515b-bda8-665f8a4f2d5e` Progress: 1/2 done | workplan_id: `35aa6adf-255a-5705-9294-a50d98e45f00` **Open tasks:** -- · Deliver the setup link to the recipient `fae614ba` +- ! Deliver the setup link to the recipient `fae614ba` + *(wait: Existing mail service lacks an admitted provider password-setup template and recipient-bound opaque issuer handoff. EMAIL-IN-0001 and NET-IN-0005 request exact owner implementation records; no new founder choice or credential request.)* ### Read-only account authority for Hub integration Progress: 2/3 done | workplan_id: `54d99faf-4c53-5927-a82c-feca41de2cf3` @@ -45,6 +52,10 @@ Progress: 2/3 done | workplan_id: `54d99faf-4c53-5927-a82c-feca41de2cf3` - ! Authenticated workload transport and private acceptance `c5d67725` *(wait: T02 delivered empty no-grant custody integration; real independently authenticated Hub caller credential admission and withdrawal/outage/private integration acceptance remain with state-hub (original f3bcc516; renewed request 350c3e12-284c-43a7-9ab1-116df8bcc007). Hub repository registration is not caller admission.)* +## Inbox Hygiene + +**Stale unread:** 4 message(s) older than 3 day(s) — triage at session start. + --- ## MCP Orientation (when available) diff --git a/WORK-RECORDS.md b/WORK-RECORDS.md index c330590..6addaac 100644 --- a/WORK-RECORDS.md +++ b/WORK-RECORDS.md @@ -48,6 +48,7 @@ | workplan | USER-WP-0035 | blocked | — | workplans/USER-WP-0035-onboarding-handoff-findings.md | | workplan | USER-WP-0036 | finished | — | workplans/USER-WP-0036-account-situational-awareness.md | | workplan | USER-WP-0037 | blocked | — | workplans/USER-WP-0037-hub-authority-lookup.md | +| workplan | USER-WP-0038 | ready | — | workplans/USER-WP-0038-runtime-image-os-package-hardening.md | | task | USER-WP-ADHOC-2026-09-06-T01 | done | — | workplans/ADHOC-2026-09-06.md | | task | USER-WP-ADHOC-2026-10-09-T01 | done | — | workplans/ADHOC-2026-10-09.md | | task | USER-WP-ADHOC-2026-10-09-T02 | done | — | workplans/ADHOC-2026-10-09.md | @@ -238,6 +239,7 @@ | task | USER-WP-0036-T03 | done | — | workplans/USER-WP-0036-account-situational-awareness.md | | task | USER-WP-0037-T01 | done | — | workplans/USER-WP-0037-hub-authority-lookup.md | | task | USER-WP-0037-T02 | done | — | workplans/USER-WP-0037-hub-authority-lookup.md | +| task | USER-WP-0038-T01 | todo | — | workplans/USER-WP-0038-runtime-image-os-package-hardening.md | | task | USER-WP-0037-T03 | wait | — | workplans/USER-WP-0037-hub-authority-lookup.md | | intake | USER-IN-0001 | answered | — | intakes/intakes.md | | intake | USER-IN-0002 | open | — | intakes/intakes.md | diff --git a/src/user_engine/web.py b/src/user_engine/web.py index d12ef55..1366ced 100644 --- a/src/user_engine/web.py +++ b/src/user_engine/web.py @@ -142,7 +142,10 @@ class PortalApplication: def __call__(self, environ: Mapping[str, Any], start_response: StartResponse) -> Iterable[bytes]: correlation_id = environ.get("HTTP_X_REQUEST_ID") or f"corr_{secrets.token_hex(12)}" navigation_token = _ACCOUNT_NAVIGATION.set("") - cache_token = _REQUEST_CACHE.set({}) + # The cookie header stays in the per-request cache only so the + # Authelia uid can be looked up once while rendering; it is never + # rendered or logged. + cache_token = _REQUEST_CACHE.set({"cookie_header": str(environ.get("HTTP_COOKIE", ""))}) browser_token = _BROWSER_REQUEST.set( "text/html" in str(environ.get("HTTP_ACCEPT", "")) and not str(environ.get("PATH_INFO", "/")).startswith("/api/") @@ -2321,17 +2324,47 @@ Use the login name they provide; it may differ from your display name.
You are not signed in." f"{level}" ) - name = escape(actor.preferred_username or actor.subject) verification = "Verified by your identity provider" if actor.assurance else "Verification pending" return ( 'Signed in as {name}.
" - "This session is for the account site. An application can keep its own session.
" + + self._session_uids(actor) + + "This session is for the account site. An application can keep its own session.
" f"{level}" f"{escape(verification)}
" 'uiduid (shared NetKingdom sign-in)These sessions differ. ' + f"Applications that use the shared NetKingdom sign-in, such as OpenBao, " + f"will continue as {escape(authelia_uid)}, " + f"not {escape(account_uid)}.
" + + self._identity_switch_help() + ) + return lines + @staticmethod def _is_exception_account(actor: Any, memberships: tuple[Any, ...]) -> bool: if {"tenant-admin", "platform-operator", "platform-root"}.intersection(actor.roles): @@ -2526,9 +2559,13 @@ Use the login name they provide; it may differ from your display name.sample.user", body) + self.assertNotIn(b"Signed in as platform-root", body) self.assertNotIn(b'href="/login"', body) - self.assertEqual([], self.app.identity_lookup.headers) + self.assertNotIn(b"super-secret-session", body) + self.assertEqual(1, len(self.app.identity_lookup.headers)) + + # NK-WP-0051-T03: two labelled uid lines and a visible mismatch marker. + def _uid_lines(self, path, lookup_result, cookie="ue_session=member; authelia_session=super-secret-session"): + self.app.identity_lookup = RecordingLookup(lookup_result) + response, body = invoke(self.app, path, cookie=cookie) + self.assertEqual("200 OK", response["status"]) + return body + + def test_signed_in_page_names_both_session_uids(self): + for path in ["/", "/onboarding"]: + with self.subTest(path=path): + body = self._uid_lines(path, "sample.user") + self.assertIn(b'uid", body)
+ self.assertIn(b"Authelia session uid", body)
+ self.assertNotIn(b"session-uid-mismatch", body)
+ self.assertEqual(1, len(self.app.identity_lookup.headers))
+
+ def test_differing_authelia_uid_is_marked(self):
+ for path in ["/", "/onboarding"]:
+ with self.subTest(path=path):
+ body = self._uid_lines(path, "bernd.worsch-3")
+ self.assertIn(b'