audiencetextoptionalThe audience the proof must be for
Becomes the column audience of workload_identity.
What a platform vouches for about a workload, so that a machine proves itself by it instead of by a secret
Model identityMachine. Written in commons/data/models/identity-machine/mod.ts:37. Identified by workloadIdentityId.
audiencetextoptionalThe audience the proof must be for
Becomes the column audience of workload_identity.
bindingKeytextrequiredA hash of the issuer and the subject, unique
Becomes the column binding_key of workload_identity.
issuertextrequiredThe issuer
Becomes the column issuer of workload_identity.
issuerKindcode of issuerKindrequiredWhat vouches for it
Becomes the column issuer_kind of workload_identity.
selectorstextmanyWhat must all match, as SPIRE's selectors do
Becomes the column selectors of workload_identity.
statuscode of useStatusrequiredWhether the binding is applied
Becomes the column status of workload_identity.
subjecttextrequiredThe workload's name for the issuer: a SPIFFE ID, a service account, a subject, a thumbprint
Becomes the column subject of workload_identity.
trustDomaintextoptionalThe trust domain
Becomes the column trust_domain of workload_identity.
workloadIdentityIdidentifierrequiredWhat identifies the binding, made by the application
Becomes the column workload_identity_id of workload_identity.
machineoneThe machine the workload is To machine. Written at commons/data/models/identity-machine/mod.ts:37
Projects to the table workload_identity with the primary key workload_identity_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
audience | text | true | attribute | workloadIdentity.audience |
binding_key | text | false | attribute | workloadIdentity.bindingKey |
issuer | text | false | attribute | workloadIdentity.issuer |
issuer_kind | text | false | attribute | workloadIdentity.issuerKind |
machine_principal_id | text | false | reference | workloadIdentity.machine |
status | text | false | attribute | workloadIdentity.status |
subject | text | false | attribute | workloadIdentity.subject |
trust_domain | text | true | attribute | workloadIdentity.trustDomain |
workload_identity_id | text | false | attribute | workloadIdentity.workloadIdentityId |
CREATE TABLE IF NOT EXISTS "workload_identity" (
"workload_identity_id" VARCHAR NOT NULL PRIMARY KEY,
"issuer_kind" VARCHAR NOT NULL,
"issuer" VARCHAR NOT NULL,
"subject" VARCHAR NOT NULL,
"trust_domain" VARCHAR,
"audience" VARCHAR,
"status" VARCHAR NOT NULL,
"binding_key" VARCHAR NOT NULL,
"machine_principal_id" VARCHAR NOT NULL,
CONSTRAINT "workload_identity_machine_principal_id_fk" FOREIGN KEY ("machine_principal_id") REFERENCES "machine" ("principal_id"),
CONSTRAINT "workload_identity_binding_key_uq" UNIQUE ("binding_key"),
CONSTRAINT "workload_identity_issuer_kind_ck" CHECK ("issuer_kind" IN ('spiffe', 'kubernetes', 'oidc', 'cloud', 'mtls')),
CONSTRAINT "workload_identity_status_ck" CHECK ("status" IN ('active', 'retired'))
);CREATE TABLE IF NOT EXISTS "workload_identity" (
"workload_identity_id" TEXT NOT NULL PRIMARY KEY,
"issuer_kind" TEXT NOT NULL,
"issuer" TEXT NOT NULL,
"subject" TEXT NOT NULL,
"trust_domain" TEXT,
"audience" TEXT,
"status" TEXT NOT NULL,
"binding_key" TEXT NOT NULL,
"machine_principal_id" TEXT NOT NULL,
CONSTRAINT "workload_identity_machine_principal_id_fk" FOREIGN KEY ("machine_principal_id") REFERENCES "machine" ("principal_id"),
CONSTRAINT "workload_identity_binding_key_uq" UNIQUE ("binding_key"),
CONSTRAINT "workload_identity_issuer_kind_ck" CHECK ("issuer_kind" IN ('spiffe', 'kubernetes', 'oidc', 'cloud', 'mtls')),
CONSTRAINT "workload_identity_status_ck" CHECK ("status" IN ('active', 'retired'))
);CREATE TABLE IF NOT EXISTS "workload_identity" (
"workload_identity_id" TEXT NOT NULL PRIMARY KEY,
"issuer_kind" TEXT NOT NULL,
"issuer" TEXT NOT NULL,
"subject" TEXT NOT NULL,
"trust_domain" TEXT,
"audience" TEXT,
"status" TEXT NOT NULL,
"binding_key" TEXT NOT NULL,
"machine_principal_id" TEXT NOT NULL,
CONSTRAINT "workload_identity_machine_principal_id_fk" FOREIGN KEY ("machine_principal_id") REFERENCES "machine" ("principal_id"),
CONSTRAINT "workload_identity_binding_key_uq" UNIQUE ("binding_key"),
CONSTRAINT "workload_identity_issuer_kind_ck" CHECK ("issuer_kind" IN ('spiffe', 'kubernetes', 'oidc', 'cloud', 'mtls')),
CONSTRAINT "workload_identity_status_ck" CHECK ("status" IN ('active', 'retired'))
);Read and written from TypeScript with the types the model gives: import { workloadIdentity } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/identity-machine.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { workloadIdentity } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(workloadIdentity).select((s) => ({ workloadIdentityId: s.workloadIdentity.workloadIdentityId, issuerKind: s.workloadIdentity.issuerKind })).run(runner);