allowedAlgorithmscode of passwordAlgorithmmanyThe algorithms a hash may use
Becomes the column allowed_algorithms of password_policy.
Written at commons/data/models/identity/concepts.ts:381
The rules for passwords
Model identity. Written in commons/data/models/identity/concepts.ts:372. Identified by passwordPolicyId.
allowedAlgorithmscode of passwordAlgorithmmanyThe algorithms a hash may use
Becomes the column allowed_algorithms of password_policy.
Written at commons/data/models/identity/concepts.ts:381
historyCountintegerrequiredHow 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
maxAgeDaysintegeroptionalAfter 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
maxLengthintegerrequiredThe most characters
Becomes the column max_length of password_policy.
Written at commons/data/models/identity/concepts.ts:377
minLengthintegerrequiredThe fewest characters
Becomes the column min_length of password_policy.
Written at commons/data/models/identity/concepts.ts:376
passwordPolicyIdidentifierrequiredWhat 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
requireBreachCheckbooleanrequiredWhether 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
tenantoptionalThe 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
Projects to the table password_policy with the primary key password_policy_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
history_count | integer | false | attribute | passwordPolicy.historyCount |
max_age_days | integer | true | attribute | passwordPolicy.maxAgeDays |
max_length | integer | false | attribute | passwordPolicy.maxLength |
min_length | integer | false | attribute | passwordPolicy.minLength |
password_policy_id | text | false | attribute | passwordPolicy.passwordPolicyId |
require_breach_check | boolean | false | attribute | passwordPolicy.requireBreachCheck |
tenant_id | text | true | reference | passwordPolicy.tenant |
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")
);CREATE TABLE IF NOT EXISTS "password_policy" (
"password_policy_id" TEXT 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" TEXT,
CONSTRAINT "password_policy_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id")
);CREATE TABLE IF NOT EXISTS "password_policy" (
"password_policy_id" TEXT NOT NULL PRIMARY KEY,
"min_length" INTEGER NOT NULL,
"max_length" INTEGER NOT NULL,
"require_breach_check" INTEGER NOT NULL,
"history_count" INTEGER NOT NULL,
"max_age_days" INTEGER,
"tenant_id" TEXT,
CONSTRAINT "password_policy_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id")
);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);