identityType on the Identities Table — Design Decision Pending¶
Status: Pending design discussion — do NOT implement until decided.
Background¶
ResourceAssignments now supports identityId as an alternative to principalId (migration 036, June 2026). This means access can be assigned to a correlated identity rather than to a specific account. Both assignment targets coexist; the choice is per-organisation and per-account-type.
This change exposed a gap: the Identities table has no column that describes what kind of entity the identity represents. Until now, Identities were implicitly assumed to be humans, but IGA systems regularly model technical accounts (service accounts, machine accounts, functional mailboxes) as first-class identities too — and those can now receive identityId-targeted resource assignments.
The principalType column on Principals already makes this distinction at the account level. A parallel identityType on Identities is needed to make it at the identity level.
Current State¶
Identitiestable: noidentityTypecolumn.- The Omada crawler uses an internal
identityTypesForIdentityTableconfig to decide which Omada identity types get a row in theIdentitiestable (currently only person-type identities). This is a convention, not enforced by the schema. - Crawlers that write technical-account identities today should use
extendedAttributesas a workaround. tools/crawlers/CLAUDE.mddocuments the proposed values as guidance for crawler authors.
Proposed Values¶
| Value | Description |
|---|---|
Person |
Human identity — the standard case |
ServiceAccount |
Technical / functional / service account modelled as an identity in an IGA system |
MachineAccount |
Non-human machine or device account |
Open Questions¶
- Column type and nullability — nullable TEXT (backward-compatible) or NOT NULL with a default of
'Person'? - Migration scope — backfill existing rows as
'Person', or leave NULL and treat NULL as'Person'? - Omada crawler — update
identityTypesForIdentityTablelogic to also writeServiceAccount/MachineAccountidentities when the IGA system models them? - UI impact — should the matrix view, identity detail page, and account-linking logic filter or label by
identityType? - Account correlation — should the correlation algorithm treat
ServiceAccountidentities differently (e.g. skip name/email matching)?
Related¶
docs/architecture/resource-assignments-identity-support.md— the migration 036 design doctools/crawlers/CLAUDE.md§principalTypeandidentityTypeValuesapp/api/src/db/migrations/036_resource_assignments_identity_support.sql