Skip to content

Identity

Port: REST :3080 · gRPC :5080

Core user management service. Stores user accounts, extended profiles, and login sessions. All other services reference users by their identity/users MongoId.

Collections

CollectionPathPurpose
Users/identity/usersRoot user account record
Profiles/identity/profilesExtended personal / profile data
Sessions/identity/sessionsActive login session records

identity/users

Root user account. Core access-control and ownership references across the Platform point to this collection.

Required Create Fields

FieldRequiredTypeDescription
statusStatusAccount lifecycle state: ACTIVE, INACTIVE
subjectsstring[]At least one subject; values do not include domain suffix
email or phonestringAt least one of these two must be present

Optional Fields

FieldTypeDescription
emailstringLowercased email address
phonestringNormalized phone number
usernamestringUnique username
passwordstringWrite-only password (never returned)
secretstringWrite-only OTP/TOTP secret (never returned)
tzstringIANA timezone
langstringLocale
regionstringISO 3166-1 Alpha-2

Key Behaviors

  • password and secret are write-only — they are never returned in responses.
  • subjects stores values without the domain suffix (e.g. guest, not guest@example.com).
  • Modifying subjects changes ABAC grant matching behavior.

identity/profiles

Extended personal record linked through core ownership. A user typically has one profile.

Required Create Fields

FieldRequiredTypeDescription
typeProfileTypeREAL, LEGAL, GOVERN
genderGenderMALE, FEMALE, UNKNOWN

Optional Fields

FieldTypeDescription
stateStatePENDING, APPROVED, REJECTED, VERIFIED, UNKNOWN
first_namestringGiven name
last_namestringFamily name
nicknamestringDisplay alias
birthdatedateBirth date
national_codestringNational identifier
coverMongoIdRaw special/files ID — not populatable
avatarMongoIdRaw special/files ID — not populatable
galleryMongoId[]Raw special/files IDs — not populatable
verified_atdateVerification timestamp
verified_byMongoIdVerifier user ID

Population

Common population only. cover, avatar, and gallery are raw IDs — they are not populatable.

identity/sessions

Login/session record with origin and expiration metadata.

Required Create Fields

FieldRequiredTypeDescription
ipstringValid IPv4 or IPv6 address
agentstringUser-agent string
expirationnumberUnix timestamp

Key Behaviors

  • Sessions are soft-deleted on logout.
  • The cleaner worker hard-deletes expired sessions.
  • Use ?zone=own,client to list a user's own sessions.