IF Commons GitHub

sql/typed/models/identity.auto

The 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

Source: commons/data/sql/typed/models/identity.auto.ts

0 of 124 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

identitynamespace
namespace identity
identity.CredentialKindRowinterfaceno test imports it
interface CredentialKindRow

What a principal proves itself with

MemberTypeWhat it is
codestringThe code other tables point to: a short word that does not change
labelstringWhat a person is shown for the code
descriptionstring | nullWhat the code means, where the label is not enough
identity.CredentialKindInsertinterfaceno test imports it
interface CredentialKindInsert

What an insert into credential_kind takes: what the database fills may be left out.

MemberTypeWhat it is
codestring
labelstring
description?string | null
identity.CredentialKindKeytypeno test imports it
type CredentialKindKey = { readonly code: string };

The key of a row of credential_kind.

identity.credentialKindconstno test imports it
const credentialKind: Table<CredentialKindRow, CredentialKindInsert, "credentialKind">

What a principal proves itself with

identity.PasswordAlgorithmRowinterfaceno test imports it
interface PasswordAlgorithmRow

How a password is hashed

MemberTypeWhat it is
codestringThe code other tables point to: a short word that does not change
labelstringWhat a person is shown for the code
descriptionstring | nullWhat the code means, where the label is not enough
identity.PasswordAlgorithmInsertinterfaceno test imports it
interface PasswordAlgorithmInsert

What an insert into password_algorithm takes: what the database fills may be left out.

MemberTypeWhat it is
codestring
labelstring
description?string | null
identity.PasswordAlgorithmKeytypeno test imports it
type PasswordAlgorithmKey = { readonly code: string };

The key of a row of password_algorithm.

identity.passwordAlgorithmconstno test imports it
const passwordAlgorithm: Table<PasswordAlgorithmRow, PasswordAlgorithmInsert, "passwordAlgorithm">

How a password is hashed

identity.PrincipalRowinterfaceno test imports it
interface PrincipalRow

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

MemberTypeWhat it is
principalIdstringWhat 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
displayNamestring | nullThe 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
statusReasonstring | nullWhy the principal is in the status it is in
statusChangedAtTimestampWhen the principal's status last changed
createdAtTimestampWhen the principal was made
tenantIdstring | nullThe tenant that owns the principal; empty for a user who joins tenants by membership
ownerPrincipalIdstring | nullThe 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 it
interface PrincipalInsert

What an insert into principal takes: what the database fills may be left out.

MemberTypeWhat it is
principalIdstring
kind"agent" | "device" | "group" | "machine" | "user"
displayName?string | null
status"active" | "deleted" | "disabled" | "pending" | "suspended"
statusReason?string | null
statusChangedAtTimestamp
createdAtTimestamp
tenantId?string | null
ownerPrincipalId?string | null
identity.PrincipalKeytypeno test imports it
type PrincipalKey = { readonly principalId: string };

The key of a row of principal.

identity.principalconstno test imports it
const 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 it
interface UserAccountRow

A person's way in: who signs in, and where it stands

MemberTypeWhat it is
principalIdstringThe principal the account is
loginIdentifierstringWhat the user signs in by, unique within its home tenant
createdVia"admin" | "directory" | "federated" | "invited" | "self_signup"How the account came to be
lockedUntilTimestamp | nullUntil when the account is locked, where it is
lastAuthenticatedAtTimestamp | nullWhen the user last proved who they are
localestring | nullThe language the user wants to be spoken to in
timeZonestring | nullThe time zone the user's times are shown in
personPartyIdstringThe person the account is for
homeTenantTenantIdstring | nullThe tenant whose pool of users it is in; empty for a user who joins tenants by membership
primaryEmailElectronicContactIdstring | nullThe address the user is written to
identity.UserAccountInsertinterfaceno test imports it
interface UserAccountInsert

What an insert into user_account takes: what the database fills may be left out.

MemberTypeWhat it is
principalIdstring
loginIdentifierstring
createdVia"admin" | "directory" | "federated" | "invited" | "self_signup"
lockedUntil?Timestamp | null
lastAuthenticatedAt?Timestamp | null
locale?string | null
timeZone?string | null
personPartyIdstring
homeTenantTenantId?string | null
primaryEmailElectronicContactId?string | null
identity.UserAccountKeytypeno test imports it
type UserAccountKey = { readonly principalId: string };

The key of a row of user_account.

identity.userAccountconstno test imports it
const userAccount: Table<UserAccountRow, UserAccountInsert, "userAccount">

A person's way in: who signs in, and where it stands

identity.ContactVerificationRowinterfaceno test imports it
interface ContactVerificationRow

The proof that an address is a person's

