IF Commons GitHub

passwordPolicy

concept

The rules for passwords

Model identity. Written in commons/data/models/identity/concepts.ts:372. Identified by passwordPolicyId.

Governance: attributes

allowedAlgorithmscode of passwordAlgorithmmany

The algorithms a hash may use

Becomes the column allowed_algorithms of password_policy.

Written at commons/data/models/identity/concepts.ts:381

historyCountintegerrequired

How many earlier passwords may not be used again

Becomes the column history_count of password_policy.

Written at commons/data/models/identity/concepts.ts:379

maxAgeDaysintegeroptional

After how many days a password must change; empty, in line with NIST SP 800-63B

Becomes the column max_age_days of password_policy.

Written at commons/data/models/identity/concepts.ts:380

maxLengthintegerrequired

The most characters

Becomes the column max_length of password_policy.

Written at commons/data/models/identity/concepts.ts:377

minLengthintegerrequired

The fewest characters

Becomes the column min_length of password_policy.

Written at commons/data/models/identity/concepts.ts:376

passwordPolicyIdidentifierrequired

What identifies the policy, made by the application

Becomes the column password_policy_id of password_policy.

Written at commons/data/models/identity/concepts.ts:375

requireBreachCheckbooleanrequired

Whether a password is refused that is known from a breach

Becomes the column require_breach_check of password_policy.

Written at commons/data/models/identity/concepts.ts:378

Governance: relationships

tenantoptional

The tenant the policy is for; empty for the platform's, which a tenant's replaces To tenant. Written at commons/data/models/identity/concepts.ts:466

Logical: the table

Projects to the table password_policy with the primary key password_policy_id.

ColumnTypeNullRoleFrom
history_countintegerfalseattributepasswordPolicy.historyCount
max_age_daysintegertrueattributepasswordPolicy.maxAgeDays
max_lengthintegerfalseattributepasswordPolicy.maxLength
min_lengthintegerfalseattributepasswordPolicy.minLength
password_policy_idtextfalseattributepasswordPolicy.passwordPolicyId
require_breach_checkbooleanfalseattributepasswordPolicy.requireBreachCheck
tenant_idtexttruereferencepasswordPolicy.tenant

Physical: SQL

CREATE TABLE IF NOT EXISTS "password_policy" (
    "password_policy_id" VARCHAR NOT NULL PRIMARY KEY,
    "min_length" INTEGER NOT NULL,
    "max_length" INTEGER NOT NULL,
    "require_breach_check" BOOLEAN NOT NULL,
    "history_count" INTEGER NOT NULL,
    "max_age_days" INTEGER,
    "tenant_id" VARCHAR,
    CONSTRAINT "password_policy_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id")
);

Physical: the typed table

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

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

const rows = await from(passwordPolicy).select((s) => ({ passwordPolicyId: s.passwordPolicy.passwordPolicyId, minLength: s.passwordPolicy.minLength })).run(runner);

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