kindcode of trustAnchorKindrequiredWhat it is
Becomes the column kind of trust_anchor.
Written at commons/data/models/identity-pki/mod.ts:22
What certificates and keys are checked against: a certificate authority, or a set of public keys
Model identityPki. Written in commons/data/models/identity-pki/mod.ts:17. Identified by trustAnchorId.
kindcode of trustAnchorKindrequiredWhat it is
Becomes the column kind of trust_anchor.
Written at commons/data/models/identity-pki/mod.ts:22
materialtextrequiredThe public certificate, or the address of the public keys; public by nature
Becomes the column material of trust_anchor.
Written at commons/data/models/identity-pki/mod.ts:23
notAfterinstantoptionalWhen it stops being trusted
Becomes the column not_after of trust_anchor.
Written at commons/data/models/identity-pki/mod.ts:24
statuscode of useStatusrequiredWhether it is trusted
Becomes the column status of trust_anchor.
Written at commons/data/models/identity-pki/mod.ts:25
trustAnchorIdidentifierrequiredWhat identifies the trust anchor, made by the application
Becomes the column trust_anchor_id of trust_anchor.
Written at commons/data/models/identity-pki/mod.ts:20
trustDomaintextrequiredThe domain of trust it anchors, such as a SPIFFE trust domain
Becomes the column trust_domain of trust_anchor.
Written at commons/data/models/identity-pki/mod.ts:21
tenantoptionalThe tenant it is for; empty for the platform's To tenant. Written at commons/data/models/identity-pki/mod.ts:17
Projects to the table trust_anchor with the primary key trust_anchor_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
kind | text | false | attribute | trustAnchor.kind |
material | text | false | attribute | trustAnchor.material |
not_after | timestamp | true | attribute | trustAnchor.notAfter |
status | text | false | attribute | trustAnchor.status |
tenant_id | text | true | reference | trustAnchor.tenant |
trust_anchor_id | text | false | attribute | trustAnchor.trustAnchorId |
trust_domain | text | false | attribute | trustAnchor.trustDomain |
CREATE TABLE IF NOT EXISTS "trust_anchor" (
"trust_anchor_id" VARCHAR NOT NULL PRIMARY KEY,
"trust_domain" VARCHAR NOT NULL,
"kind" VARCHAR NOT NULL,
"material" VARCHAR NOT NULL,
"not_after" TIMESTAMPTZ,
"status" VARCHAR NOT NULL,
"tenant_id" VARCHAR,
CONSTRAINT "trust_anchor_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "trust_anchor_kind_ck" CHECK ("kind" IN ('x_509', 'jwks')),
CONSTRAINT "trust_anchor_status_ck" CHECK ("status" IN ('active', 'retired'))
);CREATE TABLE IF NOT EXISTS "trust_anchor" (
"trust_anchor_id" TEXT NOT NULL PRIMARY KEY,
"trust_domain" TEXT NOT NULL,
"kind" TEXT NOT NULL,
"material" TEXT NOT NULL,
"not_after" TIMESTAMPTZ,
"status" TEXT NOT NULL,
"tenant_id" TEXT,
CONSTRAINT "trust_anchor_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "trust_anchor_kind_ck" CHECK ("kind" IN ('x_509', 'jwks')),
CONSTRAINT "trust_anchor_status_ck" CHECK ("status" IN ('active', 'retired'))
);CREATE TABLE IF NOT EXISTS "trust_anchor" (
"trust_anchor_id" TEXT NOT NULL PRIMARY KEY,
"trust_domain" TEXT NOT NULL,
"kind" TEXT NOT NULL,
"material" TEXT NOT NULL,
"not_after" TEXT,
"status" TEXT NOT NULL,
"tenant_id" TEXT,
CONSTRAINT "trust_anchor_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "trust_anchor_kind_ck" CHECK ("kind" IN ('x_509', 'jwks')),
CONSTRAINT "trust_anchor_status_ck" CHECK ("status" IN ('active', 'retired'))
);Read and written from TypeScript with the types the model gives: import { trustAnchor } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/identity-pki.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { trustAnchor } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(trustAnchor).select((s) => ({ trustAnchorId: s.trustAnchor.trustAnchorId, trustDomain: s.trustAnchor.trustDomain })).run(runner);