MemberTypeWhat it is
contactVerificationIdstringWhat identifies the verification, made by the application
verifiedAtTimestampWhen the address was proved to be the person's
method"admin" | "directory_asserted" | "email_link" | "otp"How it was proved
contactElectronicContactIdstringThe address that was proved
identity.ContactVerificationInsertinterfaceno test imports it
interface ContactVerificationInsert

What an insert into contact_verification takes: what the database fills may be left out.

MemberTypeWhat it is
contactVerificationIdstring
verifiedAtTimestamp
method"admin" | "directory_asserted" | "email_link" | "otp"
contactElectronicContactIdstring
identity.ContactVerificationKeytypeno test imports it
type ContactVerificationKey = { readonly contactVerificationId: string };

The key of a row of contact_verification.

identity.contactVerificationconstno test imports it
const contactVerification: Table<ContactVerificationRow, ContactVerificationInsert, "contactVerification">

The proof that an address is a person's

identity.MembershipRowinterfaceno test imports it
interface MembershipRow

A user's place in a tenant

MemberTypeWhat it is
membershipIdstringWhat 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
joinedAtTimestamp | nullWhen the user became a member
removedAtTimestamp | nullWhen the membership ended
userAccountPrincipalIdstringThe user
tenantIdstringThe tenant
identity.MembershipInsertinterfaceno test imports it
interface MembershipInsert

What an insert into membership takes: what the database fills may be left out.

MemberTypeWhat it is
membershipIdstring
status"active" | "invited" | "removed" | "suspended"
source"admin" | "directory" | "domain_capture" | "invited" | "self_join"
joinedAt?Timestamp | null
removedAt?Timestamp | null
userAccountPrincipalIdstring
tenantIdstring
identity.MembershipKeytypeno test imports it
type MembershipKey = { readonly membershipId: string };

The key of a row of membership.

identity.membershipconstno test imports it
const membership: Table<MembershipRow, MembershipInsert, "membership">

A user's place in a tenant

identity.UserGroupRowinterfaceno test imports it
interface UserGroupRow

A set of principals that is granted what its members are

MemberTypeWhat it is
principalIdstringThe principal the group is
namestringWhat the group is called, unique within its tenant
source"directory" | "local"Where the group is kept
externalIdstring | nullWhat a directory calls the group, where it keeps it
tenantIdstringThe tenant the group is in
identity.UserGroupInsertinterfaceno test imports it
interface UserGroupInsert

What an insert into user_group takes: what the database fills may be left out.

MemberTypeWhat it is
principalIdstring
namestring
source"directory" | "local"
externalId?string | null
tenantIdstring
identity.UserGroupKeytypeno test imports it
type UserGroupKey = { readonly principalId: string };

The key of a row of user_group.

identity.userGroupconstno test imports it
const userGroup: Table<UserGroupRow, UserGroupInsert, "userGroup">

A set of principals that is granted what its members are

identity.GroupMemberRowinterfaceno test imports it
interface GroupMemberRow

A principal's place in a group: a user, or another group

MemberTypeWhat it is
groupUserGroupPrincipalIdstringThe group
memberPrincipalIdstringThe user or the group that is a member
addedAtTimestampWhen the principal was added
identity.GroupMemberInsertinterfaceno test imports it
interface GroupMemberInsert

What an insert into group_member takes: what the database fills may be left out.

MemberTypeWhat it is
groupUserGroupPrincipalIdstring
memberPrincipalIdstring
addedAtTimestamp
identity.GroupMemberKeytypeno test imports it
type GroupMemberKey = { readonly groupUserGroupPrincipalId: string; readonly memberPrincipalId: string };

The key of a row of group_member.

identity.groupMemberconstno test imports it
const groupMember: Table<GroupMemberRow, GroupMemberInsert, "groupMember">

A principal's place in a group: a user, or another group

identity.CredentialRowinterfaceno test imports it
interface CredentialRow

What a principal proves itself with; the secret is in the kind of credential

MemberTypeWhat it is
credentialIdstringWhat identifies the credential, made by the application
credentialKindCodestringWhat sort of proof it is
status"active" | "expired" | "revoked"Where it is
labelstring | nullWhat the person calls it
createdAtTimestampWhen it was made
lastUsedAtTimestamp | nullWhen it was last used
revokedAtTimestamp | nullWhen it ended, where it did
principalIdstringWhose it is
identity.CredentialInsertinterfaceno test imports it
interface CredentialInsert

What an insert into credential takes: what the database fills may be left out.

