Skip to content

Commit 1366af1

Browse files
authored
chore(spec): govern identity in the spec-liveness gate (#1924)
1 parent 1402be0 commit 1366af1

3 files changed

Lines changed: 45 additions & 1 deletion

File tree

.changeset/identity-liveness.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
chore(spec): extend the spec-liveness gate to the `identity` category. Governs `Role` (the one authorable RBAC type: `name`/`label`/`description` live, `parent` dead — org hierarchy uses `sys_department`, not `sys_role.parent`); the SCIM-protocol DTOs and better-auth runtime tables (User/Session/Account/…) are classified `internal`. Same audit as security; repo-internal tooling, no package version impact.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"category": "identity",
3+
"_note": "Liveness for authorable identity metadata. Same audit as security (docs/audits/2026-06-security-identity-property-liveness.md), which scoped identity to RoleSchema. The only author-written metadata type here is Role (RBAC). The rest are NOT authorable metadata: SCIM 2.0 provisioning protocol DTOs, better-auth runtime tables (User/Session/Account/VerificationToken/ApiKey), and org/membership primitives (Member/Organization/Invitation) managed by plugin-auth / better-auth / the org plugins — classified `internal`.",
4+
"schemas": {
5+
"Role": {
6+
"props": {
7+
"name": { "status": "live", "evidence": "packages/plugins/plugin-security/src/permission-evaluator.ts:113", "note": "sys_role.name reused as a permission-set name for RBAC resolution." },
8+
"label": { "status": "live", "note": "display metadata (admin nav/forms, security-plugin.ts:153)." },
9+
"description": { "status": "live", "note": "display metadata." },
10+
"parent": { "status": "dead", "evidence": "no consumer (grep); org hierarchy walks sys_department.parent_department_id via department-graph.ts, not sys_role.parent", "note": "Role 'Reports To' rollup unimplemented — removal candidate (ADR-0049). label/description display-only." }
11+
}
12+
},
13+
"User": { "_schema": "internal", "_note": "better-auth runtime user table — not authorable metadata." },
14+
"Session": { "_schema": "internal", "_note": "better-auth runtime session table." },
15+
"Account": { "_schema": "internal", "_note": "better-auth runtime account/credential table." },
16+
"VerificationToken": { "_schema": "internal", "_note": "better-auth runtime verification token." },
17+
"ApiKey": { "_schema": "internal", "_note": "better-auth API key table." },
18+
"Member": { "_schema": "internal", "_note": "org membership primitive (org plugin), not author-written metadata." },
19+
"Organization": { "_schema": "internal", "_note": "org/tenant primitive (org plugin)." },
20+
"Invitation": { "_schema": "internal", "_note": "org invitation primitive (org plugin)." },
21+
"SCIMUser": { "_schema": "internal", "_note": "SCIM 2.0 provisioning protocol DTO." },
22+
"SCIMGroup": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
23+
"SCIMEnterpriseUser": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
24+
"SCIMName": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
25+
"SCIMEmail": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
26+
"SCIMPhoneNumber": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
27+
"SCIMAddress": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
28+
"SCIMMeta": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
29+
"SCIMGroupReference": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
30+
"SCIMMemberReference": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
31+
"SCIMListResponse": { "_schema": "internal", "_note": "SCIM 2.0 protocol response DTO." },
32+
"SCIMError": { "_schema": "internal", "_note": "SCIM 2.0 protocol error DTO." },
33+
"SCIMPatchOperation": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
34+
"SCIMPatchRequest": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
35+
"SCIMBulkOperation": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
36+
"SCIMBulkRequest": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
37+
"SCIMBulkResponse": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." },
38+
"SCIMBulkResponseOperation": { "_schema": "internal", "_note": "SCIM 2.0 protocol DTO." }
39+
}
40+
}

packages/spec/scripts/liveness/check-liveness.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const ledgerRoot = join(specRoot, 'liveness');
3838

3939
// Categories whose authorable schemas must be fully classified. Extend
4040
// highest-risk-first as each category's ledger is seeded from its audit.
41-
const GOVERNED = ['security'];
41+
const GOVERNED = ['security', 'identity'];
4242

4343
const args = process.argv.slice(2);
4444
const asJson = args.includes('--json');

0 commit comments

Comments
 (0)