IF Commons GitHub

sql/typed/models/identity-access.auto

The typed tables of the identityAccess model, generated by IFC Data from the model. Do not edit: change the model and run bun tools/typed.ts --write.

Role-based access for every kind of principal

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

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

identityAccessnamespace
namespace identityAccess
identityAccess.EntitlementSourceRowinterfaceno test imports it
interface EntitlementSourceRow

Where a tenant's entitlement comes from

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
identityAccess.EntitlementSourceInsertinterfaceno test imports it
interface EntitlementSourceInsert

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

MemberTypeWhat it is
codestring
labelstring
description?string | null
identityAccess.EntitlementSourceKeytypeno test imports it
type EntitlementSourceKey = { readonly code: string };

The key of a row of entitlement_source.

identityAccess.entitlementSourceconstno test imports it
const entitlementSource: Table<EntitlementSourceRow, EntitlementSourceInsert, "entitlementSource">

Where a tenant's entitlement comes from

identityAccess.SeparationKindRowinterfaceno test imports it
interface SeparationKindRow

How a separation of duties is held

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
identityAccess.SeparationKindInsertinterfaceno test imports it
interface SeparationKindInsert

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

MemberTypeWhat it is
codestring
labelstring
description?string | null
identityAccess.SeparationKindKeytypeno test imports it
type SeparationKindKey = { readonly code: string };

The key of a row of separation_kind.

identityAccess.separationKindconstno test imports it
const separationKind: Table<SeparationKindRow, SeparationKindInsert, "separationKind">

How a separation of duties is held

identityAccess.PermissionRowinterfaceno test imports it
interface PermissionRow

A thing that can be done, named by its resource and its action

MemberTypeWhat it is
permissionIdstringWhat identifies the permission, made by the application
permissionKeystringThe permission as resource:action, unique
definitionstringWhat the permission lets a principal do
ownerModulestringThe module that registered the permission
riskLevel"critical" | "high" | "low" | "medium"How much harm it can do if it is misused
sideEffect"external" | "irreversible" | "none" | "read" | "write"What using it does
featureKeystring | nullThe feature a tenant must be entitled to for the permission to count
identityAccess.PermissionInsertinterfaceno test imports it
interface PermissionInsert

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

MemberTypeWhat it is
permissionIdstring
permissionKeystring
definitionstring
ownerModulestring
riskLevel"critical" | "high" | "low" | "medium"
sideEffect"external" | "irreversible" | "none" | "read" | "write"
featureKey?string | null
identityAccess.PermissionKeytypeno test imports it
type PermissionKey = { readonly permissionId: string };

The key of a row of permission.

identityAccess.permissionconstno test imports it
const permission: Table<PermissionRow, PermissionInsert, "permission">

A thing that can be done, named by its resource and its action

identityAccess.PermissionAppliesToRowinterfaceno test imports it
interface PermissionAppliesToRow

The kinds of principal that may hold it; every kind where none is said

MemberTypeWhat it is
permissionIdstringA thing that can be done, named by its resource and its action
appliesTostringThe kinds of principal that may hold it; every kind where none is said
identityAccess.PermissionAppliesToInsertinterfaceno test imports it
interface PermissionAppliesToInsert

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

MemberTypeWhat it is
permissionIdstring
appliesTostring
identityAccess.PermissionAppliesToKeytypeno test imports it
type PermissionAppliesToKey = { readonly permissionId: string; readonly appliesTo: string };

The key of a row of permission_applies_to.

identityAccess.permissionAppliesToconstno test imports it
const permissionAppliesTo: Table<PermissionAppliesToRow, PermissionAppliesToInsert, "permissionAppliesTo">

The kinds of principal that may hold it; every kind where none is said

identityAccess.AccessRoleRowinterfaceno test imports it
interface AccessRoleRow

A set of permissions that is granted together, and that may inherit those of other roles

MemberTypeWhat it is
roleIdstringWhat identifies the role, made by the application
roleKeystringThe role's short name, unique within its tenant
namestringWhat the role is called
kind"custom" | "system"Whether the platform or a tenant made it
definitionstringWhat a holder of the role does
isPrivilegedbooleanWhether it is a role that an agent may never hold, and that needs a time-boxed grant where privileged access is composed
status"active" | "retired"Whether the role is in use
tenantIdstring | nullThe tenant that made the role; empty for a role of the platform, usable in every tenant
identityAccess.AccessRoleInsertinterfaceno test imports it
interface AccessRoleInsert

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