MemberTypeWhat it is
credentialIdstring
credentialKindCodestring
status"active" | "expired" | "revoked"
label?string | null
createdAtTimestamp
lastUsedAt?Timestamp | null
revokedAt?Timestamp | null
principalIdstring
identity.CredentialKeytypeno test imports it
type CredentialKey = { readonly credentialId: string };

The key of a row of credential.

identity.credentialconstno test imports it
const credential: Table<CredentialRow, CredentialInsert, "credential">

What a principal proves itself with; the secret is in the kind of credential

identity.PasswordCredentialRowinterfaceno test imports it
interface PasswordCredentialRow

A password, kept only as a hash that carries its algorithm, its parameters and its salt

MemberTypeWhat it is
credentialIdstringThe credential it is
hashstringThe hash in the PHC string form; never the password, never reversible
passwordAlgorithmCodestringHow it was hashed
changedAtTimestampWhen the password was set
mustChangebooleanWhether the user must choose another at the next sign-in
identity.PasswordCredentialInsertinterfaceno test imports it
interface PasswordCredentialInsert

What an insert into password_credential takes: what the database fills may be left out.

MemberTypeWhat it is
credentialIdstring
hashstring
passwordAlgorithmCodestring
changedAtTimestamp
mustChangeboolean
identity.PasswordCredentialKeytypeno test imports it
type PasswordCredentialKey = { readonly credentialId: string };

The key of a row of password_credential.

identity.passwordCredentialconstno test imports it
const 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 it
interface PasskeyRow

A passkey: the public half of a key pair whose private half never leaves the person's device

MemberTypeWhat it is
credentialIdstringThe credential it is
credentialIdValueUint8Array<ArrayBufferLike>What the authenticator calls the key, unique
publicKeyUint8Array<ArrayBufferLike>The public key, in COSE form
signCountnumberHow many times the authenticator says it has signed
aaguidstring | nullWhat kind of authenticator it is
backupEligiblebooleanWhether the key can be backed up
backedUpbooleanWhether it has been
userVerifiedbooleanWhether the person was verified when it was made
attestationFormatstring | nullThe form of the proof of what made it
identity.PasskeyInsertinterfaceno test imports it
interface PasskeyInsert

What an insert into passkey takes: what the database fills may be left out.

MemberTypeWhat it is
credentialIdstring
credentialIdValueUint8Array<ArrayBufferLike>
publicKeyUint8Array<ArrayBufferLike>
signCountnumber
aaguid?string | null
backupEligibleboolean
backedUpboolean
userVerifiedboolean
attestationFormat?string | null
identity.PasskeyKeytypeno test imports it
type PasskeyKey = { readonly credentialId: string };

The key of a row of passkey.

identity.passkeyconstno test imports it
const 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 it
interface PasskeyTransportsRow

How the authenticator can be reached

MemberTypeWhat it is
passkeyCredentialIdstringA passkey: the public half of a key pair whose private half never leaves the person's device
transportsstringHow the authenticator can be reached
identity.PasskeyTransportsInsertinterfaceno test imports it
interface PasskeyTransportsInsert

What an insert into passkey_transports takes: what the database fills may be left out.

MemberTypeWhat it is
passkeyCredentialIdstring
transportsstring
identity.PasskeyTransportsKeytypeno test imports it
type PasskeyTransportsKey = { readonly passkeyCredentialId: string; readonly transports: string };

The key of a row of passkey_transports.

identity.passkeyTransportsconstno test imports it
const passkeyTransports: Table<PasskeyTransportsRow, PasskeyTransportsInsert, "passkeyTransports">

How the authenticator can be reached

identity.OtpSecretRowinterfaceno test imports it
interface OtpSecretRow

The secret of a one-time-code factor, kept as ciphertext under a key held outside the database

MemberTypeWhat it is
credentialIdstringThe credential it is
secretCiphertextUint8Array<ArrayBufferLike>The secret, encrypted: the server must make codes from it, so it cannot be only hashed
keyReferencestringNames the key that encrypted it
algorithm"sha_1" | "sha_256" | "sha_512"The hash the codes are made with
digitsnumberHow many digits a code has
periodSecondsnumberHow long a code lasts
lastUsedStepnumber | nullThe time step of the last code taken, so that none is taken twice
identity.OtpSecretInsertinterfaceno test imports it
interface OtpSecretInsert

What an insert into otp_secret takes: what the database fills may be left out.

MemberTypeWhat it is
credentialIdstring
secretCiphertextUint8Array<ArrayBufferLike>
keyReferencestring
algorithm"sha_1" | "sha_256" | "sha_512"
digitsnumber
periodSecondsnumber
lastUsedStep?number | null
identity.OtpSecretKeytypeno test imports it
type OtpSecretKey = { readonly credentialId: string };

The key of a row of otp_secret.

