IF Commons GitHub

keyCredential

concept

A public key that a principal proves itself with by signing; the private half is never kept

Model identityMachine. Written in commons/data/models/identity-machine/mod.ts:71. Identified by credential.

Governance: attributes

algorithmtextrequired

The signing algorithm

Becomes the column algorithm of key_credential.

Written at commons/data/models/identity-machine/mod.ts:76

publicJwkstructuredrequired

The public key as a JSON Web Key

Becomes the column public_jwk of key_credential.

Written at commons/data/models/identity-machine/mod.ts:74

thumbprinttextrequired

The RFC 7638 thumbprint of the key, unique; it is also what a proof of possession binds a token to

Becomes the column thumbprint of key_credential.

Written at commons/data/models/identity-machine/mod.ts:75

Governance: relationships

credentialone

The credential it is To credential. Written at commons/data/models/identity-machine/mod.ts:71

Logical: the table

Projects to the table key_credential with the primary key credential_id.

ColumnTypeNullRoleFrom
algorithmtextfalseattributekeyCredential.algorithm
credential_idtextfalsereferencekeyCredential.credential
public_jwkjsonfalseattributekeyCredential.publicJwk
thumbprinttextfalseattributekeyCredential.thumbprint

Physical: SQL

CREATE TABLE IF NOT EXISTS "key_credential" (
    "credential_id" VARCHAR NOT NULL PRIMARY KEY,
    "public_jwk" JSON NOT NULL,
    "thumbprint" VARCHAR NOT NULL,
    "algorithm" VARCHAR NOT NULL,
    CONSTRAINT "key_credential_credential_id_fk" FOREIGN KEY ("credential_id") REFERENCES "credential" ("credential_id"),
    CONSTRAINT "key_credential_thumbprint_uq" UNIQUE ("thumbprint")
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { keyCredential } 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 { keyCredential } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(keyCredential).select((s) => ({ credentialId: s.keyCredential.credentialId, publicJwk: s.keyCredential.publicJwk })).run(runner);

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