IF Commons GitHub

canaryToken

concept

A made-up value planted in a dataset or an environment that no honest process has a use for, so that its appearance elsewhere shows a leak

Model contract. Written in commons/data/models/contract/mod.ts:147. Identified by canaryTokenId.

Governance: attributes

canaryTokenIdidentifierrequired

What identifies the token: the value itself

Becomes the column canary_token_id of canary_token.

Written at commons/data/models/contract/mod.ts:147

plantedAtinstantrequired

When

Becomes the column planted_at of canary_token.

Written at commons/data/models/contract/mod.ts:147

plantedIntextrequired

Where it was planted

Becomes the column planted_in of canary_token.

Written at commons/data/models/contract/mod.ts:147

purposetextrequired

What its appearance would mean

Becomes the column purpose of canary_token.

Written at commons/data/models/contract/mod.ts:147

Logical: the table

Projects to the table canary_token with the primary key canary_token_id.

ColumnTypeNullRoleFrom
canary_token_idtextfalseattributecanaryToken.canaryTokenId
planted_attimestampfalseattributecanaryToken.plantedAt
planted_intextfalseattributecanaryToken.plantedIn
purposetextfalseattributecanaryToken.purpose

Physical: SQL

CREATE TABLE IF NOT EXISTS "canary_token" (
    "canary_token_id" VARCHAR NOT NULL PRIMARY KEY,
    "planted_in" VARCHAR NOT NULL,
    "planted_at" TIMESTAMPTZ NOT NULL,
    "purpose" VARCHAR NOT NULL
);

Physical: the typed table

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

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

const rows = await from(canaryToken).select((s) => ({ canaryTokenId: s.canaryToken.canaryTokenId, plantedIn: s.canaryToken.plantedIn })).run(runner);

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