identity.otpSecretconstno test imports it
const 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 it
interface RecoveryCodeRow

A code kept for when the other ways are lost, kept as a hash and used once

MemberTypeWhat it is
credentialIdstringThe credential it is
hashstringThe hash of the code
usedAtTimestamp | nullWhen it was used
identity.RecoveryCodeInsertinterfaceno test imports it
interface RecoveryCodeInsert

What an insert into recovery_code takes: what the database fills may be left out.

MemberTypeWhat it is
credentialIdstring
hashstring
usedAt?Timestamp | null
identity.RecoveryCodeKeytypeno test imports it
type RecoveryCodeKey = { readonly credentialId: string };

The key of a row of recovery_code.

identity.recoveryCodeconstno test imports it
const 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 it
interface ChallengeRow

Something a person is asked to prove, once: a reset link, a magic link, a code or a passkey challenge, kept as a hash

MemberTypeWhat it is
challengeIdstringWhat 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
secretHashstringThe hash of what was sent
attemptsnumberHow many times it was tried
maxAttemptsnumberHow many times it may be
expiresAtTimestampWhen it stops being valid
consumedAtTimestamp | nullWhen it was used
principalIdstring | nullWho it is for, where that is known
destinationElectronicContactIdstring | nullWhere it was sent
identity.ChallengeInsertinterfaceno test imports it
interface ChallengeInsert

What an insert into challenge takes: what the database fills may be left out.

MemberTypeWhat it is
challengeIdstring
purpose"email_verification" | "login" | "magic_link" | "passkey_authentication" | "passkey_registration" | "password_reset" | "step_up"
secretHashstring
attemptsnumber
maxAttemptsnumber
expiresAtTimestamp
consumedAt?Timestamp | null
principalId?string | null
destinationElectronicContactId?string | null
identity.ChallengeKeytypeno test imports it
type ChallengeKey = { readonly challengeId: string };

The key of a row of challenge.

identity.challengeconstno test imports it
const 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 it
interface LoginAttemptRow

A sign-in attempt, kept for lockout and for risk, with the identifier hashed so that an unknown user leaves nothing personal

MemberTypeWhat it is
loginAttemptIdstringWhat identifies the attempt, made by the application
loginIdentifierHashstringThe identifier, hashed with a pepper
ipstringWhere it came from
outcome"blocked" | "locked" | "mfa_failed" | "success" | "unknown_user" | "wrong_secret"How it ended
atTimestampWhen it was
principalIdstring | nullWho it was for, where that is known
identity.LoginAttemptInsertinterfaceno test imports it
interface LoginAttemptInsert

What an insert into login_attempt takes: what the database fills may be left out.

MemberTypeWhat it is
loginAttemptIdstring
loginIdentifierHashstring
ipstring
outcome"blocked" | "locked" | "mfa_failed" | "success" | "unknown_user" | "wrong_secret"
atTimestamp
principalId?string | null
identity.LoginAttemptKeytypeno test imports it
type LoginAttemptKey = { readonly loginAttemptId: string };

The key of a row of login_attempt.

identity.loginAttemptconstno test imports it
const 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 it
interface KnownBrowserRow

A browser or app that a principal signs in from, recognised by a hash of what it says it is

MemberTypeWhat it is
knownBrowserIdstringWhat identifies the browser, made by the application
fingerprintHashstringA hash of what the browser says it is
labelstring | nullWhat the person calls it
firstSeenAtTimestampWhen it was first seen
lastSeenAtTimestampWhen it was last seen
trustedUntilTimestamp | nullUntil when it is trusted not to be asked for a second factor
principalIdstringWhose it is
identity.KnownBrowserInsertinterfaceno test imports it
interface KnownBrowserInsert

What an insert into known_browser takes: what the database fills may be left out.

MemberTypeWhat it is
knownBrowserIdstring
fingerprintHashstring
label?string | null
firstSeenAtTimestamp
lastSeenAtTimestamp
trustedUntil?Timestamp | null
principalIdstring
identity.KnownBrowserKeytypeno test imports it
type KnownBrowserKey = { readonly knownBrowserId: string };

The key of a row of known_browser.

identity.knownBrowserconstno test imports it
const 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 it
interface LoginSessionRow

A principal's being signed in, from a device, for a time

