identitynamespacenamespace identityThe typed tables of the identity model, generated by IFC Data from the model. Do not edit: change the model and run bun tools/typed.ts --write.
Who may do what, and how they prove it
identitynamespacenamespace identityidentity.CredentialKindRowinterfaceno test imports itinterface CredentialKindRowWhat a principal proves itself with
| Member | Type | What it is |
|---|---|---|
code | string | The code other tables point to: a short word that does not change |
label | string | What a person is shown for the code |
description | string | null | What the code means, where the label is not enough |
identity.CredentialKindInsertinterfaceno test imports itinterface CredentialKindInsertWhat an insert into credential_kind takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
code | string | |
label | string | |
description? | string | null |
identity.CredentialKindKeytypeno test imports ittype CredentialKindKey = { readonly code: string };The key of a row of credential_kind.
identity.credentialKindconstno test imports itconst credentialKind: Table<CredentialKindRow, CredentialKindInsert, "credentialKind">What a principal proves itself with
identity.PasswordAlgorithmRowinterfaceno test imports itinterface PasswordAlgorithmRowHow a password is hashed
| Member | Type | What it is |
|---|---|---|
code | string | The code other tables point to: a short word that does not change |
label | string | What a person is shown for the code |
description | string | null | What the code means, where the label is not enough |
identity.PasswordAlgorithmInsertinterfaceno test imports itinterface PasswordAlgorithmInsertWhat an insert into password_algorithm takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
code | string | |
label | string | |
description? | string | null |
identity.PasswordAlgorithmKeytypeno test imports ittype PasswordAlgorithmKey = { readonly code: string };The key of a row of password_algorithm.
identity.passwordAlgorithmconstno test imports itconst passwordAlgorithm: Table<PasswordAlgorithmRow, PasswordAlgorithmInsert, "passwordAlgorithm">How a password is hashed
identity.PrincipalRowinterfaceno test imports itinterface PrincipalRowAnyone or anything that can be granted a role, own a key or act: a person, a machine, a device, an AI agent or a group
| Member | Type | What it is |
|---|---|---|
principalId | string | What identifies the principal, made by the application |
kind | "agent" | "device" | "group" | "machine" | "user" | Whether the principal is a user, a machine, a device, an agent or a group |
displayName | string | null | The name the principal is shown by |
status | "active" | "deleted" | "disabled" | "pending" | "suspended" | Where the principal is in its life; making it disabled denies everything it could do, at once |
statusReason | string | null | Why the principal is in the status it is in |
statusChangedAt | Timestamp | When the principal's status last changed |
createdAt | Timestamp | When the principal was made |
tenantId | string | null | The tenant that owns the principal; empty for a user who joins tenants by membership |
ownerPrincipalId | string | null | The person or group accountable for the principal; required of a machine, a device and an agent by the operation that makes them |
identity.PrincipalInsertinterfaceno test imports itinterface PrincipalInsertWhat an insert into principal takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
principalId | string | |
kind | "agent" | "device" | "group" | "machine" | "user" | |
displayName? | string | null | |
status | "active" | "deleted" | "disabled" | "pending" | "suspended" | |
statusReason? | string | null | |
statusChangedAt | Timestamp | |
createdAt | Timestamp | |
tenantId? | string | null | |
ownerPrincipalId? | string | null |
identity.PrincipalKeytypeno test imports ittype PrincipalKey = { readonly principalId: string };The key of a row of principal.
identity.principalconstno test imports itconst principal: Table<PrincipalRow, PrincipalInsert, "principal">Anyone or anything that can be granted a role, own a key or act: a person, a machine, a device, an AI agent or a group
identity.UserAccountRowinterfaceno test imports itinterface UserAccountRowA person's way in: who signs in, and where it stands
| Member | Type | What it is |
|---|---|---|
principalId | string | The principal the account is |
loginIdentifier | string | What the user signs in by, unique within its home tenant |
createdVia | "admin" | "directory" | "federated" | "invited" | "self_signup" | How the account came to be |
lockedUntil | Timestamp | null | Until when the account is locked, where it is |
lastAuthenticatedAt | Timestamp | null | When the user last proved who they are |
locale | string | null | The language the user wants to be spoken to in |
timeZone | string | null | The time zone the user's times are shown in |
personPartyId | string | The person the account is for |
homeTenantTenantId | string | null | The tenant whose pool of users it is in; empty for a user who joins tenants by membership |
primaryEmailElectronicContactId | string | null | The address the user is written to |
identity.UserAccountInsertinterfaceno test imports itinterface UserAccountInsertWhat an insert into user_account takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
principalId | string | |
loginIdentifier | string | |
createdVia | "admin" | "directory" | "federated" | "invited" | "self_signup" | |
lockedUntil? | Timestamp | null | |
lastAuthenticatedAt? | Timestamp | null | |
locale? | string | null | |
timeZone? | string | null | |
personPartyId | string | |
homeTenantTenantId? | string | null | |
primaryEmailElectronicContactId? | string | null |
identity.UserAccountKeytypeno test imports ittype UserAccountKey = { readonly principalId: string };The key of a row of user_account.
identity.userAccountconstno test imports itconst userAccount: Table<UserAccountRow, UserAccountInsert, "userAccount">A person's way in: who signs in, and where it stands
identity.ContactVerificationRowinterfaceno test imports itinterface ContactVerificationRowThe proof that an address is a person's
| Member | Type | What it is |
|---|---|---|
contactVerificationId | string | What identifies the verification, made by the application |
verifiedAt | Timestamp | When the address was proved to be the person's |
method | "admin" | "directory_asserted" | "email_link" | "otp" | How it was proved |
contactElectronicContactId | string | The address that was proved |
identity.ContactVerificationInsertinterfaceno test imports itinterface ContactVerificationInsertWhat an insert into contact_verification takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
contactVerificationId | string | |
verifiedAt | Timestamp | |
method | "admin" | "directory_asserted" | "email_link" | "otp" | |
contactElectronicContactId | string |
identity.ContactVerificationKeytypeno test imports ittype ContactVerificationKey = { readonly contactVerificationId: string };The key of a row of contact_verification.
identity.contactVerificationconstno test imports itconst contactVerification: Table<ContactVerificationRow, ContactVerificationInsert, "contactVerification">The proof that an address is a person's
identity.MembershipRowinterfaceno test imports itinterface MembershipRowA user's place in a tenant
| Member | Type | What it is |
|---|---|---|
membershipId | string | What identifies the membership, made by the application |
status | "active" | "invited" | "removed" | "suspended" | Where the membership is |
source | "admin" | "directory" | "domain_capture" | "invited" | "self_join" | How the user came to be a member |
joinedAt | Timestamp | null | When the user became a member |
removedAt | Timestamp | null | When the membership ended |
userAccountPrincipalId | string | The user |
tenantId | string | The tenant |
identity.MembershipInsertinterfaceno test imports itinterface MembershipInsertWhat an insert into membership takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
membershipId | string | |
status | "active" | "invited" | "removed" | "suspended" | |
source | "admin" | "directory" | "domain_capture" | "invited" | "self_join" | |
joinedAt? | Timestamp | null | |
removedAt? | Timestamp | null | |
userAccountPrincipalId | string | |
tenantId | string |
identity.MembershipKeytypeno test imports ittype MembershipKey = { readonly membershipId: string };The key of a row of membership.
identity.membershipconstno test imports itconst membership: Table<MembershipRow, MembershipInsert, "membership">A user's place in a tenant
identity.UserGroupRowinterfaceno test imports itinterface UserGroupRowA set of principals that is granted what its members are
| Member | Type | What it is |
|---|---|---|
principalId | string | The principal the group is |
name | string | What the group is called, unique within its tenant |
source | "directory" | "local" | Where the group is kept |
externalId | string | null | What a directory calls the group, where it keeps it |
tenantId | string | The tenant the group is in |
identity.UserGroupInsertinterfaceno test imports itinterface UserGroupInsertWhat an insert into user_group takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
principalId | string | |
name | string | |
source | "directory" | "local" | |
externalId? | string | null | |
tenantId | string |
identity.UserGroupKeytypeno test imports ittype UserGroupKey = { readonly principalId: string };The key of a row of user_group.
identity.userGroupconstno test imports itconst userGroup: Table<UserGroupRow, UserGroupInsert, "userGroup">A set of principals that is granted what its members are
identity.GroupMemberRowinterfaceno test imports itinterface GroupMemberRowA principal's place in a group: a user, or another group
| Member | Type | What it is |
|---|---|---|
groupUserGroupPrincipalId | string | The group |
memberPrincipalId | string | The user or the group that is a member |
addedAt | Timestamp | When the principal was added |
identity.GroupMemberInsertinterfaceno test imports itinterface GroupMemberInsertWhat an insert into group_member takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
groupUserGroupPrincipalId | string | |
memberPrincipalId | string | |
addedAt | Timestamp |
identity.GroupMemberKeytypeno test imports ittype GroupMemberKey = { readonly groupUserGroupPrincipalId: string; readonly memberPrincipalId: string };The key of a row of group_member.
identity.groupMemberconstno test imports itconst groupMember: Table<GroupMemberRow, GroupMemberInsert, "groupMember">A principal's place in a group: a user, or another group
identity.CredentialRowinterfaceno test imports itinterface CredentialRowWhat a principal proves itself with; the secret is in the kind of credential
| Member | Type | What it is |
|---|---|---|
credentialId | string | What identifies the credential, made by the application |
credentialKindCode | string | What sort of proof it is |
status | "active" | "expired" | "revoked" | Where it is |
label | string | null | What the person calls it |
createdAt | Timestamp | When it was made |
lastUsedAt | Timestamp | null | When it was last used |
revokedAt | Timestamp | null | When it ended, where it did |
principalId | string | Whose it is |
identity.CredentialInsertinterfaceno test imports itinterface CredentialInsertWhat an insert into credential takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
credentialId | string | |
credentialKindCode | string | |
status | "active" | "expired" | "revoked" | |
label? | string | null | |
createdAt | Timestamp | |
lastUsedAt? | Timestamp | null | |
revokedAt? | Timestamp | null | |
principalId | string |
identity.CredentialKeytypeno test imports ittype CredentialKey = { readonly credentialId: string };The key of a row of credential.
identity.credentialconstno test imports itconst credential: Table<CredentialRow, CredentialInsert, "credential">What a principal proves itself with; the secret is in the kind of credential
identity.PasswordCredentialRowinterfaceno test imports itinterface PasswordCredentialRowA password, kept only as a hash that carries its algorithm, its parameters and its salt
| Member | Type | What it is |
|---|---|---|
credentialId | string | The credential it is |
hash | string | The hash in the PHC string form; never the password, never reversible |
passwordAlgorithmCode | string | How it was hashed |
changedAt | Timestamp | When the password was set |
mustChange | boolean | Whether the user must choose another at the next sign-in |
identity.PasswordCredentialInsertinterfaceno test imports itinterface PasswordCredentialInsertWhat an insert into password_credential takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
credentialId | string | |
hash | string | |
passwordAlgorithmCode | string | |
changedAt | Timestamp | |
mustChange | boolean |
identity.PasswordCredentialKeytypeno test imports ittype PasswordCredentialKey = { readonly credentialId: string };The key of a row of password_credential.
identity.passwordCredentialconstno test imports itconst passwordCredential: Table<PasswordCredentialRow, PasswordCredentialInsert, "passwordCredential">A password, kept only as a hash that carries its algorithm, its parameters and its salt
identity.PasskeyRowinterfaceno test imports itinterface PasskeyRowA passkey: the public half of a key pair whose private half never leaves the person's device
| Member | Type | What it is |
|---|---|---|
credentialId | string | The credential it is |
credentialIdValue | Uint8Array<ArrayBufferLike> | What the authenticator calls the key, unique |
publicKey | Uint8Array<ArrayBufferLike> | The public key, in COSE form |
signCount | number | How many times the authenticator says it has signed |
aaguid | string | null | What kind of authenticator it is |
backupEligible | boolean | Whether the key can be backed up |
backedUp | boolean | Whether it has been |
userVerified | boolean | Whether the person was verified when it was made |
attestationFormat | string | null | The form of the proof of what made it |
identity.PasskeyInsertinterfaceno test imports itinterface PasskeyInsertWhat an insert into passkey takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
credentialId | string | |
credentialIdValue | Uint8Array<ArrayBufferLike> | |
publicKey | Uint8Array<ArrayBufferLike> | |
signCount | number | |
aaguid? | string | null | |
backupEligible | boolean | |
backedUp | boolean | |
userVerified | boolean | |
attestationFormat? | string | null |
identity.PasskeyKeytypeno test imports ittype PasskeyKey = { readonly credentialId: string };The key of a row of passkey.
identity.passkeyconstno test imports itconst passkey: Table<PasskeyRow, PasskeyInsert, "passkey">A passkey: the public half of a key pair whose private half never leaves the person's device
identity.PasskeyTransportsRowinterfaceno test imports itinterface PasskeyTransportsRowHow the authenticator can be reached
| Member | Type | What it is |
|---|---|---|
passkeyCredentialId | string | A passkey: the public half of a key pair whose private half never leaves the person's device |
transports | string | How the authenticator can be reached |
identity.PasskeyTransportsInsertinterfaceno test imports itinterface PasskeyTransportsInsertWhat an insert into passkey_transports takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
passkeyCredentialId | string | |
transports | string |
identity.PasskeyTransportsKeytypeno test imports ittype PasskeyTransportsKey = { readonly passkeyCredentialId: string; readonly transports: string };The key of a row of passkey_transports.
identity.passkeyTransportsconstno test imports itconst passkeyTransports: Table<PasskeyTransportsRow, PasskeyTransportsInsert, "passkeyTransports">How the authenticator can be reached
identity.OtpSecretRowinterfaceno test imports itinterface OtpSecretRowThe secret of a one-time-code factor, kept as ciphertext under a key held outside the database
| Member | Type | What it is |
|---|---|---|
credentialId | string | The credential it is |
secretCiphertext | Uint8Array<ArrayBufferLike> | The secret, encrypted: the server must make codes from it, so it cannot be only hashed |
keyReference | string | Names the key that encrypted it |
algorithm | "sha_1" | "sha_256" | "sha_512" | The hash the codes are made with |
digits | number | How many digits a code has |
periodSeconds | number | How long a code lasts |
lastUsedStep | number | null | The time step of the last code taken, so that none is taken twice |
identity.OtpSecretInsertinterfaceno test imports itinterface OtpSecretInsertWhat an insert into otp_secret takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
credentialId | string | |
secretCiphertext | Uint8Array<ArrayBufferLike> | |
keyReference | string | |
algorithm | "sha_1" | "sha_256" | "sha_512" | |
digits | number | |
periodSeconds | number | |
lastUsedStep? | number | null |
identity.OtpSecretKeytypeno test imports ittype OtpSecretKey = { readonly credentialId: string };The key of a row of otp_secret.
identity.otpSecretconstno test imports itconst otpSecret: Table<OtpSecretRow, OtpSecretInsert, "otpSecret">The secret of a one-time-code factor, kept as ciphertext under a key held outside the database
identity.RecoveryCodeRowinterfaceno test imports itinterface RecoveryCodeRowA code kept for when the other ways are lost, kept as a hash and used once
| Member | Type | What it is |
|---|---|---|
credentialId | string | The credential it is |
hash | string | The hash of the code |
usedAt | Timestamp | null | When it was used |
identity.RecoveryCodeInsertinterfaceno test imports itinterface RecoveryCodeInsertWhat an insert into recovery_code takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
credentialId | string | |
hash | string | |
usedAt? | Timestamp | null |
identity.RecoveryCodeKeytypeno test imports ittype RecoveryCodeKey = { readonly credentialId: string };The key of a row of recovery_code.
identity.recoveryCodeconstno test imports itconst recoveryCode: Table<RecoveryCodeRow, RecoveryCodeInsert, "recoveryCode">A code kept for when the other ways are lost, kept as a hash and used once
identity.ChallengeRowinterfaceno test imports itinterface ChallengeRowSomething a person is asked to prove, once: a reset link, a magic link, a code or a passkey challenge, kept as a hash
| Member | Type | What it is |
|---|---|---|
challengeId | string | What identifies the challenge, made by the application |
purpose | "email_verification" | "login" | "magic_link" | "passkey_authentication" | "passkey_registration" | "password_reset" | "step_up" | What it is for |
secretHash | string | The hash of what was sent |
attempts | number | How many times it was tried |
maxAttempts | number | How many times it may be |
expiresAt | Timestamp | When it stops being valid |
consumedAt | Timestamp | null | When it was used |
principalId | string | null | Who it is for, where that is known |
destinationElectronicContactId | string | null | Where it was sent |
identity.ChallengeInsertinterfaceno test imports itinterface ChallengeInsertWhat an insert into challenge takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
challengeId | string | |
purpose | "email_verification" | "login" | "magic_link" | "passkey_authentication" | "passkey_registration" | "password_reset" | "step_up" | |
secretHash | string | |
attempts | number | |
maxAttempts | number | |
expiresAt | Timestamp | |
consumedAt? | Timestamp | null | |
principalId? | string | null | |
destinationElectronicContactId? | string | null |
identity.ChallengeKeytypeno test imports ittype ChallengeKey = { readonly challengeId: string };The key of a row of challenge.
identity.challengeconstno test imports itconst challenge: Table<ChallengeRow, ChallengeInsert, "challenge">Something a person is asked to prove, once: a reset link, a magic link, a code or a passkey challenge, kept as a hash
identity.LoginAttemptRowinterfaceno test imports itinterface LoginAttemptRowA sign-in attempt, kept for lockout and for risk, with the identifier hashed so that an unknown user leaves nothing personal
| Member | Type | What it is |
|---|---|---|
loginAttemptId | string | What identifies the attempt, made by the application |
loginIdentifierHash | string | The identifier, hashed with a pepper |
ip | string | Where it came from |
outcome | "blocked" | "locked" | "mfa_failed" | "success" | "unknown_user" | "wrong_secret" | How it ended |
at | Timestamp | When it was |
principalId | string | null | Who it was for, where that is known |
identity.LoginAttemptInsertinterfaceno test imports itinterface LoginAttemptInsertWhat an insert into login_attempt takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
loginAttemptId | string | |
loginIdentifierHash | string | |
ip | string | |
outcome | "blocked" | "locked" | "mfa_failed" | "success" | "unknown_user" | "wrong_secret" | |
at | Timestamp | |
principalId? | string | null |
identity.LoginAttemptKeytypeno test imports ittype LoginAttemptKey = { readonly loginAttemptId: string };The key of a row of login_attempt.
identity.loginAttemptconstno test imports itconst loginAttempt: Table<LoginAttemptRow, LoginAttemptInsert, "loginAttempt">A sign-in attempt, kept for lockout and for risk, with the identifier hashed so that an unknown user leaves nothing personal
identity.KnownBrowserRowinterfaceno test imports itinterface KnownBrowserRowA browser or app that a principal signs in from, recognised by a hash of what it says it is
| Member | Type | What it is |
|---|---|---|
knownBrowserId | string | What identifies the browser, made by the application |
fingerprintHash | string | A hash of what the browser says it is |
label | string | null | What the person calls it |
firstSeenAt | Timestamp | When it was first seen |
lastSeenAt | Timestamp | When it was last seen |
trustedUntil | Timestamp | null | Until when it is trusted not to be asked for a second factor |
principalId | string | Whose it is |
identity.KnownBrowserInsertinterfaceno test imports itinterface KnownBrowserInsertWhat an insert into known_browser takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
knownBrowserId | string | |
fingerprintHash | string | |
label? | string | null | |
firstSeenAt | Timestamp | |
lastSeenAt | Timestamp | |
trustedUntil? | Timestamp | null | |
principalId | string |
identity.KnownBrowserKeytypeno test imports ittype KnownBrowserKey = { readonly knownBrowserId: string };The key of a row of known_browser.
identity.knownBrowserconstno test imports itconst knownBrowser: Table<KnownBrowserRow, KnownBrowserInsert, "knownBrowser">A browser or app that a principal signs in from, recognised by a hash of what it says it is
identity.LoginSessionRowinterfaceno test imports itinterface LoginSessionRowA principal's being signed in, from a device, for a time
| Member | Type | What it is |
|---|---|---|
sessionId | string | What identifies the session, made by the application |
authenticatedAt | Timestamp | When the principal proved who they are |
lastSeenAt | Timestamp | When the session was last used |
idleExpiresAt | Timestamp | When it ends if it is not used |
absoluteExpiresAt | Timestamp | When it ends whatever |
assuranceLevel | "aal_1" | "aal_2" | "aal_3" | How sure it is of who it is for |
federatedProvider | string | null | The identity provider it was signed in through, where it was |
ip | string | Where it came from |
userAgent | string | What the browser says it is |
status | "active" | "expired" | "revoked" | "signed_out" | Where the session is |
revokedAt | Timestamp | null | When it was ended early |
revokedReason | "admin" | "password_change" | "policy" | "reuse_detected" | "risk" | "user" | null | Why it was ended early |
stepUpAt | Timestamp | null | When the principal last proved who they are again |
principalId | string | Who is signed in |
tenantId | string | null | The tenant the session is working in |
knownBrowserId | string | null | The browser or app it is on |
identity.LoginSessionInsertinterfaceno test imports itinterface LoginSessionInsertWhat an insert into login_session takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
sessionId | string | |
authenticatedAt | Timestamp | |
lastSeenAt | Timestamp | |
idleExpiresAt | Timestamp | |
absoluteExpiresAt | Timestamp | |
assuranceLevel | "aal_1" | "aal_2" | "aal_3" | |
federatedProvider? | string | null | |
ip | string | |
userAgent | string | |
status | "active" | "expired" | "revoked" | "signed_out" | |
revokedAt? | Timestamp | null | |
revokedReason? | "admin" | "password_change" | "policy" | "reuse_detected" | "risk" | "user" | null | |
stepUpAt? | Timestamp | null | |
principalId | string | |
tenantId? | string | null | |
knownBrowserId? | string | null |
identity.LoginSessionKeytypeno test imports ittype LoginSessionKey = { readonly sessionId: string };The key of a row of login_session.
identity.loginSessionconstno test imports itconst loginSession: Table<LoginSessionRow, LoginSessionInsert, "loginSession">A principal's being signed in, from a device, for a time
identity.LoginSessionAuthMethodsRowinterfaceno test imports itinterface LoginSessionAuthMethodsRowHow it was authenticated
| Member | Type | What it is |
|---|---|---|
loginSessionSessionId | string | A principal's being signed in, from a device, for a time |
authMethods | string | How it was authenticated |
identity.LoginSessionAuthMethodsInsertinterfaceno test imports itinterface LoginSessionAuthMethodsInsertWhat an insert into login_session_auth_methods takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
loginSessionSessionId | string | |
authMethods | string |
identity.LoginSessionAuthMethodsKeytypeno test imports ittype LoginSessionAuthMethodsKey = { readonly loginSessionSessionId: string; readonly authMethods: string };The key of a row of login_session_auth_methods.
identity.loginSessionAuthMethodsconstno test imports itconst loginSessionAuthMethods: Table<LoginSessionAuthMethodsRow, LoginSessionAuthMethodsInsert, "loginSessionAuthMethods">How it was authenticated
identity.RefreshTokenRowinterfaceno test imports itinterface RefreshTokenRowA token that renews a session, kept as a hash, used once and replaced by the next one of its family
| Member | Type | What it is |
|---|---|---|
refreshTokenId | string | What identifies the token, made by the application |
familyId | string | What every token rotated from one issue shares, so that a reuse ends them all |
tokenHash | string | The hash of the token |
issuedAt | Timestamp | When it was made |
expiresAt | Timestamp | When it stops being valid |
usedAt | Timestamp | null | When it was exchanged for the next |
revokedAt | Timestamp | null | When it was ended early |
sessionLoginSessionSessionId | string | The session it renews |
replacedByRefreshTokenId | string | null | The token that took its place |
identity.RefreshTokenInsertinterfaceno test imports itinterface RefreshTokenInsertWhat an insert into refresh_token takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
refreshTokenId | string | |
familyId | string | |
tokenHash | string | |
issuedAt | Timestamp | |
expiresAt | Timestamp | |
usedAt? | Timestamp | null | |
revokedAt? | Timestamp | null | |
sessionLoginSessionSessionId | string | |
replacedByRefreshTokenId? | string | null |
identity.RefreshTokenKeytypeno test imports ittype RefreshTokenKey = { readonly refreshTokenId: string };The key of a row of refresh_token.
identity.refreshTokenconstno test imports itconst refreshToken: Table<RefreshTokenRow, RefreshTokenInsert, "refreshToken">A token that renews a session, kept as a hash, used once and replaced by the next one of its family
identity.InvitationRowinterfaceno test imports itinterface InvitationRowAn invitation to join a tenant
| Member | Type | What it is |
|---|---|---|
invitationId | string | What identifies the invitation, made by the application |
email | string | The address it was sent to |
tokenHash | string | The hash of the secret in the link |
status | "accepted" | "expired" | "pending" | "revoked" | Where it is |
expiresAt | Timestamp | When it stops being valid |
acceptedAt | Timestamp | null | When it was taken up |
message | string | null | What the inviter wrote |
tenantId | string | The tenant the person is invited to |
invitedByPrincipalId | string | Who invited |
acceptedByUserAccountPrincipalId | string | null | Who took it up |
identity.InvitationInsertinterfaceno test imports itinterface InvitationInsertWhat an insert into invitation takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
invitationId | string | |
email | string | |
tokenHash | string | |
status | "accepted" | "expired" | "pending" | "revoked" | |
expiresAt | Timestamp | |
acceptedAt? | Timestamp | null | |
message? | string | null | |
tenantId | string | |
invitedByPrincipalId | string | |
acceptedByUserAccountPrincipalId? | string | null |
identity.InvitationKeytypeno test imports ittype InvitationKey = { readonly invitationId: string };The key of a row of invitation.
identity.invitationconstno test imports itconst invitation: Table<InvitationRow, InvitationInsert, "invitation">An invitation to join a tenant
identity.DomainClaimRowinterfaceno test imports itinterface DomainClaimRowA claim on a domain, waiting to be proved
| Member | Type | What it is |
|---|---|---|
domainClaimId | string | What identifies the claim, made by the application |
domain | string | The domain claimed |
challengeValue | string | What is to be published to prove it; public by design |
method | "dns_txt" | "email" | "http_file" | How it is to be proved |
status | "expired" | "failed" | "pending" | Where it is |
requestedAt | Timestamp | When it was asked for |
expiresAt | Timestamp | When it stops being valid |
tenantId | string | The tenant that claims it |
identity.DomainClaimInsertinterfaceno test imports itinterface DomainClaimInsertWhat an insert into domain_claim takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
domainClaimId | string | |
domain | string | |
challengeValue | string | |
method | "dns_txt" | "email" | "http_file" | |
status | "expired" | "failed" | "pending" | |
requestedAt | Timestamp | |
expiresAt | Timestamp | |
tenantId | string |
identity.DomainClaimKeytypeno test imports ittype DomainClaimKey = { readonly domainClaimId: string };The key of a row of domain_claim.
identity.domainClaimconstno test imports itconst domainClaim: Table<DomainClaimRow, DomainClaimInsert, "domainClaim">A claim on a domain, waiting to be proved
identity.VerifiedDomainRowinterfaceno test imports itinterface VerifiedDomainRowA domain that a tenant has proved to be its own, and what that means for those who sign in with it
| Member | Type | What it is |
|---|---|---|
verifiedDomainId | string | What identifies the domain, made by the application |
domain | string | The domain, unique across every tenant |
verifiedAt | Timestamp | When it was proved |
policy | "capture_users" | "enforce_sso" | "none" | What it means for those who sign in with it |
lastCheckedAt | Timestamp | null | When it was last checked still to be the tenant's |
tenantId | string | The tenant it is proved for |
identity.VerifiedDomainInsertinterfaceno test imports itinterface VerifiedDomainInsertWhat an insert into verified_domain takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
verifiedDomainId | string | |
domain | string | |
verifiedAt | Timestamp | |
policy | "capture_users" | "enforce_sso" | "none" | |
lastCheckedAt? | Timestamp | null | |
tenantId | string |
identity.VerifiedDomainKeytypeno test imports ittype VerifiedDomainKey = { readonly verifiedDomainId: string };The key of a row of verified_domain.
identity.verifiedDomainconstno test imports itconst verifiedDomain: Table<VerifiedDomainRow, VerifiedDomainInsert, "verifiedDomain">A domain that a tenant has proved to be its own, and what that means for those who sign in with it
identity.PasswordPolicyRowinterfaceno test imports itinterface PasswordPolicyRowThe rules for passwords
| Member | Type | What it is |
|---|---|---|
passwordPolicyId | string | What identifies the policy, made by the application |
minLength | number | The fewest characters |
maxLength | number | The most characters |
requireBreachCheck | boolean | Whether a password is refused that is known from a breach |
historyCount | number | How many earlier passwords may not be used again |
maxAgeDays | number | null | After how many days a password must change; empty, in line with NIST SP 800-63B |
tenantId | string | null | The tenant the policy is for; empty for the platform's, which a tenant's replaces |
identity.PasswordPolicyInsertinterfaceno test imports itinterface PasswordPolicyInsertWhat an insert into password_policy takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
passwordPolicyId | string | |
minLength | number | |
maxLength | number | |
requireBreachCheck | boolean | |
historyCount | number | |
maxAgeDays? | number | null | |
tenantId? | string | null |
identity.PasswordPolicyKeytypeno test imports ittype PasswordPolicyKey = { readonly passwordPolicyId: string };The key of a row of password_policy.
identity.passwordPolicyconstno test imports itconst passwordPolicy: Table<PasswordPolicyRow, PasswordPolicyInsert, "passwordPolicy">The rules for passwords
identity.PasswordPolicyAllowedAlgorithmsRowinterfaceno test imports itinterface PasswordPolicyAllowedAlgorithmsRowThe algorithms a hash may use
| Member | Type | What it is |
|---|---|---|
passwordPolicyId | string | The rules for passwords |
allowedAlgorithms | string | The algorithms a hash may use |
identity.PasswordPolicyAllowedAlgorithmsInsertinterfaceno test imports itinterface PasswordPolicyAllowedAlgorithmsInsertWhat an insert into password_policy_allowed_algorithms takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
passwordPolicyId | string | |
allowedAlgorithms | string |
identity.PasswordPolicyAllowedAlgorithmsKeytypeno test imports ittype PasswordPolicyAllowedAlgorithmsKey = { readonly passwordPolicyId: string; readonly allowedAlgorithms: string };The key of a row of password_policy_allowed_algorithms.
identity.passwordPolicyAllowedAlgorithmsconstno test imports itconst passwordPolicyAllowedAlgorithms: Table<PasswordPolicyAllowedAlgorithmsRow, PasswordPolicyAllowedAlgorithmsInsert, "passwordPolicyAllowedAlgorithms">The algorithms a hash may use
identity.LockoutPolicyRowinterfaceno test imports itinterface LockoutPolicyRowThe rules for locking an account after failed sign-ins
| Member | Type | What it is |
|---|---|---|
lockoutPolicyId | string | What identifies the policy, made by the application |
failedAttempts | number | How many failures lock it |
windowMinutes | number | The time they are counted in |
lockMinutes | number | How long it stays locked |
unlockMode | "admin" | "self_service" | "timer" | How it is freed |
tenantId | string | null | The tenant the policy is for; empty for the platform's, which a tenant's replaces |
identity.LockoutPolicyInsertinterfaceno test imports itinterface LockoutPolicyInsertWhat an insert into lockout_policy takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
lockoutPolicyId | string | |
failedAttempts | number | |
windowMinutes | number | |
lockMinutes | number | |
unlockMode | "admin" | "self_service" | "timer" | |
tenantId? | string | null |
identity.LockoutPolicyKeytypeno test imports ittype LockoutPolicyKey = { readonly lockoutPolicyId: string };The key of a row of lockout_policy.
identity.lockoutPolicyconstno test imports itconst lockoutPolicy: Table<LockoutPolicyRow, LockoutPolicyInsert, "lockoutPolicy">The rules for locking an account after failed sign-ins
identity.SessionPolicyRowinterfaceno test imports itinterface SessionPolicyRowThe rules for sessions
| Member | Type | What it is |
|---|---|---|
sessionPolicyId | string | What identifies the policy, made by the application |
idleMinutes | number | How long a session lasts unused |
absoluteMinutes | number | How long it lasts at most |
concurrentSessionLimit | number | null | How many a principal may have at once |
bindToDevice | boolean | Whether a session is tied to the device it began on |
stepUpMinutes | number | How long a second proof counts for |
tenantId | string | null | The tenant the policy is for; empty for the platform's, which a tenant's replaces |
identity.SessionPolicyInsertinterfaceno test imports itinterface SessionPolicyInsertWhat an insert into session_policy takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
sessionPolicyId | string | |
idleMinutes | number | |
absoluteMinutes | number | |
concurrentSessionLimit? | number | null | |
bindToDevice | boolean | |
stepUpMinutes | number | |
tenantId? | string | null |
identity.SessionPolicyKeytypeno test imports ittype SessionPolicyKey = { readonly sessionPolicyId: string };The key of a row of session_policy.
identity.sessionPolicyconstno test imports itconst sessionPolicy: Table<SessionPolicyRow, SessionPolicyInsert, "sessionPolicy">The rules for sessions
identity.MfaPolicyRowinterfaceno test imports itinterface MfaPolicyRowThe rules for second factors
| Member | Type | What it is |
|---|---|---|
mfaPolicyId | string | What identifies the policy, made by the application |
requirement | "adaptive" | "none" | "optional" | "required" | Whether a second factor is needed |
graceDays | number | How long a user may go without one when it becomes required |
rememberDeviceDays | number | How long a device is trusted not to be asked |
tenantId | string | null | The tenant the policy is for; empty for the platform's, which a tenant's replaces |
identity.MfaPolicyInsertinterfaceno test imports itinterface MfaPolicyInsertWhat an insert into mfa_policy takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
mfaPolicyId | string | |
requirement | "adaptive" | "none" | "optional" | "required" | |
graceDays | number | |
rememberDeviceDays | number | |
tenantId? | string | null |
identity.MfaPolicyKeytypeno test imports ittype MfaPolicyKey = { readonly mfaPolicyId: string };The key of a row of mfa_policy.
identity.mfaPolicyconstno test imports itconst mfaPolicy: Table<MfaPolicyRow, MfaPolicyInsert, "mfaPolicy">The rules for second factors
identity.MfaPolicyAllowedKindsRowinterfaceno test imports itinterface MfaPolicyAllowedKindsRowThe factors that may be used
| Member | Type | What it is |
|---|---|---|
mfaPolicyId | string | The rules for second factors |
allowedKinds | string | The factors that may be used |
identity.MfaPolicyAllowedKindsInsertinterfaceno test imports itinterface MfaPolicyAllowedKindsInsertWhat an insert into mfa_policy_allowed_kinds takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
mfaPolicyId | string | |
allowedKinds | string |
identity.MfaPolicyAllowedKindsKeytypeno test imports ittype MfaPolicyAllowedKindsKey = { readonly mfaPolicyId: string; readonly allowedKinds: string };The key of a row of mfa_policy_allowed_kinds.
identity.mfaPolicyAllowedKindsconstno test imports itconst mfaPolicyAllowedKinds: Table<MfaPolicyAllowedKindsRow, MfaPolicyAllowedKindsInsert, "mfaPolicyAllowedKinds">The factors that may be used
identity.MfaPolicyRequiredForRolesRowinterfaceno test imports itinterface MfaPolicyRequiredForRolesRowThe roles whose holders must always use one, by key
| Member | Type | What it is |
|---|---|---|
mfaPolicyId | string | The rules for second factors |
requiredForRoles | string | The roles whose holders must always use one, by key |
identity.MfaPolicyRequiredForRolesInsertinterfaceno test imports itinterface MfaPolicyRequiredForRolesInsertWhat an insert into mfa_policy_required_for_roles takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
mfaPolicyId | string | |
requiredForRoles | string |
identity.MfaPolicyRequiredForRolesKeytypeno test imports ittype MfaPolicyRequiredForRolesKey = { readonly mfaPolicyId: string; readonly requiredForRoles: string };The key of a row of mfa_policy_required_for_roles.
identity.mfaPolicyRequiredForRolesconstno test imports itconst mfaPolicyRequiredForRoles: Table<MfaPolicyRequiredForRolesRow, MfaPolicyRequiredForRolesInsert, "mfaPolicyRequiredForRoles">The roles whose holders must always use one, by key
identity.AuditEventRowinterfaceno test imports itinterface AuditEventRowSomething that was done, or tried, kept in a chain of hashes so that it cannot be changed without showing
| Member | Type | What it is |
|---|---|---|
auditEventId | string | What identifies the event, made by the application |
sequence | number | Which event of the trail it is, counted from one: each follows the one before it, so that none is left out and none is put between |
occurredAt | Timestamp | When it happened |
actorKind | "agent" | "device" | "impersonator" | "machine" | "system" | "user" | What did it: a person, a machine, a device, an agent, the platform or someone acting as another |
decision | "allow" | "deny" | null | What the decision was, for an event that records one |
delegationKey | string | null | The delegation it was done under; not a reference, so that the trail outlives it |
runKey | string | null | The run of an agent it was done in; not a reference, so that the trail outlives it |
traceId | string | null | The trace it is part of |
chain | unknown | The principals between the person accountable and the actor, root first |
policyRefs | unknown | The roles, policies and grants that decided |
action | string | What was done, named subject.verb; each module adds its own |
outcome | "denied" | "failure" | "success" | How it ended |
targetConcept | string | null | The kind of thing it was done to |
targetKey | string | null | The thing it was done to; a loose reference, so that the trail outlives what it names |
sessionKey | string | null | The session it was done in; not a reference, because sessions are purged |
requestId | string | null | The request it was part of |
ip | string | null | Where it came from |
userAgent | string | null | What the client says it is |
reason | string | null | Why, where a reason was given |
detail | unknown | What else matters, with no secret in it |
previousHash | string | The hash of the event before it in the chain |
eventHash | string | The hash of this event and the one before |
tenantId | string | null | The tenant it was in |
actorPrincipalId | string | null | Who did it, where a principal did |
onBehalfOfPrincipalId | string | null | The person or group accountable at the root of the chain the actor acted in |
identity.AuditEventInsertinterfaceno test imports itinterface AuditEventInsertWhat an insert into audit_event takes: what the database fills may be left out.
| Member | Type | What it is |
|---|---|---|
auditEventId | string | |
sequence | number | |
occurredAt | Timestamp | |
actorKind | "agent" | "device" | "impersonator" | "machine" | "system" | "user" | |
decision? | "allow" | "deny" | null | |
delegationKey? | string | null | |
runKey? | string | null | |
traceId? | string | null | |
chain? | unknown | |
policyRefs? | unknown | |
action | string | |
outcome | "denied" | "failure" | "success" | |
targetConcept? | string | null | |
targetKey? | string | null | |
sessionKey? | string | null | |
requestId? | string | null | |
ip? | string | null | |
userAgent? | string | null | |
reason? | string | null | |
detail? | unknown | |
previousHash | string | |
eventHash | string | |
tenantId? | string | null | |
actorPrincipalId? | string | null | |
onBehalfOfPrincipalId? | string | null |
identity.AuditEventKeytypeno test imports ittype AuditEventKey = { readonly auditEventId: string };The key of a row of audit_event.
identity.auditEventconstno test imports itconst auditEvent: Table<AuditEventRow, AuditEventInsert, "auditEvent">Something that was done, or tried, kept in a chain of hashes so that it cannot be changed without showing