Skip to content

Domain

Port: REST :3030 · gRPC :5030

Manages tenant domains, OAuth application definitions, and client registrations. Every token and document is scoped to a client context defined in this service.

Collections

CollectionPathPurpose
Apps/domain/appsOAuth application definitions under a client
Clients/domain/clientsTop-level tenant / OAuth client records

domain/apps

An application registered under a client. Apps represent runtime surfaces such as web, mobile, desktop, or application contexts.

Required Create Fields

FieldRequiredTypeDescription
typeAppTypeWEB, MOBILE, DESKTOP, APPLICATION
cidMongoIdParent domain/clients ID
statusStatusACTIVE, INACTIVE

Optional Fields

FieldTypeDescription
namestringDisplay name
urlstringApp URL
scopesstring[]App-allowed scopes — must be a subset of the parent client's scopes
grant_typesGrantType[]password, refresh_token, client_credential, authorization_code
access_token_ttlnumberAccess token TTL in seconds
refresh_token_ttlnumberRefresh token TTL in seconds
change_logsobject[]Nested version / changelog entries

Key Behaviors

  • An app cannot expose scopes the parent client does not have.
  • Changing scopes or TTLs affects downstream token issuance for that app.

domain/clients

The top-level tenant unit. Every token, ABAC scope, and Coworkers relationship originates here.

Required Create Fields

FieldRequiredTypeDescription
namestringClient display name
planClientPlanALUMINUM, GOLD, PLATINUM
statusStatusACTIVE, INACTIVE
grant_typesGrantType[]Allowed OAuth grant types

Optional Fields

FieldTypeDescription
scopesstring[]Available OAuth scopes for this client
coworkersMongoId[]Other client IDs in the same Coworkers space
whiteliststring[]Allowed IP addresses
access_token_ttlnumberAccess token TTL in seconds
refresh_token_ttlnumberRefresh token TTL in seconds
domainsobject[]FQDN entries used for subject-domain resolution
servicesobject[]External integration configurations (SMS, push, email providers)

Platform-Managed Fields (read-only)

FieldDescription
api_keyPlatform-generated API key
client_idPlatform-generated OAuth client ID
client_secretPlatform-generated OAuth client secret
expiration_datePlatform-managed expiry

Key Behaviors

  • Changes to domains affect subject-domain resolution for grants — confirm before updating.
  • Changes to coworkers affect cross-client data visibility immediately.
  • client_secret is sensitive — never expose it unnecessarily.