MemberTypeWhat it is
sessionIdstringWhat identifies the session, made by the application
authenticatedAtTimestampWhen the principal proved who they are
lastSeenAtTimestampWhen the session was last used
idleExpiresAtTimestampWhen it ends if it is not used
absoluteExpiresAtTimestampWhen it ends whatever
assuranceLevel"aal_1" | "aal_2" | "aal_3"How sure it is of who it is for
federatedProviderstring | nullThe identity provider it was signed in through, where it was
ipstringWhere it came from
userAgentstringWhat the browser says it is
status"active" | "expired" | "revoked" | "signed_out"Where the session is
revokedAtTimestamp | nullWhen it was ended early
revokedReason"admin" | "password_change" | "policy" | "reuse_detected" | "risk" | "user" | nullWhy it was ended early
stepUpAtTimestamp | nullWhen the principal last proved who they are again
principalIdstringWho is signed in
tenantIdstring | nullThe tenant the session is working in
knownBrowserIdstring | nullThe browser or app it is on
identity.LoginSessionInsertinterfaceno test imports it
interface LoginSessionInsert

What an insert into login_session takes: what the database fills may be left out.

MemberTypeWhat it is
sessionIdstring
authenticatedAtTimestamp
lastSeenAtTimestamp
idleExpiresAtTimestamp
absoluteExpiresAtTimestamp
assuranceLevel"aal_1" | "aal_2" | "aal_3"
federatedProvider?string | null
ipstring
userAgentstring
status"active" | "expired" | "revoked" | "signed_out"
revokedAt?Timestamp | null
revokedReason?"admin" | "password_change" | "policy" | "reuse_detected" | "risk" | "user" | null
stepUpAt?Timestamp | null
principalIdstring
tenantId?string | null
knownBrowserId?string | null
identity.LoginSessionKeytypeno test imports it
type LoginSessionKey = { readonly sessionId: string };

The key of a row of login_session.

identity.loginSessionconstno test imports it
const loginSession: Table<LoginSessionRow, LoginSessionInsert, "loginSession">

A principal's being signed in, from a device, for a time

identity.LoginSessionAuthMethodsRowinterfaceno test imports it
interface LoginSessionAuthMethodsRow

How it was authenticated

MemberTypeWhat it is
loginSessionSessionIdstringA principal's being signed in, from a device, for a time
authMethodsstringHow it was authenticated
identity.LoginSessionAuthMethodsInsertinterfaceno test imports it
interface LoginSessionAuthMethodsInsert

What an insert into login_session_auth_methods takes: what the database fills may be left out.

MemberTypeWhat it is
loginSessionSessionIdstring
authMethodsstring
identity.LoginSessionAuthMethodsKeytypeno test imports it
type LoginSessionAuthMethodsKey = { readonly loginSessionSessionId: string; readonly authMethods: string };

The key of a row of login_session_auth_methods.

identity.loginSessionAuthMethodsconstno test imports it
const loginSessionAuthMethods: Table<LoginSessionAuthMethodsRow, LoginSessionAuthMethodsInsert, "loginSessionAuthMethods">

How it was authenticated

identity.RefreshTokenRowinterfaceno test imports it
interface RefreshTokenRow

A token that renews a session, kept as a hash, used once and replaced by the next one of its family

MemberTypeWhat it is
refreshTokenIdstringWhat identifies the token, made by the application
familyIdstringWhat every token rotated from one issue shares, so that a reuse ends them all
tokenHashstringThe hash of the token
issuedAtTimestampWhen it was made
expiresAtTimestampWhen it stops being valid
usedAtTimestamp | nullWhen it was exchanged for the next
revokedAtTimestamp | nullWhen it was ended early
sessionLoginSessionSessionIdstringThe session it renews
replacedByRefreshTokenIdstring | nullThe token that took its place
identity.RefreshTokenInsertinterfaceno test imports it
interface RefreshTokenInsert

What an insert into refresh_token takes: what the database fills may be left out.

MemberTypeWhat it is
refreshTokenIdstring
familyIdstring
tokenHashstring
issuedAtTimestamp
expiresAtTimestamp
usedAt?Timestamp | null
revokedAt?Timestamp | null
sessionLoginSessionSessionIdstring
replacedByRefreshTokenId?string | null
identity.RefreshTokenKeytypeno test imports it
type RefreshTokenKey = { readonly refreshTokenId: string };

The key of a row of refresh_token.

identity.refreshTokenconstno test imports it
const 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 it
interface InvitationRow

An invitation to join a tenant

MemberTypeWhat it is
invitationIdstringWhat identifies the invitation, made by the application
emailstringThe address it was sent to
tokenHashstringThe hash of the secret in the link
status"accepted" | "expired" | "pending" | "revoked"Where it is
expiresAtTimestampWhen it stops being valid
acceptedAtTimestamp | nullWhen it was taken up
messagestring | nullWhat the inviter wrote
tenantIdstringThe tenant the person is invited to
invitedByPrincipalIdstringWho invited
acceptedByUserAccountPrincipalIdstring | nullWho took it up
identity.InvitationInsertinterfaceno test imports it
interface InvitationInsert

