A separate portal identity plane
Status
Section titled “Status”Accepted. This supersedes the first version of the decision (portal users as inert platform principals).
2026-07-22 for the original decision. The separate-plane rework was built 2026-08-14.
Context
Section titled “Context”Clients of the platform sometimes run portals for their own customers: a customer or supplier signs into the client’s portal, possibly through their own company’s identity provider, and customer administrators manage their own users. That is a business-to-business-to-business arrangement.
Two extremes were considered and rejected. A full organisation model inside the platform (organisations, memberships, org claims in tokens) would put product semantics into the identity provider, where every audit, token shape and SDK carries it forever, and it is irreversible once org claims ship. Authentication built into each portal would fork the identity plane: a second password store, a second MFA, lockout, reset, audit and federation implementation per portal.
The first implementation made portal end-users inert platform principals (rows with no client). It was built and then rejected: its safety depended on every future authorisation surface honouring “no client means inert” forever.
Decision
Section titled “Decision”The platform owns proving who someone is (credentials, MFA, back-off, federation handshakes, audit). The portal application owns what they mean (organisations, memberships, portal roles, delegated admin).
Portal end-users live on a separate identity plane:
- They are
portal_identitiesrows, wholly separate from platform principals, keyed per (client, email). The same human may hold several portal identities and a platform account, each with independent credentials. - They have their own identifier prefix (
ptu_), their own entry points under/portal/*, and their own admin API (/api/portal-users). - Portal tokens prove identity and nothing else. They carry no platform tier, no roles and no refresh tokens. Their
tierclaim is empty because it does not apply. - The platform never learns what an organisation is. If a second consumer of org structure ever appears, the portal’s membership tables can seed promoting organisations into the platform. The reverse migration would not be possible, which is why the platform starts app-side.
Portal apps, per-app grants and the access gate refine this (see profile-only access).
Consequences
Section titled “Consequences”Good:
- Platform authorisation code cannot accidentally admit a portal user, because they are not principals.
- Credentials, MFA and federation are implemented once.
- The platform’s tenancy model is unchanged.
Bad:
- Two populations to administer, and two sets of lifecycle screens.
- The same person may appear twice (platform account and portal identity), with separate passwords.
- Relying parties need to understand the portal-specific id_token shape.
Alternatives considered
Section titled “Alternatives considered”| Alternative | Why not |
|---|---|
| Organisations in the platform | Irreversible product semantics in tokens and SDKs. |
| Authentication in each portal | Forks the identity plane and always ends up worse audited. |
| Inert principals in the existing table | Safety depends on every future check remembering the exception. |