Identity: one person, their own credentials everywhere
Status: mostly built. This page started as the design for the gateway, and the gateway now runs (decision #58). Read gateway.md for how it works today. What is left here is the reasoning: the problem, the options that were weighed, and the plan with what has been done. Items marked VERIFY were never checked.
Direction confirmed on 2026-10-12: a gateway is wanted, a trusted header from Open WebUI is acceptable as a fallback, each person supplies their own key for services like Tududi so they act as themselves, and satellites go through the gateway with the household identity. See “Decisions taken” at the end.
The goal
Section titled “The goal”A signed-in person is the same person in every part of Novak. tmeuze sees
Outline, Tududi and memory as tmeuze, ushy sees theirs, and neither session
can reach the other’s data. Shared things (the household bank, voice satellites)
are shared on purpose and said so. One experience, not a different rule per
client.
Where things stood
Section titled “Where things stood”When this was written, the registry said what exists, the reconciler applied it and checked drift, and the router injected the persona and routed models. None of them knew who was asking. The router still doesn’t apply memory to queries: the model calls Hindsight’s tools when it decides to, and the persona tells it to.
| Piece | Who it thought you were then |
|---|---|
| Pocket ID | The identity provider (OIDC) |
| Console | Signs in through Pocket ID and maps the person to the bank of the same name. The only place isolation is real |
| Open WebUI | Pocket ID sign-in, separate accounts. MCP tools are admin-registered, each holding one key |
| Home Assistant | Its own accounts. The stock agent sends no user (below) |
| Hindsight | One shared key for every bank. Read from its source: ApiKeyTenantExtension checks one key and returns the same schema for all |
| Outline, Tududi | A per-account key, but whichever key a registry entry holds is used by everyone who can see the entry |
| Router | No identity (decision #21 is half built: “a verified identity travels with the request”) |
A credential stood in for a person only where a client happened to enforce it. Here is how each piece looks now.
| Piece | Today |
|---|---|
| Pocket ID | Still the identity provider. |
| Console | Signs in through Pocket ID and maps the person to the bank of the same name. |
| Open WebUI | Signs in through Pocket ID only (local login is off on the reference host). It reaches each person’s tools through the gateway, naming the person in a header that only that trusted client may send. |
| Home Assistant | Has a household agent and one for each person. All three carry only Assist for now: Home Assistant can’t send the header that narrows the tool list, and the full list overflows the voice model’s 8,192-token window. |
| Hindsight | Still one shared key for every bank, but its port is bound to localhost, so only the gateway and the other containers on the host reach it. |
| Outline, Tududi | Each person’s own key, held by the gateway and used on that person’s behalf. |
| Router | Still no identity (decision #21 stays half built). |
Principles
Section titled “Principles”- A credential belongs to a person, never to a client or a shared entry.
- Identity is established once (Pocket ID, or a per-person key) and carried. It is not re-asserted by whatever is calling.
- Shared is explicit. Household things are marked shared, and everything else is personal.
- What cannot be identified stays shared. A microphone cannot tell who is speaking, so voice satellites use the household identity.
How each client can carry identity
Section titled “How each client can carry identity”Console. Built. It signs people in through Pocket ID and maps each to their bank.
Open WebUI. From its MCP documentation: only admins register MCP servers, and an admin can limit each one to users or groups with Access Control. A connection can send custom headers with template tokens (user id, email, role, groups) filled in per request, or the user’s own SSO access token, or run an OAuth 2.1 grant per user. So Open WebUI can tell a gateway who is asking. Two caveats: a header is only trustworthy if nothing but Open WebUI can reach the gateway, and whether the SSO token is accepted depends on what the gateway checks. VERIFY both against the running version.
Home Assistant. The stock litellm conversation agent does not pass the
Home Assistant user to the API. Read from its source (entity.py): the only
identifying field it sends is user, set to the conversation id. So “the HA
username is the Pocket ID username” cannot be done through that agent: the name
never leaves Home Assistant.
What does work, with no username matching: a pipeline per person. Each person gets an Assist pipeline whose agent holds that person’s key (or a per-person URL). Their phone, the app and their browser select that pipeline; the satellites keep the household one. Identity then comes from which key the pipeline holds. The trust is the same as the device itself: whoever holds your phone is you. Home Assistant’s MCP client takes a URL and no headers, so a person’s tools there need a per-person URL that carries the credential.
Pocket ID can be the authorization server
Section titled “Pocket ID can be the authorization server”Pocket ID has been adding what MCP’s authorization model expects. From its release notes and tests (checked on GitHub, latest release v2.18.0): API resources, so a token can be issued for a named resource (an audience); OIDC clients registered by a client ID metadata document (the MCP client registration style); RFC 8414 authorization server metadata (v2.14.0); and a grant with no scopes, which is what MCP clients send. It has also published a video on protecting MCP servers with it. Dynamic client registration was not found. VERIFY which version runs here.
This changes the gateway’s job for the better. Instead of trusting a header, the gateway can be an OAuth-protected MCP resource: a client signs the person in through Pocket ID, gets a token whose audience is the gateway, and the gateway checks the signature and reads the person from it. That identity cannot be claimed by a caller; it has to be issued. It also fits Home Assistant, whose MCP client speaks OAuth, so a person in the app or web could authenticate to the gateway as themselves. Open WebUI can do per-user OAuth 2.1 against an MCP connection. VERIFY how each handles a Pocket ID resource (static versus dynamic client registration is the likely snag).
A trusted header remains the simpler fallback for Open WebUI, safe only if nothing but Open WebUI can reach the gateway.
The gateway
Section titled “The gateway”The gateway is where identity meets tools and models, and it was the missing piece. It does the following:
- authenticate the caller (a Pocket ID token for the audience of the gateway; failing that, a trusted header from a known client; for the household, a household key),
- map the caller to a person through a small directory,
- present that person’s tools only, and add their backend credentials (their Hindsight bank, their Outline key, their Tududi key) so no client holds them,
- let shared entries (household memory) through for anyone, and
- log who did what (accounting; see below).
It also closes the Hindsight gap: the Hindsight port is reachable only from the gateway and the other containers on the host, and the gateway holds the one shared key and decides which bank a caller may open.
Three ways to build it
Section titled “Three ways to build it”- LiteLLM, which already runs as the router. (It would have to accept Pocket ID tokens; whether it does so without a licence is unconfirmed.) Its MCP gateway can register MCP servers and limit them by key, team or organisation, forward headers, and has per-user server variables. A virtual key per person would see only that person’s servers. Unknowns: it stores servers and keys in a database (Postgres, which the stack does not run for it today), the docs fetched do not say which features need a licence, and whether the backend credential can stay server-side per person is not confirmed. VERIFY all of it with a spike.
- A small Novak gateway. Python, in this repo, doing exactly the list above. Full control and no new dependency, at the cost of owning an MCP proxy (streamable HTTP, sessions) and being code the project has so far avoided writing.
- Traefik forward-auth, per bank. The route already being planned for Hindsight. Protects Hindsight only, not Outline or Tududi.
Recommendation at the time: spike option 1 first, for half a day: two people, two Hindsight banks, one test key each, and a Pocket ID token as the credential if it will take one. If a person’s key sees only their own servers and the backend key never leaves the router, adopt it and have the reconciler render the MCP servers into the router config. If not, build option 2. Option 3 can still sit in front of the Hindsight port as a second layer.
What happened: a small Novak gateway (option 2) was built and is in use (decision #58). It accepts a Pocket ID token, a trusted client that names the user in a header (Open WebUI), or a per-person key.
Authentication, authorization, accounting
Section titled “Authentication, authorization, accounting”- Authentication: who is this. A Pocket ID token (or the fallbacks above).
- Authorization: what may they touch. Their own entries, found through the directory, plus entries marked shared. Nothing else is listed to them, so there is nothing to guess.
- Accounting: what did they do. The gateway logs person, tool, backend, time and outcome (never arguments or secrets). And because each person’s own key is used downstream, Tududi and Outline attribute the action to that person in their own history as well.
Personal credentials
Section titled “Personal credentials”A person supplies their own key for each service, so they act as themselves there. Tududi is meant for shared project work and has private workspaces; the sharing happens inside Tududi, between accounts, so Novak does not need a “shared between two people” kind of entry. The gateway only needs each person’s own key.
Those keys have to be stored somewhere only the gateway reads, and entered by
the person. Two ways: an administrator enters them with novak person (works
first), or each person pastes their own key into a write-only form (the
console is the obvious place, since it already signs people in, but today it
never handles secrets by design, so that is a decision to take, not an
assumption).
The people directory
Section titled “The people directory”registry/people.yaml is a mapping and not an auth system. A person has the names they sign in with, the
entries they may use, and where their approvals go. Anything under household is shared on purpose:
people: alice: names: [alice] emails: [alice@example.com] entries: [hindsight-alice, tududi-1-alice] notify: {kind: supernotify, target: person.alice}household: entries: [hindsight-household]Keys are stored as hashes (key_sha256), never as the key. The real file lives on the host, because it names
real people.
novak add stays what it is: it adds a connection. novak person add ushy sits above it, creating the
bank, asking for that person’s keys, and recording what belongs to them. Each entry belongs to one person,
and an entry listed under household is shared on purpose.
Where each step stands:
- Now, no code. In Open WebUI, restrict
hindsight-tmeuzeto the usertmeuzeandhindsight-ushytoushywith Access Control. The shared key is still underneath, but only that person can invoke that connection. Superseded by step 3. - People directory and
novak person add, plusowneron entries. Done. - The gateway spike, then the choice. Done: a small Novak gateway was built (decision #58).
- Move Open WebUI onto the gateway (headers or token). Done, with a trusted header.
- Per-person Home Assistant pipelines. Done for the agents and pipelines. Their tool access is limited to Assist for now, for the reason in the table above.
- Close the Hindsight port to everything but the gateway. Done: it is bound to localhost. Satellites then reach household memory through the gateway with a household key, which is what makes closing the port safe for them. How the voice agents use that connection today is in home-assistant.md.
Costs and risks
Section titled “Costs and risks”- The gateway holds every credential and sits in every request path: a single point of failure and the most valuable thing to compromise.
- A trusted header is only as good as the network around it.
- A pipeline per person is per device, not per login.
- More moving parts than one shared key, in exchange for the property you asked for.
Does this need a reverse proxy?
Section titled “Does this need a reverse proxy?”The gateway is an application server and speaks MCP on its own port, so satellites and a tailnet need no proxy in front of it. A proxy (Traefik, which is being adopted anyway) becomes necessary if an OAuth client insists on an HTTPS address for the resource, or if the gateway is ever exposed beyond the tailnet. VERIFY whether Home Assistant’s MCP OAuth flow accepts a plain-HTTP tailnet address.
Decisions taken
Section titled “Decisions taken”- A gateway is wanted, and the plan above is liked.
- A trusted header from Open WebUI is acceptable, but a Pocket ID token is preferred where a client can do it.
- Each person supplies their own key for services such as Tududi.
- Satellites go through the gateway with the household identity.
Open questions
Section titled “Open questions”- Which Pocket ID version runs here, and does a client handle a Pocket ID API resource (VERIFY)?
- Should people paste their own keys into a form (console), or should an admin enter them?