What an insert into invitation takes: what the database fills may be left out.

MemberTypeWhat it is
invitationIdstring
emailstring
tokenHashstring
status"accepted" | "expired" | "pending" | "revoked"
expiresAtTimestamp
acceptedAt?Timestamp | null
message?string | null
tenantIdstring
invitedByPrincipalIdstring
acceptedByUserAccountPrincipalId?string | null
identity.InvitationKeytypeno test imports it
type InvitationKey = { readonly invitationId: string };

The key of a row of invitation.

identity.invitationconstno test imports it
const invitation: Table<InvitationRow, InvitationInsert, "invitation">

An invitation to join a tenant

identity.DomainClaimRowinterfaceno test imports it
interface DomainClaimRow

A claim on a domain, waiting to be proved

MemberTypeWhat it is
domainClaimIdstringWhat identifies the claim, made by the application
domainstringThe domain claimed
challengeValuestringWhat 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
requestedAtTimestampWhen it was asked for
expiresAtTimestampWhen it stops being valid
tenantIdstringThe tenant that claims it
identity.DomainClaimInsertinterfaceno test imports it
interface DomainClaimInsert

What an insert into domain_claim takes: what the database fills may be left out.

MemberTypeWhat it is
domainClaimIdstring
domainstring
challengeValuestring
method"dns_txt" | "email" | "http_file"
status"expired" | "failed" | "pending"
requestedAtTimestamp
expiresAtTimestamp
tenantIdstring
identity.DomainClaimKeytypeno test imports it
type DomainClaimKey = { readonly domainClaimId: string };

The key of a row of domain_claim.

identity.domainClaimconstno test imports it
const domainClaim: Table<DomainClaimRow, DomainClaimInsert, "domainClaim">

A claim on a domain, waiting to be proved

identity.VerifiedDomainRowinterfaceno test imports it
interface VerifiedDomainRow

A domain that a tenant has proved to be its own, and what that means for those who sign in with it

MemberTypeWhat it is
verifiedDomainIdstringWhat identifies the domain, made by the application
domainstringThe domain, unique across every tenant
verifiedAtTimestampWhen it was proved
policy"capture_users" | "enforce_sso" | "none"What it means for those who sign in with it
lastCheckedAtTimestamp | nullWhen it was last checked still to be the tenant's
tenantIdstringThe tenant it is proved for
identity.VerifiedDomainInsertinterfaceno test imports it
interface VerifiedDomainInsert

What an insert into verified_domain takes: what the database fills may be left out.

MemberTypeWhat it is
verifiedDomainIdstring
domainstring
verifiedAtTimestamp
policy"capture_users" | "enforce_sso" | "none"
lastCheckedAt?Timestamp | null
tenantIdstring
identity.VerifiedDomainKeytypeno test imports it
type VerifiedDomainKey = { readonly verifiedDomainId: string };

The key of a row of verified_domain.

identity.verifiedDomainconstno test imports it
const 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 it
interface PasswordPolicyRow

The rules for passwords

MemberTypeWhat it is
passwordPolicyIdstringWhat identifies the policy, made by the application
minLengthnumberThe fewest characters
maxLengthnumberThe most characters
requireBreachCheckbooleanWhether a password is refused that is known from a breach
historyCountnumberHow many earlier passwords may not be used again
maxAgeDaysnumber | nullAfter how many days a password must change; empty, in line with NIST SP 800-63B
tenantIdstring | nullThe tenant the policy is for; empty for the platform's, which a tenant's replaces
identity.PasswordPolicyInsertinterfaceno test imports it
interface PasswordPolicyInsert

What an insert into password_policy takes: what the database fills may be left out.

MemberTypeWhat it is
passwordPolicyIdstring
minLengthnumber
maxLengthnumber
requireBreachCheckboolean
historyCountnumber
maxAgeDays?number | null
tenantId?string | null
identity.PasswordPolicyKeytypeno test imports it
type PasswordPolicyKey = { readonly passwordPolicyId: string };

The key of a row of password_policy.

identity.passwordPolicyconstno test imports it
const passwordPolicy: Table<PasswordPolicyRow, PasswordPolicyInsert, "passwordPolicy">

The rules for passwords

identity.PasswordPolicyAllowedAlgorithmsRowinterfaceno test imports it
interface PasswordPolicyAllowedAlgorithmsRow

The algorithms a hash may use

MemberTypeWhat it is
passwordPolicyIdstringThe rules for passwords
allowedAlgorithmsstringThe algorithms a hash may use
identity.PasswordPolicyAllowedAlgorithmsInsertinterfaceno test imports it
interface PasswordPolicyAllowedAlgorithmsInsert

