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
status✅StatusAccount lifecycle state: ACTIVE, INACTIVE
subjects✅string[]At least one subject, each in email form local@domain (e.g. user@example.com)
email or phone✅stringAt 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 in email form, with the domain (e.g. guest@example.com) — @IsSubject rejects a bare guest, and a write by a non-administrator keeps only subjects at the caller's own domain.
  • 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
type✅ProfileTypeREAL, LEGAL, GOVERN
gender✅GenderMALE, 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
ip✅stringValid IPv4 or IPv6 address
agent✅stringUser-agent string
expiration✅numberUnix timestamp

Key Behaviors ​

  • Sessions are soft-deleted on logout.
  • No worker purges sessions — the cleaner has no sessions module; logout soft-deletes the session and blacklists it.
  • Use ?zone=own,client to list a user's own sessions.