IF Commons GitHub

separationRule

concept

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

Model identityAccess. Written in commons/data/models/identity-access/concepts.ts:71. Identified by separationRuleId.

Governance: attributes

kindcode of separationKindrequired

How the separation is held

Becomes the column separation_kind_code of separation_rule.

Written at commons/data/models/identity-access/concepts.ts:76

limitCountintegerrequired

How many of the roles together are too many: two for the classic pair

Becomes the column limit_count of separation_rule.

Written at commons/data/models/identity-access/concepts.ts:77

nametextrequired

What the rule is called

Becomes the column name of separation_rule.

Written at commons/data/models/identity-access/concepts.ts:75

separationRuleIdidentifierrequired

What identifies the rule, made by the application

Becomes the column separation_rule_id of separation_rule.

Written at commons/data/models/identity-access/concepts.ts:74

statuscode of useStatusrequired

Whether the rule is applied

Becomes the column status of separation_rule.

Written at commons/data/models/identity-access/concepts.ts:78

Governance: relationships

tenantoptional

The tenant the rule is for; empty for the platform's To tenant. Written at commons/data/models/identity-access/concepts.ts:113

Logical: the table

Projects to the table separation_rule with the primary key separation_rule_id.

ColumnTypeNullRoleFrom
limit_countintegerfalseattributeseparationRule.limitCount
nametextfalseattributeseparationRule.name
separation_kind_codetextfalsereferenceseparationRule.kind
separation_rule_idtextfalseattributeseparationRule.separationRuleId
statustextfalseattributeseparationRule.status
tenant_idtexttruereferenceseparationRule.tenant

Physical: SQL

CREATE TABLE IF NOT EXISTS "separation_rule" (
    "separation_rule_id" VARCHAR NOT NULL PRIMARY KEY,
    "name" VARCHAR NOT NULL,
    "separation_kind_code" VARCHAR NOT NULL,
    "limit_count" INTEGER NOT NULL,
    "status" VARCHAR NOT NULL,
    "tenant_id" VARCHAR,
    CONSTRAINT "separation_rule_separation_kind_code_fk" FOREIGN KEY ("separation_kind_code") REFERENCES "separation_kind" ("code"),
    CONSTRAINT "separation_rule_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
    CONSTRAINT "separation_rule_status_ck" CHECK ("status" IN ('active', 'retired'))
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { separationRule } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/identity-access.auto.ts: do not edit.

import { from } from "@intellectual-frontiers/data/sql/typed";
import { separationRule } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(separationRule).select((s) => ({ separationRuleId: s.separationRule.separationRuleId, name: s.separationRule.name })).run(runner);

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