What an insert into password_policy_allowed_algorithms takes: what the database fills may be left out.

MemberTypeWhat it is
passwordPolicyIdstring
allowedAlgorithmsstring
identity.PasswordPolicyAllowedAlgorithmsKeytypeno test imports it
type PasswordPolicyAllowedAlgorithmsKey = { readonly passwordPolicyId: string; readonly allowedAlgorithms: string };

The key of a row of password_policy_allowed_algorithms.

identity.passwordPolicyAllowedAlgorithmsconstno test imports it
const passwordPolicyAllowedAlgorithms: Table<PasswordPolicyAllowedAlgorithmsRow, PasswordPolicyAllowedAlgorithmsInsert, "passwordPolicyAllowedAlgorithms">

The algorithms a hash may use

identity.LockoutPolicyRowinterfaceno test imports it
interface LockoutPolicyRow

The rules for locking an account after failed sign-ins

MemberTypeWhat it is
lockoutPolicyIdstringWhat identifies the policy, made by the application
failedAttemptsnumberHow many failures lock it
windowMinutesnumberThe time they are counted in
lockMinutesnumberHow long it stays locked
unlockMode"admin" | "self_service" | "timer"How it is freed
tenantIdstring | nullThe tenant the policy is for; empty for the platform's, which a tenant's replaces
identity.LockoutPolicyInsertinterfaceno test imports it
interface LockoutPolicyInsert

What an insert into lockout_policy takes: what the database fills may be left out.

MemberTypeWhat it is
lockoutPolicyIdstring
failedAttemptsnumber
windowMinutesnumber
lockMinutesnumber
unlockMode"admin" | "self_service" | "timer"
tenantId?string | null
identity.LockoutPolicyKeytypeno test imports it
type LockoutPolicyKey = { readonly lockoutPolicyId: string };

The key of a row of lockout_policy.

identity.lockoutPolicyconstno test imports it
const lockoutPolicy: Table<LockoutPolicyRow, LockoutPolicyInsert, "lockoutPolicy">

The rules for locking an account after failed sign-ins

identity.SessionPolicyRowinterfaceno test imports it
interface SessionPolicyRow

The rules for sessions

MemberTypeWhat it is
sessionPolicyIdstringWhat identifies the policy, made by the application
idleMinutesnumberHow long a session lasts unused
absoluteMinutesnumberHow long it lasts at most
concurrentSessionLimitnumber | nullHow many a principal may have at once
bindToDevicebooleanWhether a session is tied to the device it began on
stepUpMinutesnumberHow long a second proof counts for
tenantIdstring | nullThe tenant the policy is for; empty for the platform's, which a tenant's replaces
identity.SessionPolicyInsertinterfaceno test imports it
interface SessionPolicyInsert

What an insert into session_policy takes: what the database fills may be left out.

MemberTypeWhat it is
sessionPolicyIdstring
idleMinutesnumber
absoluteMinutesnumber
concurrentSessionLimit?number | null
bindToDeviceboolean
stepUpMinutesnumber
tenantId?string | null
identity.SessionPolicyKeytypeno test imports it
type SessionPolicyKey = { readonly sessionPolicyId: string };

The key of a row of session_policy.

identity.sessionPolicyconstno test imports it
const sessionPolicy: Table<SessionPolicyRow, SessionPolicyInsert, "sessionPolicy">

The rules for sessions

identity.MfaPolicyRowinterfaceno test imports it
interface MfaPolicyRow

The rules for second factors

MemberTypeWhat it is
mfaPolicyIdstringWhat identifies the policy, made by the application
requirement"adaptive" | "none" | "optional" | "required"Whether a second factor is needed
graceDaysnumberHow long a user may go without one when it becomes required
rememberDeviceDaysnumberHow long a device is trusted not to be asked
tenantIdstring | nullThe tenant the policy is for; empty for the platform's, which a tenant's replaces
identity.MfaPolicyInsertinterfaceno test imports it
interface MfaPolicyInsert

What an insert into mfa_policy takes: what the database fills may be left out.

MemberTypeWhat it is
mfaPolicyIdstring
requirement"adaptive" | "none" | "optional" | "required"
graceDaysnumber
rememberDeviceDaysnumber
tenantId?string | null
identity.MfaPolicyKeytypeno test imports it
type MfaPolicyKey = { readonly mfaPolicyId: string };

The key of a row of mfa_policy.

identity.mfaPolicyconstno test imports it
const mfaPolicy: Table<MfaPolicyRow, MfaPolicyInsert, "mfaPolicy">