MemberTypeWhat it is
roleIdstring
roleKeystring
namestring
kind"custom" | "system"
definitionstring
isPrivilegedboolean
status"active" | "retired"
tenantId?string | null
identityAccess.AccessRoleKeytypeno test imports it
type AccessRoleKey = { readonly roleId: string };

The key of a row of access_role.

identityAccess.accessRoleconstno test imports it
const accessRole: Table<AccessRoleRow, AccessRoleInsert, "accessRole">

A set of permissions that is granted together, and that may inherit those of other roles

identityAccess.AccessRoleAppliesToRowinterfaceno test imports it
interface AccessRoleAppliesToRow

The kinds of principal that may hold it; people, machines and groups where none is said

MemberTypeWhat it is
accessRoleRoleIdstringA set of permissions that is granted together, and that may inherit those of other roles
appliesTostringThe kinds of principal that may hold it; people, machines and groups where none is said
identityAccess.AccessRoleAppliesToInsertinterfaceno test imports it
interface AccessRoleAppliesToInsert

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

MemberTypeWhat it is
accessRoleRoleIdstring
appliesTostring
identityAccess.AccessRoleAppliesToKeytypeno test imports it
type AccessRoleAppliesToKey = { readonly accessRoleRoleId: string; readonly appliesTo: string };

The key of a row of access_role_applies_to.

identityAccess.accessRoleAppliesToconstno test imports it
const accessRoleAppliesTo: Table<AccessRoleAppliesToRow, AccessRoleAppliesToInsert, "accessRoleAppliesTo">

The kinds of principal that may hold it; people, machines and groups where none is said

identityAccess.RoleInheritanceRowinterfaceno test imports it
interface RoleInheritanceRow

A role that inherits another: whoever holds the senior role holds what the junior role holds

MemberTypeWhat it is
seniorAccessRoleRoleIdstringThe role that inherits
juniorAccessRoleRoleIdstringThe role that is inherited
identityAccess.RoleInheritanceInsertinterfaceno test imports it
interface RoleInheritanceInsert

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

MemberTypeWhat it is
seniorAccessRoleRoleIdstring
juniorAccessRoleRoleIdstring
identityAccess.RoleInheritanceKeytypeno test imports it
type RoleInheritanceKey = { readonly seniorAccessRoleRoleId: string; readonly juniorAccessRoleRoleId: string };

The key of a row of role_inheritance.

identityAccess.roleInheritanceconstno test imports it
const roleInheritance: Table<RoleInheritanceRow, RoleInheritanceInsert, "roleInheritance">

A role that inherits another: whoever holds the senior role holds what the junior role holds

identityAccess.RolePermissionRowinterfaceno test imports it
interface RolePermissionRow

A permission that a role holds

MemberTypeWhat it is
roleAccessRoleRoleIdstringThe role
permissionIdstringThe permission
identityAccess.RolePermissionInsertinterfaceno test imports it
interface RolePermissionInsert

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

MemberTypeWhat it is
roleAccessRoleRoleIdstring
permissionIdstring
identityAccess.RolePermissionKeytypeno test imports it
type RolePermissionKey = { readonly roleAccessRoleRoleId: string; readonly permissionId: string };

The key of a row of role_permission.

identityAccess.rolePermissionconstno test imports it
const rolePermission: Table<RolePermissionRow, RolePermissionInsert, "rolePermission">

A permission that a role holds

identityAccess.SeparationRuleRowinterfaceno test imports it
interface SeparationRuleRow

A rule that no principal may hold too many of a set of roles together

MemberTypeWhat it is
separationRuleIdstringWhat identifies the rule, made by the application
namestringWhat the rule is called
separationKindCodestringHow the separation is held
limitCountnumberHow many of the roles together are too many: two for the classic pair
status"active" | "retired"Whether the rule is applied
tenantIdstring | nullThe tenant the rule is for; empty for the platform's
identityAccess.SeparationRuleInsertinterfaceno test imports it
interface SeparationRuleInsert

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

MemberTypeWhat it is
separationRuleIdstring
namestring
separationKindCodestring
limitCountnumber
status"active" | "retired"
tenantId?string | null
identityAccess.SeparationRuleKeytypeno test imports it
type SeparationRuleKey = { readonly separationRuleId: string };

The key of a row of separation_rule.

identityAccess.separationRuleconstno test imports it
const separationRule: Table<SeparationRuleRow, SeparationRuleInsert, "separationRule">

A rule that no principal may hold too many of a set of roles together

identityAccess.SeparationRuleRoleRowinterfaceno test imports it
interface SeparationRuleRoleRow

A role that a separation rule is about

MemberTypeWhat it is
ruleSeparationRuleIdstringThe rule
roleAccessRoleRoleIdstringThe role
identityAccess.SeparationRuleRoleInsertinterfaceno test imports it
interface SeparationRuleRoleInsert

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

