IF Commons GitHub

Identity devices

0038Active

0038-identity-device · owner if · domain data

Requirements

FR-001checkpassing

A device MUST be a principal with its kind, its platform, a hash of its hardware identifier (which is personal where it identifies a person's device), how far it is managed, whose it is, and when it was enrolled and last seen.

Enforced (check): .github: cd commons/data && bun run verify — suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind; suite/identity.test.ts: every concept carries a classification and the requirement it cites, what is personal carries its category, and short-lived data says how long it is kept

Proved by: data/suite/identity.test.ts

Written in: data/models/identity-device/mod.ts

Tests: passed: suite/identity.test.ts every concept carries a classification and the requirement it cites, what is personal carr; passed: suite/identity.test.ts on three engines machines have workload identities, keys and certificates that are unique,

FR-002checkpassing

An attestation MUST say what was proved, a hash of the evidence, who judged it, how, when and until when, and the hash of its nonce, and MUST be kept ninety days.

Enforced (check): .github: cd commons/data && bun run verify — suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind

Proved by: data/suite/identity.test.ts

Written in: data/models/identity-device/mod.ts

Tests: passed: suite/identity.test.ts on three engines machines have workload identities, keys and certificates that are unique,

FR-003checkpassing

A posture report MUST say what reported it, whether the device is compliant (or unknown), typed checks (encryption, screen lock, firewall, jailbreak, endpoint detection, patch age, risk), when it was reported and until when it counts, and MUST be kept thirty days; and a device session MUST bind a device to a session once.

Enforced (check): .github: cd commons/data && bun run verify — suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind

Proved by: data/suite/identity.test.ts

Written in: data/models/identity-device/mod.ts

Tests: passed: suite/identity.test.ts on three engines machines have workload identities, keys and certificates that are unique,

Out of scope

  • The operations that do the business of this module: a later specification, run by the operations runtime (0031).
  • How a decision is made from these tables: the decision engine is a later specification.

Edge cases

  • A kind of principal that has no table of its own in this module: it is held by the principal and its roles alone, per FR-001.
  • DuckDB loads this schema and can read it, and cannot update a row that another row refers to; operations that change principals, runs or delegations are for PostgreSQL and SQLite, per FR-001.

Assumptions

  • The application makes identifiers, hashes and timestamps; the database stores them and refuses what the constraints say.

Open questions

OQ-1open question

The constraints that governance cannot say (acyclic hierarchies, a subtype row only for a principal of its kind) are checks of the operations and of invariant queries, not of the schema.

Key entities

  • Devices - what this module holds, as its requirements say.

Success criteria

SC-001success criterion

A project composes this module only when it needs it, and the database refuses what the requirements say it must refuse.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

Cited by

Data, models/identity-device/mod

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