The rules for second factors

identity.MfaPolicyAllowedKindsRowinterfaceno test imports it
interface MfaPolicyAllowedKindsRow

The factors that may be used

MemberTypeWhat it is
mfaPolicyIdstringThe rules for second factors
allowedKindsstringThe factors that may be used
identity.MfaPolicyAllowedKindsInsertinterfaceno test imports it
interface MfaPolicyAllowedKindsInsert

What an insert into mfa_policy_allowed_kinds takes: what the database fills may be left out.

MemberTypeWhat it is
mfaPolicyIdstring
allowedKindsstring
identity.MfaPolicyAllowedKindsKeytypeno test imports it
type MfaPolicyAllowedKindsKey = { readonly mfaPolicyId: string; readonly allowedKinds: string };

The key of a row of mfa_policy_allowed_kinds.

identity.mfaPolicyAllowedKindsconstno test imports it
const mfaPolicyAllowedKinds: Table<MfaPolicyAllowedKindsRow, MfaPolicyAllowedKindsInsert, "mfaPolicyAllowedKinds">

The factors that may be used

identity.MfaPolicyRequiredForRolesRowinterfaceno test imports it
interface MfaPolicyRequiredForRolesRow

The roles whose holders must always use one, by key

MemberTypeWhat it is
mfaPolicyIdstringThe rules for second factors
requiredForRolesstringThe roles whose holders must always use one, by key
identity.MfaPolicyRequiredForRolesInsertinterfaceno test imports it
interface MfaPolicyRequiredForRolesInsert

What an insert into mfa_policy_required_for_roles takes: what the database fills may be left out.

MemberTypeWhat it is
mfaPolicyIdstring
requiredForRolesstring
identity.MfaPolicyRequiredForRolesKeytypeno test imports it
type MfaPolicyRequiredForRolesKey = { readonly mfaPolicyId: string; readonly requiredForRoles: string };

The key of a row of mfa_policy_required_for_roles.

identity.mfaPolicyRequiredForRolesconstno test imports it
const mfaPolicyRequiredForRoles: Table<MfaPolicyRequiredForRolesRow, MfaPolicyRequiredForRolesInsert, "mfaPolicyRequiredForRoles">

The roles whose holders must always use one, by key

identity.AuditEventRowinterfaceno test imports it
interface AuditEventRow

Something that was done, or tried, kept in a chain of hashes so that it cannot be changed without showing

MemberTypeWhat it is
auditEventIdstringWhat identifies the event, made by the application
sequencenumberWhich 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
occurredAtTimestampWhen 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" | nullWhat the decision was, for an event that records one
delegationKeystring | nullThe delegation it was done under; not a reference, so that the trail outlives it
runKeystring | nullThe run of an agent it was done in; not a reference, so that the trail outlives it
traceIdstring | nullThe trace it is part of
chainunknownThe principals between the person accountable and the actor, root first
policyRefsunknownThe roles, policies and grants that decided
actionstringWhat was done, named subject.verb; each module adds its own
outcome"denied" | "failure" | "success"How it ended
targetConceptstring | nullThe kind of thing it was done to
targetKeystring | nullThe thing it was done to; a loose reference, so that the trail outlives what it names
sessionKeystring | nullThe session it was done in; not a reference, because sessions are purged
requestIdstring | nullThe request it was part of
ipstring | nullWhere it came from
userAgentstring | nullWhat the client says it is
reasonstring | nullWhy, where a reason was given
detailunknownWhat else matters, with no secret in it
previousHashstringThe hash of the event before it in the chain
eventHashstringThe hash of this event and the one before
tenantIdstring | nullThe tenant it was in
actorPrincipalIdstring | nullWho did it, where a principal did
onBehalfOfPrincipalIdstring | nullThe person or group accountable at the root of the chain the actor acted in
identity.AuditEventInsertinterfaceno test imports it
interface AuditEventInsert

What an insert into audit_event takes: what the database fills may be left out.

MemberTypeWhat it is
auditEventIdstring
sequencenumber
occurredAtTimestamp
actorKind"agent" | "device" | "impersonator" | "machine" | "system" | "user"
decision?"allow" | "deny" | null
delegationKey?string | null
runKey?string | null
traceId?string | null
chain?unknown
policyRefs?unknown
actionstring
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
previousHashstring
eventHashstring
tenantId?string | null
actorPrincipalId?string | null
onBehalfOfPrincipalId?string | null
identity.AuditEventKeytypeno test imports it
type AuditEventKey = { readonly auditEventId: string };

The key of a row of audit_event.

identity.auditEventconstno test imports it
const 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

Titles, headings, exports, tables, columns and requirements. Esc closes.