MemberTypeWhat it is
ruleSeparationRuleIdstring
roleAccessRoleRoleIdstring
identityAccess.SeparationRuleRoleKeytypeno test imports it
type SeparationRuleRoleKey = { readonly ruleSeparationRuleId: string; readonly roleAccessRoleRoleId: string };

The key of a row of separation_rule_role.

identityAccess.separationRuleRoleconstno test imports it
const separationRuleRole: Table<SeparationRuleRoleRow, SeparationRuleRoleInsert, "separationRuleRole">

A role that a separation rule is about

identityAccess.RoleAssignmentRowinterfaceno test imports it
interface RoleAssignmentRow

A role granted to a principal of any kind, in a tenant, perhaps for one resource and for a time

MemberTypeWhat it is
roleAssignmentIdstringWhat identifies the grant, made by the application
resourceTypestring | nullThe kind of the one resource the grant is limited to, where it is
resourceIdstring | nullThe one resource the grant is limited to, where it is
validFromTimestampWhen the grant starts
validToTimestamp | nullWhen the grant ends, where it does
reasonstring | nullWhy it was granted
status"active" | "expired" | "revoked"Where the grant is
revokedAtTimestamp | nullWhen it was ended early
via"direct" | "directory" | "invitation" | "privileged_grant"How it came to be
assignmentKeystringA hash of the principal, the role, the tenant and the resource, unique, so that a grant is not made twice where the resource is empty
principalIdstringWho holds the role
roleAccessRoleRoleIdstringThe role
tenantIdstringThe tenant the grant is in
grantedByPrincipalIdstringWho granted it
identityAccess.RoleAssignmentInsertinterfaceno test imports it
interface RoleAssignmentInsert

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

MemberTypeWhat it is
roleAssignmentIdstring
resourceType?string | null
resourceId?string | null
validFromTimestamp
validTo?Timestamp | null
reason?string | null
status"active" | "expired" | "revoked"
revokedAt?Timestamp | null
via"direct" | "directory" | "invitation" | "privileged_grant"
assignmentKeystring
principalIdstring
roleAccessRoleRoleIdstring
tenantIdstring
grantedByPrincipalIdstring
identityAccess.RoleAssignmentKeytypeno test imports it
type RoleAssignmentKey = { readonly roleAssignmentId: string };

The key of a row of role_assignment.

identityAccess.roleAssignmentconstno test imports it
const roleAssignment: Table<RoleAssignmentRow, RoleAssignmentInsert, "roleAssignment">

A role granted to a principal of any kind, in a tenant, perhaps for one resource and for a time

identityAccess.EntitlementRowinterfaceno test imports it
interface EntitlementRow

What a tenant may use, as distinct from what a principal may do

MemberTypeWhat it is
entitlementIdstringWhat identifies the entitlement, made by the application
featureKeystringThe feature the tenant may use
limitValuenumber | nullHow much of it, where it is limited
validFromTimestampWhen it starts
validToTimestamp | nullWhen it ends, where it does
entitlementSourceCodestringWhere it comes from
tenantIdstringThe tenant
identityAccess.EntitlementInsertinterfaceno test imports it
interface EntitlementInsert

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

MemberTypeWhat it is
entitlementIdstring
featureKeystring
limitValue?number | null
validFromTimestamp
validTo?Timestamp | null
entitlementSourceCodestring
tenantIdstring
identityAccess.EntitlementKeytypeno test imports it
type EntitlementKey = { readonly entitlementId: string };

The key of a row of entitlement.

identityAccess.entitlementconstno test imports it
const entitlement: Table<EntitlementRow, EntitlementInsert, "entitlement">

What a tenant may use, as distinct from what a principal may do

identityAccess.InvitationRoleRowinterfaceno test imports it
interface InvitationRoleRow

A role that an invitation grants when it is accepted

MemberTypeWhat it is
invitationIdstringThe invitation
roleAccessRoleRoleIdstringThe role
identityAccess.InvitationRoleInsertinterfaceno test imports it
interface InvitationRoleInsert

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

MemberTypeWhat it is
invitationIdstring
roleAccessRoleRoleIdstring
identityAccess.InvitationRoleKeytypeno test imports it
type InvitationRoleKey = { readonly invitationId: string; readonly roleAccessRoleRoleId: string };

The key of a row of invitation_role.

identityAccess.invitationRoleconstno test imports it
const invitationRole: Table<InvitationRoleRow, InvitationRoleInsert, "invitationRole">

A role that an invitation grants when it is accepted

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