@radicaltools/cli 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +353 -33
  2. package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
  3. package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
  4. package/dist/hub-catalogue/concern/concern-api-evolution.radical +1174 -0
  5. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
  6. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
  7. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
  8. package/dist/hub-catalogue/concern/concern-architecture-style.radical +1268 -0
  9. package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
  10. package/dist/hub-catalogue/concern/concern-authentication.radical +895 -0
  11. package/dist/hub-catalogue/concern/concern-authorization.radical +1686 -0
  12. package/dist/hub-catalogue/concern/concern-availability.radical +1028 -0
  13. package/dist/hub-catalogue/concern/concern-backend-stack.radical +1037 -0
  14. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1560 -0
  15. package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
  16. package/dist/hub-catalogue/concern/concern-capacity.radical +915 -0
  17. package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
  18. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
  19. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
  20. package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
  21. package/dist/hub-catalogue/concern/concern-communication-style.radical +1508 -0
  22. package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
  23. package/dist/hub-catalogue/concern/concern-data-consistency.radical +1112 -0
  24. package/dist/hub-catalogue/concern/concern-data-store.radical +1282 -0
  25. package/dist/hub-catalogue/concern/concern-decomposition.radical +1318 -0
  26. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
  27. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
  28. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
  29. package/dist/hub-catalogue/concern/concern-deployment.radical +1203 -0
  30. package/dist/hub-catalogue/concern/concern-encryption.radical +1318 -0
  31. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
  32. package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
  33. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1647 -0
  34. package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
  35. package/dist/hub-catalogue/concern/concern-infrastructure.radical +2183 -0
  36. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1116 -0
  37. package/dist/hub-catalogue/concern/concern-messaging.radical +973 -0
  38. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +867 -0
  39. package/dist/hub-catalogue/concern/concern-observability.radical +997 -0
  40. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
  41. package/dist/hub-catalogue/concern/concern-personal-data.radical +1949 -0
  42. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
  43. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1445 -0
  44. package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
  45. package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
  46. package/dist/hub-catalogue/concern/concern-secrets.radical +1284 -0
  47. package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
  48. package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
  49. package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
  50. package/dist/hub-catalogue/concern/concern-supply-chain.radical +1386 -0
  51. package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
  52. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
  53. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1440 -0
  54. package/dist/hub-catalogue/concern/concern-test-strategy.radical +1212 -0
  55. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
  56. package/dist/index.js +12712 -7144
  57. package/package.json +5 -3
@@ -0,0 +1,1686 @@
1
+ {
2
+ "hub": {
3
+ "id": "concern-authorization",
4
+ "category": "concern",
5
+ "name": "Authorization",
6
+ "description": "What each caller may see and do: how permissions are modelled, where they are decided, how privileged access is given, and how permissions are taken back.",
7
+ "tags": [
8
+ "security",
9
+ "authorization",
10
+ "access-control",
11
+ "rbac",
12
+ "abac",
13
+ "rebac",
14
+ "policy-as-code"
15
+ ],
16
+ "requiredMetamodel": "c4-ddd-governance-builtin",
17
+ "concern": {
18
+ "id": "authorization",
19
+ "trigger": "LIST RELATIONS WHERE (source.type = \"person\" OR source.external = true) AND target.external != true AND (target.type = \"system\" OR target.type = \"container\" OR target.type = \"webapp\" OR target.type = \"component\")",
20
+ "applyTo": "target",
21
+ "why": "people or other systems use these elements, so what each of them may see and do has to be decided.",
22
+ "group": "security"
23
+ },
24
+ "sources": [
25
+ {
26
+ "title": "OWASP ASVS 4.0.3, V4 Access Control",
27
+ "url": "https://owasp.org/www-project-application-security-verification-standard/"
28
+ },
29
+ {
30
+ "title": "OWASP Authorization Cheat Sheet",
31
+ "url": "https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html"
32
+ },
33
+ {
34
+ "title": "OWASP API Security Top 10 2023, API1 Broken Object Level Authorization",
35
+ "url": "https://owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization/"
36
+ },
37
+ {
38
+ "title": "NIST Role Based Access Control (RBAC) project and standard",
39
+ "url": "https://csrc.nist.gov/projects/role-based-access-control"
40
+ },
41
+ {
42
+ "title": "NIST SP 800-162, Guide to Attribute Based Access Control (ABAC) Definition and Considerations",
43
+ "url": "https://csrc.nist.gov/pubs/sp/800/162/upd2/final"
44
+ },
45
+ {
46
+ "title": "NIST SP 800-53 Rev. 5, Security and Privacy Controls (AC-2, AC-6, AU-9)",
47
+ "url": "https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final"
48
+ },
49
+ {
50
+ "title": "Open Policy Agent documentation",
51
+ "url": "https://www.openpolicyagent.org/docs/latest/"
52
+ },
53
+ {
54
+ "title": "Google Zanzibar: Consistent, Global Authorization System (2019)",
55
+ "url": "https://research.google/pubs/zanzibar-googles-consistent-global-authorization-system/"
56
+ }
57
+ ],
58
+ "templateParams": [
59
+ {
60
+ "key": "MODEL",
61
+ "title": "Permissions",
62
+ "label": "How are permissions given?",
63
+ "hint": "The permission model decides what a check needs to know: the caller's roles, the caller's relation to the record, or attributes of both and of the request.",
64
+ "defaultValue": "roles",
65
+ "options": [
66
+ {
67
+ "value": "roles",
68
+ "label": "roles (RBAC)",
69
+ "description": "A user gets roles, a role gets permissions. Pick it when what someone may do follows from their job and the same role sees the same kind of data, with fewer than about 20 roles."
70
+ },
71
+ {
72
+ "value": "relations",
73
+ "label": "relationships (ReBAC)",
74
+ "description": "Access follows from the caller's relation to the record: owner, member of the team or folder it belongs to, someone it was shared with. Pick it for documents, projects or workspaces that people share and nest."
75
+ },
76
+ {
77
+ "value": "attributes",
78
+ "label": "attribute policies (ABAC)",
79
+ "description": "Rules over attributes of the user, the record and the request (department, region, classification, time). Pick it when rules depend on data the roles cannot hold, such as \"only records of their own region, only in working hours\"."
80
+ },
81
+ {
82
+ "value": "flat",
83
+ "label": "one level of access for every caller",
84
+ "description": "Every signed-in caller may do everything. Pick it only while nothing the element offers is meant for some callers only, such as an internal tool for one small team; the next two questions are then moot."
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ "key": "ENFORCE",
90
+ "title": "Decision point",
91
+ "label": "Where are permissions decided?",
92
+ "hint": "Checks spread through handlers drift apart; a policy decision point keeps them in one place at the price of a dependency on the request path. Only when permissions are given (not with one level of access for every caller).",
93
+ "defaultValue": "code",
94
+ "options": [
95
+ {
96
+ "value": "code",
97
+ "label": "in the service code",
98
+ "description": "One authorization module in each service, built on the framework's mechanism (Spring Security, ASP.NET Core policies, Pundit, CASL, Casbin). Pick it for one or a few services in one language, with rules that change with the code."
99
+ },
100
+ {
101
+ "value": "engine",
102
+ "label": "by a policy engine",
103
+ "description": "A policy decision point outside the code (Open Policy Agent, Cedar with Amazon Verified Permissions, OpenFGA or SpiceDB) answers every check; the services only enforce. Pick it for many services or languages, for rules owned by security or the business, or for a relationship graph."
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "key": "ADMIN",
109
+ "title": "Privileged access",
110
+ "label": "How do administrators and support reach production?",
111
+ "hint": "Standing administrator rights are what attackers look for after a phishing mail; every way to more access needs its own decision and its own trail.",
112
+ "defaultValue": "jit",
113
+ "options": [
114
+ {
115
+ "value": "jit",
116
+ "label": "just-in-time elevation",
117
+ "description": "Nobody holds administrator rights; they are requested, approved by a second person and expire after a few hours, with a sealed break-glass account for emergencies. Pick it when the element holds personal, financial or customer data, or an audit (ISO 27001, SOC 2) is expected."
118
+ },
119
+ {
120
+ "value": "standing",
121
+ "label": "named administrators",
122
+ "description": "A short list of named people hold administrator rights all the time, with phishing-resistant MFA and every action logged. Pick it for a small team where an approver is not always available and the data is of low sensitivity."
123
+ },
124
+ {
125
+ "value": "none",
126
+ "label": "no direct access",
127
+ "description": "Nobody reaches production data except through the element's own operations, which are authorized and audited like any other. Pick it when support needs are covered by admin screens in the product and infrastructure is fully automated."
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "key": "REVIEW",
133
+ "title": "Taking back",
134
+ "label": "How are permissions taken back?",
135
+ "hint": "People change jobs and keep what they had; without a mechanism to take permissions back, every account ends up with more than it needs. Only when permissions are given (not with one level of access for every caller).",
136
+ "defaultValue": "periodic",
137
+ "options": [
138
+ {
139
+ "value": "periodic",
140
+ "label": "periodic reviews",
141
+ "description": "Owners confirm each grant on a cadence and leavers are removed by a process. Pick it when grants are given by hand in the application, or an auditor asks for access reviews (SOX, ISO 27001 A.5.18)."
142
+ },
143
+ {
144
+ "value": "directory",
145
+ "label": "directory sync",
146
+ "description": "Grants come only from groups in the identity provider (SCIM or group claims), so joiners, movers and leavers follow the HR system automatically. Pick it when every user is in a corporate directory that is kept up to date."
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "key": "REVIEW_DAYS",
152
+ "label": "How often are grants reviewed (days)? (periodic reviews only)",
153
+ "defaultValue": "90",
154
+ "type": "number"
155
+ },
156
+ {
157
+ "key": "ELEVATION_HOURS",
158
+ "label": "How long may an elevation last (hours)? (just-in-time elevation only)",
159
+ "defaultValue": "4",
160
+ "type": "number"
161
+ }
162
+ ]
163
+ },
164
+ "nodes": [
165
+ {
166
+ "id": "need",
167
+ "type": "need",
168
+ "label": "Everyone sees only theirs",
169
+ "x": 0,
170
+ "y": 0,
171
+ "kind": "brief",
172
+ "source": "Hub concern pack: Authorization",
173
+ "description": "People with different jobs, and other systems, use the same element. Each may see and change only what their role, their relation to the record or the policy allows: a check missing at one operation, a check only in the interface, a record fetched by an id the caller should not know, or a list that shows what the detail would refuse each lets data out. Administrators and support need more than everyone else without holding it all the time, and permissions must be taken back when people change jobs or leave. The snippets assume the application under src/ (src/app exports the router's table, src/authz the permission code) and the tests under tests/ with their fixtures in tests/authz."
174
+ },
175
+ {
176
+ "id": "req-deny",
177
+ "type": "requirement",
178
+ "label": "Unpermitted calls refused",
179
+ "x": 260,
180
+ "y": 0,
181
+ "ears_type": "unwanted-behaviour",
182
+ "unwanted_condition": "a caller asks for data or an action its permissions do not grant",
183
+ "action": "refuse it with 403 (or 404 for a record the caller may not know of) before any part of the operation runs, and record the refusal with the caller, the operation and the record",
184
+ "rationale": "The refusal must not run half the operation or tell an attacker what exists, and repeated refusals are a signal worth alerting on (ASVS V4.1, V7.1; OWASP Authorization Cheat Sheet).",
185
+ "hubWhen": {
186
+ "MODEL": [
187
+ "roles",
188
+ "relations",
189
+ "attributes"
190
+ ]
191
+ }
192
+ },
193
+ {
194
+ "id": "req-default-deny",
195
+ "type": "requirement",
196
+ "label": "Denied by default",
197
+ "x": 260,
198
+ "y": 130,
199
+ "ears_type": "ubiquitous",
200
+ "action": "decide every permission on the server, refuse any operation that has no rule of its own, and let the interface only hide what the server would refuse",
201
+ "rationale": "Anything the interface hides can still be called, and an operation added without a rule must fail closed, not open (ASVS V4.1.1, V4.1.5).",
202
+ "hubWhen": {
203
+ "MODEL": [
204
+ "roles",
205
+ "relations",
206
+ "attributes"
207
+ ]
208
+ }
209
+ },
210
+ {
211
+ "id": "req-object",
212
+ "type": "requirement",
213
+ "label": "Checked on each record",
214
+ "x": 260,
215
+ "y": 260,
216
+ "ears_type": "event-driven",
217
+ "trigger": "a request names a record by its id, or lists records",
218
+ "action": "check the caller's permission on that very record, not only on its type, and filter lists by the same rule so that 0 records the detail would refuse appear in a list, a search or an export",
219
+ "rationale": "Broken object level authorization is the first risk of the OWASP API Security Top 10 2023 (API1); lists filtered differently from the detail leak the same data.",
220
+ "hubWhen": {
221
+ "MODEL": [
222
+ "roles",
223
+ "relations",
224
+ "attributes"
225
+ ]
226
+ }
227
+ },
228
+ {
229
+ "id": "req-sod",
230
+ "type": "requirement",
231
+ "label": "Conflicting roles kept apart",
232
+ "x": 260,
233
+ "y": 390,
234
+ "ears_type": "unwanted-behaviour",
235
+ "unwanted_condition": "a grant would give an account two roles on the separation-of-duties list, such as creating a payee and approving a payment",
236
+ "action": "refuse the grant and record the attempt, unless a documented exception approved by a second person exists",
237
+ "rationale": "Static separation of duty is part of the NIST RBAC standard (ANSI INCITS 359); one account holding both halves of a control defeats it.",
238
+ "hubWhen": {
239
+ "MODEL": [
240
+ "roles"
241
+ ]
242
+ }
243
+ },
244
+ {
245
+ "id": "req-relation-revoke",
246
+ "type": "requirement",
247
+ "label": "Unsharing takes effect",
248
+ "x": 260,
249
+ "y": 520,
250
+ "ears_type": "event-driven",
251
+ "trigger": "a relationship that grants access is removed (a record unshared, a member removed from a team, a folder moved)",
252
+ "action": "refuse access that depended on it within 10 seconds, and never evaluate a request against relationships older than the change the caller has just made",
253
+ "rationale": "In a relationship graph a stale read grants access that was just taken away (the \"new enemy\" problem of Google Zanzibar); consistency tokens bound it.",
254
+ "hubWhen": {
255
+ "MODEL": [
256
+ "relations"
257
+ ]
258
+ }
259
+ },
260
+ {
261
+ "id": "req-attributes",
262
+ "type": "requirement",
263
+ "label": "Unknown attributes deny",
264
+ "x": 260,
265
+ "y": 650,
266
+ "ears_type": "unwanted-behaviour",
267
+ "unwanted_condition": "an attribute a policy reads is missing, or was last refreshed from its source more than 15 minutes ago",
268
+ "action": "evaluate the policy as deny for that request and record which attribute was missing or stale",
269
+ "rationale": "Attribute policies are only as good as their inputs; a missing department or region must not read as \"any\" (NIST SP 800-162, attribute freshness).",
270
+ "hubWhen": {
271
+ "MODEL": [
272
+ "attributes"
273
+ ]
274
+ }
275
+ },
276
+ {
277
+ "id": "req-pdp-down",
278
+ "type": "requirement",
279
+ "label": "Policy engine fails closed",
280
+ "x": 260,
281
+ "y": 780,
282
+ "ears_type": "unwanted-behaviour",
283
+ "unwanted_condition": "the policy decision point cannot be reached or does not answer within 50 milliseconds",
284
+ "action": "refuse the operation, never fall back to allow, and raise an alert when more than 1% of decisions fail in 5 minutes",
285
+ "rationale": "A central decision point is on every request path; failing open would turn an outage into a breach (ASVS V4.1.5, OWASP Authorization Cheat Sheet \"deny by default\").",
286
+ "hubWhen": {
287
+ "MODEL": [
288
+ "roles",
289
+ "relations",
290
+ "attributes"
291
+ ],
292
+ "ENFORCE": [
293
+ "engine"
294
+ ]
295
+ }
296
+ },
297
+ {
298
+ "id": "req-policy-release",
299
+ "type": "requirement",
300
+ "label": "Policies tested and versioned",
301
+ "x": 260,
302
+ "y": 910,
303
+ "ears_type": "event-driven",
304
+ "trigger": "a policy change is merged",
305
+ "action": "run its policy tests with at least 90% coverage before release, reach every decision point within 5 minutes, and record the policy version in every decision log entry",
306
+ "rationale": "Policies are code that decides access; untested or unversioned, a policy change cannot be reviewed or traced after an incident (OPA decision logs and policy testing).",
307
+ "hubWhen": {
308
+ "MODEL": [
309
+ "roles",
310
+ "relations",
311
+ "attributes"
312
+ ],
313
+ "ENFORCE": [
314
+ "engine"
315
+ ]
316
+ }
317
+ },
318
+ {
319
+ "id": "req-review",
320
+ "type": "requirement",
321
+ "label": "Grants reviewed",
322
+ "x": 260,
323
+ "y": 1040,
324
+ "ears_type": "event-driven",
325
+ "trigger": "{{REVIEW_DAYS}} days have passed since the grants of an account were last reviewed",
326
+ "action": "ask the owner of each grant to confirm or remove it, and remove every grant not confirmed within 14 days",
327
+ "rationale": "Rights accumulate as people change jobs; a regular review takes back what is no longer needed (ISO/IEC 27001:2022 A.5.18, ASVS V4.1.3 least privilege).",
328
+ "hubWhen": {
329
+ "MODEL": [
330
+ "roles",
331
+ "relations",
332
+ "attributes"
333
+ ],
334
+ "REVIEW": [
335
+ "periodic"
336
+ ]
337
+ }
338
+ },
339
+ {
340
+ "id": "req-leaver",
341
+ "type": "requirement",
342
+ "label": "Leavers lose access",
343
+ "x": 260,
344
+ "y": 1170,
345
+ "ears_type": "event-driven",
346
+ "trigger": "HR or a manager reports that a person has left or moved to another job",
347
+ "action": "remove every grant of a leaver within 24 hours, and every grant a mover no longer needs within 5 working days",
348
+ "rationale": "Leavers who keep access are a common audit finding and an insider risk; the review cadence alone leaves them access for months (ISO/IEC 27001:2022 A.5.18).",
349
+ "hubWhen": {
350
+ "MODEL": [
351
+ "roles",
352
+ "relations",
353
+ "attributes"
354
+ ],
355
+ "REVIEW": [
356
+ "periodic"
357
+ ]
358
+ }
359
+ },
360
+ {
361
+ "id": "req-directory",
362
+ "type": "requirement",
363
+ "label": "Grants follow the directory",
364
+ "x": 260,
365
+ "y": 1300,
366
+ "ears_type": "event-driven",
367
+ "trigger": "the identity provider adds or removes a person from a group, or disables the account",
368
+ "action": "apply the change to the person's permissions within 60 minutes, and give no permission that does not come from a directory group",
369
+ "rationale": "With grants derived from the directory, joiners, movers and leavers follow the HR system; a grant given by hand beside it escapes every review (SCIM, RFC 7644; ASVS V4.1.3).",
370
+ "hubWhen": {
371
+ "MODEL": [
372
+ "roles",
373
+ "relations",
374
+ "attributes"
375
+ ],
376
+ "REVIEW": [
377
+ "directory"
378
+ ]
379
+ }
380
+ },
381
+ {
382
+ "id": "req-elevation",
383
+ "type": "requirement",
384
+ "label": "Elevation is approved and expires",
385
+ "x": 260,
386
+ "y": 1430,
387
+ "ears_type": "event-driven",
388
+ "trigger": "an operator asks for administrator access to production",
389
+ "action": "grant it only after a second person approves it with a ticket reference, and remove it automatically after at most {{ELEVATION_HOURS}} hours",
390
+ "rationale": "Standing privileges are what attackers look for; time-boxed, approved elevation keeps the window small (NIST SP 800-53 AC-2, AC-6; OWASP Authorization Cheat Sheet, least privilege).",
391
+ "hubWhen": {
392
+ "ADMIN": [
393
+ "jit"
394
+ ]
395
+ }
396
+ },
397
+ {
398
+ "id": "req-break-glass",
399
+ "type": "requirement",
400
+ "label": "Break-glass use alerts",
401
+ "x": 260,
402
+ "y": 1560,
403
+ "ears_type": "event-driven",
404
+ "trigger": "the sealed break-glass account is used",
405
+ "action": "alert the security owner within 5 minutes, record every action taken with it, and rotate its credential within 24 hours after use",
406
+ "rationale": "An emergency path that bypasses approval must be loud and short-lived, or it becomes the normal path (NIST SP 800-53 AC-2(2), emergency accounts).",
407
+ "hubWhen": {
408
+ "ADMIN": [
409
+ "jit"
410
+ ]
411
+ }
412
+ },
413
+ {
414
+ "id": "req-named-admins",
415
+ "type": "requirement",
416
+ "label": "Few named administrators",
417
+ "x": 260,
418
+ "y": 1690,
419
+ "ears_type": "ubiquitous",
420
+ "action": "keep at most 5 administrator accounts, each tied to a named person and signing in with phishing-resistant MFA, and confirm the list every 30 days",
421
+ "rationale": "With standing rights the number of holders and the strength of their sign-in are the only controls left (NIST SP 800-63B AAL3, ASVS V4.3.1).",
422
+ "hubWhen": {
423
+ "ADMIN": [
424
+ "standing"
425
+ ]
426
+ }
427
+ },
428
+ {
429
+ "id": "req-admin-audit",
430
+ "type": "requirement",
431
+ "label": "Privileged actions audited",
432
+ "x": 260,
433
+ "y": 1820,
434
+ "ears_type": "ubiquitous",
435
+ "action": "record every action taken with administrator rights with the person, the time, the target and the ticket or reason, in the audit trail, which the administrators cannot change and whose store and retention the Audit trail pack decides",
436
+ "rationale": "Privileged actions are the ones that most need a trail an administrator cannot edit afterwards (ASVS V7.1, V4.3; NIST SP 800-53 AU-9).",
437
+ "hubWhen": {
438
+ "ADMIN": [
439
+ "jit",
440
+ "standing"
441
+ ]
442
+ }
443
+ },
444
+ {
445
+ "id": "req-no-direct",
446
+ "type": "requirement",
447
+ "label": "No direct data access",
448
+ "x": 260,
449
+ "y": 1950,
450
+ "ears_type": "ubiquitous",
451
+ "action": "grant no person a credential that reads or writes production data stores directly, and offer support work only through the element's own operations, authorized and audited like any other",
452
+ "rationale": "Without a side door, every access to data passes the same checks and the same audit trail (ASVS V4.1.3, least privilege).",
453
+ "hubWhen": {
454
+ "ADMIN": [
455
+ "none"
456
+ ]
457
+ }
458
+ },
459
+ {
460
+ "id": "req-flat",
461
+ "type": "requirement",
462
+ "label": "Same rights for all",
463
+ "x": 260,
464
+ "y": 2080,
465
+ "ears_type": "ubiquitous",
466
+ "action": "let every signed-in caller do everything the element offers, and offer nothing meant for some callers only",
467
+ "rationale": "Without permissions, the safety lies in keeping out what would need them; this makes it a requirement instead of an accident.",
468
+ "hubWhen": {
469
+ "MODEL": [
470
+ "flat"
471
+ ]
472
+ }
473
+ },
474
+ {
475
+ "id": "sc-deny",
476
+ "type": "scenario",
477
+ "label": "Unpermitted call refused",
478
+ "x": 520,
479
+ "y": 0,
480
+ "given": "a caller without the permission to delete orders",
481
+ "when": "it calls the delete operation directly, without the interface",
482
+ "then": "the call is refused with 403, the order stays, and the refusal is in the audit trail",
483
+ "hubWhen": {
484
+ "MODEL": [
485
+ "roles",
486
+ "relations",
487
+ "attributes"
488
+ ]
489
+ }
490
+ },
491
+ {
492
+ "id": "sc-default-deny",
493
+ "type": "scenario",
494
+ "label": "Operation without a rule",
495
+ "x": 520,
496
+ "y": 130,
497
+ "given": "a new operation added without a permission rule",
498
+ "when": "any caller, an administrator included, calls it",
499
+ "then": "it is refused and the authorization test fails until a rule is added",
500
+ "hubWhen": {
501
+ "MODEL": [
502
+ "roles",
503
+ "relations",
504
+ "attributes"
505
+ ]
506
+ }
507
+ },
508
+ {
509
+ "id": "sc-object",
510
+ "type": "scenario",
511
+ "label": "Another user's record",
512
+ "x": 520,
513
+ "y": 260,
514
+ "given": "two users, each with an order only they may see",
515
+ "when": "the first asks for the second's order by id, and lists and searches orders",
516
+ "then": "the detail is refused and neither the list nor the search shows the second's order",
517
+ "hubWhen": {
518
+ "MODEL": [
519
+ "roles",
520
+ "relations",
521
+ "attributes"
522
+ ]
523
+ }
524
+ },
525
+ {
526
+ "id": "sc-sod",
527
+ "type": "scenario",
528
+ "label": "Conflicting role refused",
529
+ "x": 520,
530
+ "y": 390,
531
+ "given": "an account holding the role that creates payees",
532
+ "when": "an administrator grants it the role that approves payments",
533
+ "then": "the grant is refused and the attempt is recorded",
534
+ "hubWhen": {
535
+ "MODEL": [
536
+ "roles"
537
+ ]
538
+ }
539
+ },
540
+ {
541
+ "id": "sc-relation-revoke",
542
+ "type": "scenario",
543
+ "label": "Unshared record closes",
544
+ "x": 520,
545
+ "y": 520,
546
+ "given": "a document shared with a user through a team",
547
+ "when": "the user is removed from the team and asks for the document 10 seconds later",
548
+ "then": "the request is refused",
549
+ "hubWhen": {
550
+ "MODEL": [
551
+ "relations"
552
+ ]
553
+ }
554
+ },
555
+ {
556
+ "id": "sc-attributes",
557
+ "type": "scenario",
558
+ "label": "Missing attribute denies",
559
+ "x": 520,
560
+ "y": 650,
561
+ "given": "a policy allowing access to records of the user's own region",
562
+ "when": "a user without a region attribute asks for a record",
563
+ "then": "the request is refused and the log names the missing attribute",
564
+ "hubWhen": {
565
+ "MODEL": [
566
+ "attributes"
567
+ ]
568
+ }
569
+ },
570
+ {
571
+ "id": "sc-pdp-down",
572
+ "type": "scenario",
573
+ "label": "Engine down",
574
+ "x": 520,
575
+ "y": 780,
576
+ "given": "the policy decision point stopped",
577
+ "when": "a caller with every permission calls a protected operation",
578
+ "then": "the call is refused and an alert is raised",
579
+ "hubWhen": {
580
+ "MODEL": [
581
+ "roles",
582
+ "relations",
583
+ "attributes"
584
+ ],
585
+ "ENFORCE": [
586
+ "engine"
587
+ ]
588
+ }
589
+ },
590
+ {
591
+ "id": "sc-policy-release",
592
+ "type": "scenario",
593
+ "label": "Policy change released",
594
+ "x": 520,
595
+ "y": 910,
596
+ "given": "a merged policy change whose tests pass",
597
+ "when": "it is released",
598
+ "then": "every decision point serves it within 5 minutes and decision logs carry its version",
599
+ "hubWhen": {
600
+ "MODEL": [
601
+ "roles",
602
+ "relations",
603
+ "attributes"
604
+ ],
605
+ "ENFORCE": [
606
+ "engine"
607
+ ]
608
+ }
609
+ },
610
+ {
611
+ "id": "sc-review",
612
+ "type": "scenario",
613
+ "label": "Unconfirmed grant removed",
614
+ "x": 520,
615
+ "y": 1040,
616
+ "given": "an account whose grants were last reviewed {{REVIEW_DAYS}} days ago",
617
+ "when": "the owner does not confirm one of its grants within 14 days",
618
+ "then": "that grant is removed and the removal is recorded",
619
+ "hubWhen": {
620
+ "MODEL": [
621
+ "roles",
622
+ "relations",
623
+ "attributes"
624
+ ],
625
+ "REVIEW": [
626
+ "periodic"
627
+ ]
628
+ }
629
+ },
630
+ {
631
+ "id": "sc-leaver",
632
+ "type": "scenario",
633
+ "label": "Leaver loses grants",
634
+ "x": 520,
635
+ "y": 1170,
636
+ "given": "a person with three grants",
637
+ "when": "HR reports that the person has left",
638
+ "then": "within 24 hours the account holds no grant",
639
+ "hubWhen": {
640
+ "MODEL": [
641
+ "roles",
642
+ "relations",
643
+ "attributes"
644
+ ],
645
+ "REVIEW": [
646
+ "periodic"
647
+ ]
648
+ }
649
+ },
650
+ {
651
+ "id": "sc-directory",
652
+ "type": "scenario",
653
+ "label": "Group removal applies",
654
+ "x": 520,
655
+ "y": 1300,
656
+ "given": "a person whose permission comes from a directory group",
657
+ "when": "the directory removes the person from the group",
658
+ "then": "within 60 minutes the permission is gone",
659
+ "hubWhen": {
660
+ "MODEL": [
661
+ "roles",
662
+ "relations",
663
+ "attributes"
664
+ ],
665
+ "REVIEW": [
666
+ "directory"
667
+ ]
668
+ }
669
+ },
670
+ {
671
+ "id": "sc-elevation",
672
+ "type": "scenario",
673
+ "label": "Elevation expires",
674
+ "x": 520,
675
+ "y": 1430,
676
+ "given": "an operator with an approved elevation",
677
+ "when": "{{ELEVATION_HOURS}} hours pass",
678
+ "then": "the operator holds no administrator right and the elevation is in the audit log",
679
+ "hubWhen": {
680
+ "ADMIN": [
681
+ "jit"
682
+ ]
683
+ }
684
+ },
685
+ {
686
+ "id": "sc-break-glass",
687
+ "type": "scenario",
688
+ "label": "Break-glass used",
689
+ "x": 520,
690
+ "y": 1560,
691
+ "given": "the sealed break-glass account",
692
+ "when": "someone signs in with it",
693
+ "then": "the security owner is alerted within 5 minutes and the credential is rotated within 24 hours",
694
+ "hubWhen": {
695
+ "ADMIN": [
696
+ "jit"
697
+ ]
698
+ }
699
+ },
700
+ {
701
+ "id": "sc-named-admins",
702
+ "type": "scenario",
703
+ "label": "Admin list bounded",
704
+ "x": 520,
705
+ "y": 1690,
706
+ "given": "the list of administrator accounts",
707
+ "when": "a sixth account is granted administrator rights, or one has no phishing-resistant MFA",
708
+ "then": "the grant is refused, or the account is flagged until MFA is enrolled",
709
+ "hubWhen": {
710
+ "ADMIN": [
711
+ "standing"
712
+ ]
713
+ }
714
+ },
715
+ {
716
+ "id": "sc-admin-audit",
717
+ "type": "scenario",
718
+ "label": "Admin action leaves a trail",
719
+ "x": 520,
720
+ "y": 1820,
721
+ "given": "an administrator",
722
+ "when": "they change a customer's data and then try to delete its audit record",
723
+ "then": "the action is in the audit trail with person, time, target and reason, and the deletion is refused",
724
+ "hubWhen": {
725
+ "ADMIN": [
726
+ "jit",
727
+ "standing"
728
+ ]
729
+ }
730
+ },
731
+ {
732
+ "id": "sc-no-direct",
733
+ "type": "scenario",
734
+ "label": "No side door",
735
+ "x": 520,
736
+ "y": 1950,
737
+ "given": "the production infrastructure as deployed",
738
+ "when": "its access policies are listed",
739
+ "then": "0 persons hold a credential to a production data store",
740
+ "hubWhen": {
741
+ "ADMIN": [
742
+ "none"
743
+ ]
744
+ }
745
+ },
746
+ {
747
+ "id": "sc-flat",
748
+ "type": "scenario",
749
+ "label": "Nothing for some only",
750
+ "x": 520,
751
+ "y": 2080,
752
+ "given": "the operations the element offers",
753
+ "when": "they are listed",
754
+ "then": "none is meant for only some of its callers",
755
+ "hubWhen": {
756
+ "MODEL": [
757
+ "flat"
758
+ ]
759
+ }
760
+ },
761
+ {
762
+ "id": "adr-roles",
763
+ "type": "adr",
764
+ "label": "Permissions by role",
765
+ "x": 780,
766
+ "y": 0,
767
+ "concern": "authorization",
768
+ "status": "accepted",
769
+ "date": "",
770
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
771
+ "decision": "Users get roles and roles get permissions (NIST core RBAC with static separation of duty), kept in one permission matrix: operation × role, versioned with the code. Every operation checks its permission on the server, on the record it touches as well as its type; anything without a rule is refused. Permissions are decided {{ENFORCE}}; they are taken back through {{REVIEW}}. Keep the roles under about 20: when an exception would become a role, it is a sign that relationships or attributes are needed. Production access: {{ADMIN}}.",
772
+ "consequences": "• One matrix to read, review and test: a test can call every operation as every role.\n• Rules that depend on the record (only the owner may edit) do not fit roles and need an explicit check per operation.\n• Role explosion when every exception becomes a role.\n• Separation of duties can be checked when roles are granted.",
773
+ "alternatives": "1. Relationships (ReBAC): expresses ownership and sharing, harder to review as a whole.\n2. Attribute policies (ABAC): precise, but the attributes have to be kept fresh.\n3. One level of access for every caller: only right while nothing is meant for some users.",
774
+ "hubWhen": {
775
+ "MODEL": [
776
+ "roles"
777
+ ]
778
+ }
779
+ },
780
+ {
781
+ "id": "adr-relations",
782
+ "type": "adr",
783
+ "label": "Permissions by relationship",
784
+ "x": 780,
785
+ "y": 130,
786
+ "concern": "authorization",
787
+ "status": "accepted",
788
+ "date": "",
789
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
790
+ "decision": "Access follows from relationships between callers and records (owner, editor, viewer, member of the team or parent folder), modelled as a Zanzibar-style authorization model: object types, relations and the rules that derive one relation from another. Permissions are decided {{ENFORCE}}: with a policy engine, OpenFGA (CNCF, simple to run) or SpiceDB (stronger consistency options, Postgres or Spanner backends) holds the relationship tuples, chosen by the consistency and scale needed; in code, a relationship table queried by one authorization module. Every check names the record; lists ask for the records the caller may see (ListObjects or a filtered query). A removed relationship takes effect within 10 seconds, and a caller's own change is never evaluated against an older snapshot (a consistency token from the write is passed to the check). Permissions are taken back through {{REVIEW}}. Production access: {{ADMIN}}.",
791
+ "consequences": "• Sharing, ownership and nested folders or teams are expressed directly, without a role per case.\n• Relationship tuples are a second source of truth beside the domain data and must be written in the same change as it (outbox or transactional write).\n• Lists of what a caller may see are expensive on large graphs and need their own design.\n• A stale read can grant just-removed access: consistency tokens are needed.",
792
+ "alternatives": "1. Roles (RBAC): simpler to review, cannot express \"shared with me\".\n2. Attribute policies (ABAC): good for rules over data, awkward for sharing and nesting.\n3. Access control lists per record: simple, but hard to change for a whole team or folder.",
793
+ "hubWhen": {
794
+ "MODEL": [
795
+ "relations"
796
+ ]
797
+ }
798
+ },
799
+ {
800
+ "id": "adr-attributes",
801
+ "type": "adr",
802
+ "label": "Permissions by attribute policy",
803
+ "x": 780,
804
+ "y": 260,
805
+ "concern": "authorization",
806
+ "status": "accepted",
807
+ "date": "",
808
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
809
+ "decision": "Permissions are policies over attributes of the caller (department, region, clearance), the record (owner, classification, region) and the request (time, network, assurance level), written as policy as code. Permissions are decided {{ENFORCE}}: with a policy engine, Open Policy Agent (Rego, general purpose, sidecar or library) or Cedar with Amazon Verified Permissions (typed, analysable policies, managed on AWS), chosen by the platform and whether policies must be provably analysable; in code, Casbin or CASL. Attributes come from named sources with a freshness limit of 15 minutes, and a missing or stale attribute denies. Permissions are taken back through {{REVIEW}}. Production access: {{ADMIN}}.",
810
+ "consequences": "• Rules such as \"own region, working hours only\" are written once, not as roles per region.\n• Every attribute is an input to keep correct and fresh: a wrong department is a wrong decision.\n• Policies are code: they need tests and review of their own.\n• Who may see what is harder to answer for an auditor than with a role matrix.",
811
+ "alternatives": "1. Roles (RBAC): easy to review, but a role per region or classification explodes.\n2. Relationships (ReBAC): better for sharing, weaker for rules over data.\n3. One level of access for every caller: only right while nothing is meant for some users.",
812
+ "hubWhen": {
813
+ "MODEL": [
814
+ "attributes"
815
+ ]
816
+ }
817
+ },
818
+ {
819
+ "id": "adr-flat",
820
+ "type": "adr",
821
+ "label": "One level of access",
822
+ "x": 780,
823
+ "y": 390,
824
+ "concern": "authorization",
825
+ "status": "accepted",
826
+ "date": "",
827
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had. Here nobody needs more than anyone else: the element offers the same to every signed-in caller.",
828
+ "decision": "Every signed-in caller may do everything the element offers; there are no roles or permissions in the application, so no decision point and no review of grants are needed. Anything meant for some callers only stays out of it until this decision is superseded. Production access: {{ADMIN}}.",
829
+ "consequences": "• Nothing to manage, test or review in the application.\n• The first feature for some callers only needs this decision superseded first.\n• Who signs in is the only boundary: authentication carries all the weight.",
830
+ "alternatives": "1. Roles, added when the first restricted feature comes.\n2. Two roles (user, administrator) from the start: little cost now, but an untested boundary until something needs it.",
831
+ "hubWhen": {
832
+ "MODEL": [
833
+ "flat"
834
+ ]
835
+ }
836
+ },
837
+ {
838
+ "id": "adr-in-code",
839
+ "type": "adr",
840
+ "label": "Permissions decided in code",
841
+ "x": 780,
842
+ "y": 520,
843
+ "concern": "authorization",
844
+ "status": "accepted",
845
+ "date": "",
846
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
847
+ "decision": "Each service decides permissions in one authorization module, called from one place in the request pipeline (middleware, filter or policy attribute), never from scattered checks in handlers. Use the framework's mechanism: Spring Security method security, ASP.NET Core authorization policies, Pundit or Action Policy (Rails), CASL or Casbin (Node). A static rule fails the build for any route that does not go through the module: Semgrep for Express-style routers, ArchUnit for Spring (every request mapping annotated with PreAuthorize), a Roslyn analyzer for ASP.NET Core, a RuboCop cop for Rails.",
848
+ "consequences": "• No extra service on the request path; decisions take microseconds.\n• Rules change and ship with the code that needs them.\n• Each service has its own module: with more services or languages, the rules drift apart.\n• Security cannot change a rule without a release of the service.",
849
+ "alternatives": "1. A central policy engine (OPA, Cedar, OpenFGA): one place for every service, but a dependency on every request.\n2. Checks only at the API gateway: coarse, cannot see the record, and every internal call bypasses them.",
850
+ "hubWhen": {
851
+ "MODEL": [
852
+ "roles",
853
+ "relations",
854
+ "attributes"
855
+ ],
856
+ "ENFORCE": [
857
+ "code"
858
+ ]
859
+ }
860
+ },
861
+ {
862
+ "id": "adr-engine",
863
+ "type": "adr",
864
+ "label": "Permissions decided by a policy engine",
865
+ "x": 780,
866
+ "y": 650,
867
+ "concern": "authorization",
868
+ "status": "accepted",
869
+ "date": "",
870
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
871
+ "decision": "A policy decision point outside the service code answers every permission check; services only enforce its answer (PEP/PDP). Choose by the model: Open Policy Agent for roles and attribute rules across many services and languages (sidecar or embedded, Rego); Cedar with Amazon Verified Permissions for typed, analysable policies on AWS; OpenFGA or SpiceDB for relationships. The decision point runs next to the services (sidecar or same host) so a check stays under 10 ms at p99; when it does not answer within 50 ms the request is refused. Policies live in their own repository, are tested in CI and released as versioned bundles that reach every decision point within 5 minutes; every decision is logged with the policy version.",
872
+ "consequences": "• One place for every service's rules, in one language, reviewable by security.\n• The decision point is on every request path: it needs the same availability as the services, and an outage refuses requests.\n• Policies need data (roles, relationships, attributes) pushed to or fetched by the engine.\n• Decision logs answer \"why was this allowed\" after an incident.",
873
+ "alternatives": "1. Authorization in the service code: no extra dependency, but rules drift apart across services.\n2. Checks only at the API gateway: coarse, cannot see the record.\n3. A managed authorization service (Auth0 FGA, Permit.io): less to run, more to pay per check and a vendor on the request path.",
874
+ "hubWhen": {
875
+ "MODEL": [
876
+ "roles",
877
+ "relations",
878
+ "attributes"
879
+ ],
880
+ "ENFORCE": [
881
+ "engine"
882
+ ]
883
+ }
884
+ },
885
+ {
886
+ "id": "adr-review-periodic",
887
+ "type": "adr",
888
+ "label": "Grants taken back by periodic reviews",
889
+ "x": 780,
890
+ "y": 780,
891
+ "concern": "authorization",
892
+ "status": "accepted",
893
+ "date": "",
894
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
895
+ "decision": "Every grant has an owner who confirms it every {{REVIEW_DAYS}} days; a grant not confirmed within 14 days of the review is removed. Leavers reported by HR lose every grant within 24 hours, movers within 5 working days. The grants table keeps the owner and the last review date, and a daily job lists what is overdue and opens a ticket for the owner.",
896
+ "consequences": "• Works with grants given by hand in the application and with any identity provider.\n• Owner time every cycle: the number of grants to confirm grows with the number of users and permissions, so the cadence is a cost.\n• Between reviews a leaver keeps access unless HR reports them: the leaver process is the real control.",
897
+ "alternatives": "1. Directory sync: no reviews to run, but every user must be in a directory that HR keeps right.\n2. No reviews: the cheapest, until the audit asks who may do what and why.",
898
+ "hubWhen": {
899
+ "MODEL": [
900
+ "roles",
901
+ "relations",
902
+ "attributes"
903
+ ],
904
+ "REVIEW": [
905
+ "periodic"
906
+ ]
907
+ }
908
+ },
909
+ {
910
+ "id": "adr-review-directory",
911
+ "type": "adr",
912
+ "label": "Grants follow the directory",
913
+ "x": 780,
914
+ "y": 910,
915
+ "concern": "authorization",
916
+ "status": "accepted",
917
+ "date": "",
918
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
919
+ "decision": "Permissions are derived only from groups in the identity provider, delivered by SCIM provisioning or group claims; nothing is granted by hand in the application. A change in the directory reaches the permissions within 60 minutes, and a disabled account loses every permission in the same time. An hourly job compares the grants with the directory and fails on any grant without a group behind it.",
920
+ "consequences": "• Joiners, movers and leavers follow the HR system without a review cycle.\n• Every user must be in the directory: contractors and partners need an account there too.\n• The group model in the directory becomes the permission model, owned together with IT.",
921
+ "alternatives": "1. Periodic reviews: no directory needed, owner time every cycle.\n2. Both: directory groups for the standard permissions, reviews for the exceptions granted by hand.",
922
+ "hubWhen": {
923
+ "MODEL": [
924
+ "roles",
925
+ "relations",
926
+ "attributes"
927
+ ],
928
+ "REVIEW": [
929
+ "directory"
930
+ ]
931
+ }
932
+ },
933
+ {
934
+ "id": "adr-jit",
935
+ "type": "adr",
936
+ "label": "Just-in-time privileged access",
937
+ "x": 780,
938
+ "y": 1040,
939
+ "concern": "authorization",
940
+ "status": "accepted",
941
+ "date": "",
942
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
943
+ "decision": "Nobody holds standing administrator rights in production. Operators request elevation with a ticket reference; a second person approves it; it expires after at most {{ELEVATION_HOURS}} hours. Use the platform's mechanism: Microsoft Entra Privileged Identity Management, AWS IAM Identity Center with temporary elevated access, Google Cloud Privileged Access Manager, or Teleport or HashiCorp Boundary for hosts and databases, chosen by where the infrastructure runs. One sealed break-glass account per environment, its credential split or in a safe, alerts on use and is rotated after it. Every privileged action is recorded in the audit trail, which the administrators cannot change; its store, tamper evidence and retention are decided in the Audit trail pack. Actions on the cloud's control plane reach it through the provider's own log (a CloudTrail trail with log file validation, or the Azure Activity Log) delivered to storage the administrators cannot change, kept for the audit trail's retention and never under 365 days.",
944
+ "consequences": "• A phished operator account gives nothing in production by itself.\n• Emergencies need an approver awake, or the break-glass path.\n• Every elevation leaves a record of who, why and for how long.\n• The elevation tool is itself a critical system to protect.",
945
+ "alternatives": "1. Named standing administrators: simpler, but the rights are there for whoever takes the account.\n2. No direct access at all: the strongest, but every support need must be built into the product first.",
946
+ "hubWhen": {
947
+ "ADMIN": [
948
+ "jit"
949
+ ]
950
+ }
951
+ },
952
+ {
953
+ "id": "adr-standing",
954
+ "type": "adr",
955
+ "label": "Named standing administrators",
956
+ "x": 780,
957
+ "y": 1170,
958
+ "concern": "authorization",
959
+ "status": "accepted",
960
+ "date": "",
961
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
962
+ "decision": "At most 5 named people hold administrator rights in production all the time; each signs in with phishing-resistant MFA (FIDO2 security key or platform passkey), and the list is confirmed every 30 days. Every privileged action is recorded in the audit trail, which the administrators cannot change; its store, tamper evidence and retention are decided in the Audit trail pack. Actions on the cloud's control plane reach it through the provider's own log (a CloudTrail trail with log file validation, or the Azure Activity Log) delivered to storage the administrators cannot change, kept for the audit trail's retention and never under 365 days. Revisit when the team grows past 10 people or the data becomes regulated: just-in-time elevation is then the next step.",
963
+ "consequences": "• No approval waits: administrators can act at once.\n• A stolen administrator session is a full compromise until it is noticed.\n• The audit log is the main control, so someone has to read it.",
964
+ "alternatives": "1. Just-in-time elevation with approval: smaller window, needs an approver available.\n2. No direct access: support only through the product.",
965
+ "hubWhen": {
966
+ "ADMIN": [
967
+ "standing"
968
+ ]
969
+ }
970
+ },
971
+ {
972
+ "id": "adr-no-direct",
973
+ "type": "adr",
974
+ "label": "No direct production access",
975
+ "x": 780,
976
+ "y": 1300,
977
+ "concern": "authorization",
978
+ "status": "accepted",
979
+ "date": "",
980
+ "context": "People and other systems use this element with different rights. The forces: most access-control flaws are not broken sign-ins but a check missing at one operation, or a check on the type of record and not on the record itself (OWASP API1:2023, broken object level authorization); anything the interface hides can still be called; checks scattered through the code drift apart, while a central policy adds a dependency on the request path; administrators and support staff need more than everyone else, and standing privileges are what attackers look for; and permissions accumulate as people change jobs and keep what they had.",
981
+ "decision": "No person holds a credential that reaches production data stores; infrastructure changes go only through the deployment pipeline (Terraform or Pulumi applied by CI), and support work goes through admin operations of the element itself, authorized and audited like any other operation. A policy check on the infrastructure code fails any change that gives a person access to a data store. Recovering from a broken pipeline is done by the platform's own account recovery, documented and rehearsed once a year.",
982
+ "consequences": "• No side door: every access to data passes the element's own checks and audit.\n• Every support need (a refund, a data fix) must exist as an admin operation before it is needed.\n• Incident response is slower when the pipeline itself is broken.",
983
+ "alternatives": "1. Just-in-time elevation: a controlled side door for what the product cannot do yet.\n2. Named standing administrators: fastest, weakest.",
984
+ "hubWhen": {
985
+ "ADMIN": [
986
+ "none"
987
+ ]
988
+ }
989
+ },
990
+ {
991
+ "id": "ff-matrix",
992
+ "type": "fitness-fn",
993
+ "label": "Permission matrix enforced",
994
+ "x": 1040,
995
+ "y": 0,
996
+ "characteristic": "security",
997
+ "scope": "atomic",
998
+ "cadence": "triggered",
999
+ "trigger": "pull-request",
1000
+ "invocation": "automated",
1001
+ "description": "A test lists the operations from the router (not from a list kept by hand), fails on any operation the expected matrix does not name, calls each as a caller of every role or rule case, and compares allowed or refused with the matrix; it also calls each operation that takes an id with the id of a record of another user, and checks that a refusal left a log entry with caller, operation and record.\n\nThreshold: Every operation called as every role or rule case gives the expected answer, and with another user's record ids returns 403 or 404; 0 mismatches and 0 operations without an entry in the expected matrix\n\nTool: Vitest with supertest (or the test runner and HTTP client of your stack: JUnit with MockMvc, xUnit with WebApplicationFactory, RSpec request specs)\n\n```ts\nimport request from 'supertest'\nimport { app, routes } from '../src/app' // routes: the router's table\nimport { EXPECTED } from './authz/expected' // \"METHOD path\" -> roles allowed\nimport { CASES, tokenFor, otherUsersRecord, refusalsLogged } from './authz/fixtures'\n\ndescribe.each(routes)('$method $path', (route) => {\n const key = `${route.method} ${route.path}`\n it('is in the expected matrix', () => {\n expect(EXPECTED).toHaveProperty(key)\n })\n it.each(CASES)('as %s gives the expected answer', async (who) => {\n const res = await request(app)[route.method.toLowerCase()](route.example)\n .set('Authorization', `Bearer ${await tokenFor(who)}`)\n const allowed = EXPECTED[key]?.includes(who) ?? false\n expect([403, 404].includes(res.status)).toBe(!allowed)\n if (!allowed) expect(await refusalsLogged({ caller: who, operation: key })).toBeGreaterThan(0)\n })\n it.runIf(route.path.includes(':id'))('refuses another user\\'s record', async () => {\n const res = await request(app)[route.method.toLowerCase()](route.path.replace(':id', await otherUsersRecord()))\n .set('Authorization', `Bearer ${await tokenFor('owner')}`)\n expect([403, 404]).toContain(res.status)\n })\n})\n```",
1002
+ "hubWhen": {
1003
+ "MODEL": [
1004
+ "roles",
1005
+ "relations",
1006
+ "attributes"
1007
+ ]
1008
+ }
1009
+ },
1010
+ {
1011
+ "id": "ff-route-guard",
1012
+ "type": "fitness-fn",
1013
+ "label": "Every route guarded",
1014
+ "x": 1040,
1015
+ "y": 130,
1016
+ "characteristic": "security",
1017
+ "scope": "atomic",
1018
+ "cadence": "triggered",
1019
+ "trigger": "pull-request",
1020
+ "invocation": "automated",
1021
+ "description": "A static rule runs on every pull request and fails on a route registered without going through the authorization module, so a check cannot be forgotten in a handler. The rule below is the Express-style form ($ROUTER limited to app, router and *Router, so map.get or axios.get do not match); routes mounted with router.use are checked where they are defined.\n\nThreshold: 0 routes registered without the authorize middleware\n\nTool: Semgrep (Express-style routers); for Spring: ArchUnit methods().that().areAnnotatedWith(RequestMapping.class).should().beAnnotatedWith(PreAuthorize.class); for ASP.NET Core: a Roslyn analyzer over [Authorize]; for Rails: a RuboCop cop over verify_authorized\n\n```yaml\nrules:\n - id: route-without-authorize\n languages: [typescript, javascript]\n severity: ERROR\n message: Every route goes through authorize(); ADR \"Permissions decided in code\"\n patterns:\n - pattern-either:\n - pattern: $ROUTER.$METHOD($PATH, ...)\n - pattern: $ROUTER.route($PATH).$METHOD(...)\n - metavariable-regex:\n metavariable: $ROUTER\n regex: ^(app|router|[A-Za-z]+Router)$\n - metavariable-regex:\n metavariable: $METHOD\n regex: ^(get|post|put|patch|delete|all)$\n - pattern-not: $ROUTER.$METHOD($PATH, ..., authorize(...), ...)\n - pattern-not: $ROUTER.route($PATH).$METHOD(..., authorize(...), ...)\n```",
1022
+ "hubWhen": {
1023
+ "MODEL": [
1024
+ "roles",
1025
+ "relations",
1026
+ "attributes"
1027
+ ],
1028
+ "ENFORCE": [
1029
+ "code"
1030
+ ]
1031
+ }
1032
+ },
1033
+ {
1034
+ "id": "ff-policy-tests",
1035
+ "type": "fitness-fn",
1036
+ "label": "Policies tested",
1037
+ "x": 1040,
1038
+ "y": 260,
1039
+ "characteristic": "security",
1040
+ "scope": "atomic",
1041
+ "cadence": "triggered",
1042
+ "trigger": "pull-request",
1043
+ "invocation": "automated",
1044
+ "description": "Every policy has unit tests next to it, including the default deny and a missing attribute; CI runs them with coverage and refuses to publish the bundle below the threshold.\n\nThreshold: 0 failing policy tests and at least 90% policy coverage before a bundle is released\n\nTool: Open Policy Agent (opa test --coverage --threshold 90); with Cedar: cedar validate and the Cedar test suite of Amazon Verified Permissions in CI\n\n```rego\npackage authz_test\n\nimport rego.v1\n\nimport data.authz\n\ntest_clerk_cannot_delete_order if {\n\tnot authz.allow with input as {\"user\": {\"roles\": [\"clerk\"]}, \"action\": \"order:delete\", \"resource\": {\"type\": \"order\", \"region\": \"eu\"}}\n}\n\ntest_other_region_denied if {\n\tnot authz.allow with input as {\"user\": {\"roles\": [\"manager\"], \"region\": \"eu\"}, \"action\": \"order:read\", \"resource\": {\"type\": \"order\", \"region\": \"us\"}}\n}\n\ntest_missing_region_denied if {\n\tnot authz.allow with input as {\"user\": {\"roles\": [\"manager\"]}, \"action\": \"order:read\", \"resource\": {\"type\": \"order\", \"region\": \"eu\"}}\n}\n\ntest_unknown_action_denied if {\n\tnot authz.allow with input as {\"user\": {\"roles\": [\"admin\"]}, \"action\": \"order:unknown\", \"resource\": {\"type\": \"order\"}}\n}\n```",
1045
+ "hubWhen": {
1046
+ "MODEL": [
1047
+ "roles",
1048
+ "attributes"
1049
+ ],
1050
+ "ENFORCE": [
1051
+ "engine"
1052
+ ]
1053
+ }
1054
+ },
1055
+ {
1056
+ "id": "ff-policy-rollout",
1057
+ "type": "fitness-fn",
1058
+ "label": "Policy bundle reaches every decision point",
1059
+ "x": 1040,
1060
+ "y": 390,
1061
+ "characteristic": "security",
1062
+ "scope": "holistic",
1063
+ "cadence": "triggered",
1064
+ "trigger": "release",
1065
+ "invocation": "automated",
1066
+ "description": "After the bundle is published, the release pipeline polls the status API of every decision point until each reports the new revision, failing after 5 minutes, then reads a sample of the decision log and fails on an entry without the bundles.<name>.revision field.\n\nThreshold: Every decision point reports the released bundle revision within 5 minutes of the release; 0 decision log entries without a bundle revision\n\nTool: bash with curl and jq in the release pipeline (OPA status API; for Cedar or OpenFGA, the equivalent version endpoint of the engine)\n\n```bash\n#!/usr/bin/env bash\n# PDPS: the decision points' base URLs; REVISION: the revision just published; BUNDLE: its name\nset -euo pipefail\ndeadline=$(( $(date +%s) + 300 ))\nfor pdp in $PDPS; do\n until [ \"$(curl -sf \"$pdp/v1/status\" | jq -r \".result.bundles[\\\"$BUNDLE\\\"].active_revision\")\" = \"$REVISION\" ]; do\n [ \"$(date +%s)\" -lt \"$deadline\" ] || { echo \"$pdp did not load $REVISION within 5 minutes\"; exit 1; }\n sleep 5\n done\ndone\n# a sample of the decision log, one JSON event per line\nmissing=$(tail -n 100 \"$DECISION_LOG\" | jq -c \"select(.bundles[\\\"$BUNDLE\\\"].revision == null)\" | wc -l)\n[ \"$missing\" -eq 0 ] || { echo \"$missing decision log entries carry no policy version\"; exit 1; }\n```",
1067
+ "hubWhen": {
1068
+ "MODEL": [
1069
+ "roles",
1070
+ "relations",
1071
+ "attributes"
1072
+ ],
1073
+ "ENFORCE": [
1074
+ "engine"
1075
+ ]
1076
+ }
1077
+ },
1078
+ {
1079
+ "id": "ff-relation-tests",
1080
+ "type": "fitness-fn",
1081
+ "label": "Relationship model tested",
1082
+ "x": 1040,
1083
+ "y": 520,
1084
+ "characteristic": "security",
1085
+ "scope": "atomic",
1086
+ "cadence": "triggered",
1087
+ "trigger": "pull-request",
1088
+ "invocation": "automated",
1089
+ "description": "The authorization model has a test file with tuples and expected checks, owners, team members and strangers included; CI runs it on every change to the model.\n\nThreshold: 0 failing assertions over the authorization model, run on every change of the model\n\nTool: OpenFGA CLI (fga model test); with SpiceDB: zed validate over a validation file\n\n```yaml\nname: Order sharing\nmodel_file: ./model.fga\ntuples:\n - user: user:anne\n relation: owner\n object: order:1\n - user: team:sales#member\n relation: viewer\n object: order:1\n - user: user:bob\n relation: member\n object: team:sales\ntests:\n - name: owner edits, team views, strangers see nothing\n check:\n - user: user:anne\n object: order:1\n assertions: { can_edit: true }\n - user: user:bob\n object: order:1\n assertions: { can_view: true, can_edit: false }\n - user: user:eve\n object: order:1\n assertions: { can_view: false }\n```",
1090
+ "hubWhen": {
1091
+ "MODEL": [
1092
+ "relations"
1093
+ ],
1094
+ "ENFORCE": [
1095
+ "engine"
1096
+ ]
1097
+ }
1098
+ },
1099
+ {
1100
+ "id": "ff-sod",
1101
+ "type": "fitness-fn",
1102
+ "label": "Conflicting roles refused",
1103
+ "x": 1040,
1104
+ "y": 650,
1105
+ "characteristic": "security",
1106
+ "scope": "atomic",
1107
+ "cadence": "triggered",
1108
+ "trigger": "pull-request",
1109
+ "invocation": "automated",
1110
+ "description": "A test reads the separation-of-duties pairs from the code, grants the first role of each pair to a fresh account, tries to grant the second, and expects a refusal and a recorded attempt.\n\nThreshold: Every pair on the separation-of-duties list is refused when granted to one account, and the attempt is recorded; 0 pairs granted\n\nTool: Vitest with supertest (or the test runner and HTTP client of your stack)\n\n```ts\nimport request from 'supertest'\nimport { app } from '../src/app'\nimport { SEPARATION_OF_DUTIES } from '../src/authz/roles' // [['payee-creator', 'payment-approver'], ...]\nimport { tokenFor, createAccount, grantAttempts } from './authz/fixtures'\n\ndescribe.each(SEPARATION_OF_DUTIES)('%s and %s', (first, second) => {\n it('cannot both be held by one account', async () => {\n const account = await createAccount({ roles: [first] })\n const res = await request(app).post(`/accounts/${account.id}/roles`).send({ role: second })\n .set('Authorization', `Bearer ${await tokenFor('administrator')}`)\n expect(res.status).toBe(409)\n expect(await grantAttempts({ account: account.id, role: second, refused: true })).toHaveLength(1)\n })\n})\n```",
1111
+ "hubWhen": {
1112
+ "MODEL": [
1113
+ "roles"
1114
+ ]
1115
+ }
1116
+ },
1117
+ {
1118
+ "id": "ff-unshare",
1119
+ "type": "fitness-fn",
1120
+ "label": "Unsharing takes effect in time",
1121
+ "x": 1040,
1122
+ "y": 780,
1123
+ "characteristic": "security",
1124
+ "scope": "atomic",
1125
+ "cadence": "triggered",
1126
+ "trigger": "pull-request",
1127
+ "invocation": "automated",
1128
+ "description": "An integration test shares a document with a user through a team, removes the user from the team, polls the document until it is refused (failing past 10 seconds), and checks that a request carrying the consistency token of the removal is refused on the first try.\n\nThreshold: A record is refused within 10 seconds of the relationship that granted it being removed; a check made with the write's consistency token is refused at once\n\nTool: Vitest with supertest against the service and its relationship store (OpenFGA, SpiceDB or the relationship table)\n\n```ts\nimport request from 'supertest'\nimport { app } from '../src/app'\nimport { seedTeamShare, tokenFor, sleep } from './authz/fixtures'\n\nit('closes a document within 10 seconds of the member being removed', async () => {\n const { doc, member, team, admin } = await seedTeamShare()\n const removal = await request(app).delete(`/teams/${team.id}/members/${member.id}`).set('Authorization', `Bearer ${await tokenFor(admin)}`)\n expect(removal.status).toBe(204)\n const token = removal.headers['x-consistency-token'] // the write's token, from the relationship store\n const atOnce = await request(app).get(`/documents/${doc.id}`).set('Authorization', `Bearer ${await tokenFor(member)}`).set('X-Consistency-Token', token)\n expect([403, 404]).toContain(atOnce.status)\n const started = Date.now()\n while ((await request(app).get(`/documents/${doc.id}`).set('Authorization', `Bearer ${await tokenFor(member)}`)).status === 200) {\n expect(Date.now() - started).toBeLessThan(10_000)\n await sleep(500)\n }\n})\n```",
1129
+ "hubWhen": {
1130
+ "MODEL": [
1131
+ "relations"
1132
+ ]
1133
+ }
1134
+ },
1135
+ {
1136
+ "id": "ff-missing-attribute",
1137
+ "type": "fitness-fn",
1138
+ "label": "Missing attributes deny",
1139
+ "x": 1040,
1140
+ "y": 910,
1141
+ "characteristic": "security",
1142
+ "scope": "atomic",
1143
+ "cadence": "triggered",
1144
+ "trigger": "pull-request",
1145
+ "invocation": "automated",
1146
+ "description": "An integration test creates a user without a region, and one whose region was last refreshed 16 minutes ago, asks for a record each and expects 403 with a log entry naming the attribute.\n\nThreshold: A request from a user without an attribute the policy reads, or with one refreshed more than 15 minutes ago, is refused and the log names the attribute; 0 such requests allowed\n\nTool: Vitest with supertest, the attribute source seeded by the test (or the test runner and HTTP client of your stack)\n\n```ts\nimport request from 'supertest'\nimport { app } from '../src/app'\nimport { userWithAttributes, tokenFor, decisionLog } from './authz/fixtures'\n\nit.each([\n ['no region', {}],\n ['a stale region', { region: 'eu', refreshedAt: new Date(Date.now() - 16 * 60_000) }],\n])('refuses a user with %s and names the attribute', async (_, attributes) => {\n const user = await userWithAttributes(attributes)\n const res = await request(app).get('/orders/1').set('Authorization', `Bearer ${await tokenFor(user)}`)\n expect(res.status).toBe(403)\n expect(await decisionLog.last({ user: user.id })).toMatchObject({ decision: 'deny', attribute: 'region' })\n})\n```",
1147
+ "hubWhen": {
1148
+ "MODEL": [
1149
+ "attributes"
1150
+ ]
1151
+ }
1152
+ },
1153
+ {
1154
+ "id": "ff-fail-closed",
1155
+ "type": "fitness-fn",
1156
+ "label": "Engine outage refuses",
1157
+ "x": 1040,
1158
+ "y": 1040,
1159
+ "characteristic": "security",
1160
+ "scope": "atomic",
1161
+ "cadence": "triggered",
1162
+ "trigger": "pull-request",
1163
+ "invocation": "automated",
1164
+ "description": "An integration test starts the service with its decision point, times 200 allowed calls and checks the p99, then stops the decision point and calls protected operations as a caller with every permission, expecting each to be refused.\n\nThreshold: 100% of protected calls refused while the decision point is down; p99 decision time under 10 ms over 200 calls while it is up\n\nTool: Testcontainers with Vitest\n\n```ts\nimport { GenericContainer } from 'testcontainers'\nimport { startService, protectedRoutes } from './authz/service'\n\nit('answers fast while the engine is up and refuses everything while it is down', async () => {\n const pdp = await new GenericContainer('openpolicyagent/opa:latest') // pin a version in your repository\n .withExposedPorts(8181).withCommand(['run', '--server', '--addr', ':8181']).start()\n const app = await startService({ pdpUrl: `http://${pdp.getHost()}:${pdp.getMappedPort(8181)}` })\n const times: number[] = []\n for (let i = 0; i < 200; i++) {\n const started = performance.now()\n expect((await app.call(protectedRoutes[0], { as: 'superuser' })).status).toBe(200)\n times.push(performance.now() - started)\n }\n times.sort((a, b) => a - b)\n expect(times[Math.floor(times.length * 0.99)]).toBeLessThan(10)\n await pdp.stop()\n for (const route of protectedRoutes) {\n const res = await app.call(route, { as: 'superuser' })\n expect([403, 503]).toContain(res.status)\n }\n})\n```",
1165
+ "hubWhen": {
1166
+ "MODEL": [
1167
+ "roles",
1168
+ "relations",
1169
+ "attributes"
1170
+ ],
1171
+ "ENFORCE": [
1172
+ "engine"
1173
+ ]
1174
+ }
1175
+ },
1176
+ {
1177
+ "id": "ff-stale-grants",
1178
+ "type": "fitness-fn",
1179
+ "label": "No overdue grants",
1180
+ "x": 1040,
1181
+ "y": 1170,
1182
+ "characteristic": "security",
1183
+ "scope": "atomic",
1184
+ "cadence": "triggered",
1185
+ "trigger": "nightly",
1186
+ "invocation": "automated",
1187
+ "description": "A scheduled CI job runs a query over the grants every day and fails, printing the rows and opening a ticket for the owner, when a grant is overdue for review or belongs to a person who has left.\n\nThreshold: 0 grants unreviewed for more than {{REVIEW_DAYS}} + 14 days; 0 grants of leavers older than 24 hours\n\nTool: psql in a scheduled CI job (bash)\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\noverdue=$(psql \"$DATABASE_URL\" -Atc \"\n select g.account_id || ' ' || g.permission || ' reviewed ' || coalesce(g.last_reviewed_at::text, 'never') || ' left ' || coalesce(p.left_at::text, '-')\n from grants g\n join people p on p.account_id = g.account_id\n where g.last_reviewed_at < now() - interval '{{REVIEW_DAYS}} days' - interval '14 days'\n or (p.left_at is not null and p.left_at < now() - interval '24 hours')\")\n[ -z \"$overdue\" ] || { echo \"$overdue\"; exit 1; }\n```",
1188
+ "hubWhen": {
1189
+ "MODEL": [
1190
+ "roles",
1191
+ "relations",
1192
+ "attributes"
1193
+ ],
1194
+ "REVIEW": [
1195
+ "periodic"
1196
+ ]
1197
+ }
1198
+ },
1199
+ {
1200
+ "id": "ff-directory-sync",
1201
+ "type": "fitness-fn",
1202
+ "label": "Grants match the directory",
1203
+ "x": 1040,
1204
+ "y": 1300,
1205
+ "characteristic": "security",
1206
+ "scope": "atomic",
1207
+ "cadence": "continual",
1208
+ "invocation": "automated",
1209
+ "description": "A scheduled job compares the grants with the directory's groups every hour and fails, printing the rows, on any grant that no group explains, or that belongs to an account the directory has disabled.\n\nThreshold: 0 grants without a directory group behind them; 0 grants of disabled accounts older than 60 minutes\n\nTool: psql in a scheduled CI job (bash); the directory_* tables are filled by the SCIM endpoint\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\nstray=$(psql \"$DATABASE_URL\" -Atc \"\n select g.account_id || ' ' || g.permission\n from grants g\n left join directory_group_members m on m.account_id = g.account_id and m.group_name = g.source_group\n left join directory_accounts a on a.account_id = g.account_id\n where m.account_id is null\n or (a.disabled_at is not null and a.disabled_at < now() - interval '60 minutes')\")\n[ -z \"$stray\" ] || { echo \"$stray\"; exit 1; }\n```",
1210
+ "hubWhen": {
1211
+ "MODEL": [
1212
+ "roles",
1213
+ "relations",
1214
+ "attributes"
1215
+ ],
1216
+ "REVIEW": [
1217
+ "directory"
1218
+ ]
1219
+ }
1220
+ },
1221
+ {
1222
+ "id": "ff-standing-admins",
1223
+ "type": "fitness-fn",
1224
+ "label": "No standing admins",
1225
+ "x": 1040,
1226
+ "y": 1430,
1227
+ "characteristic": "security",
1228
+ "scope": "atomic",
1229
+ "cadence": "triggered",
1230
+ "trigger": "nightly",
1231
+ "invocation": "automated",
1232
+ "description": "A scheduled query over the cloud account lists IAM users with an administrator policy attached directly, through a group or inline, and IAM Identity Center assignments of administrator permission sets to a person or group; every row is compared with the elevation tool's active requests, and any without one is a standing right that bypasses elevation. Use the equivalent tables for Azure (azuread_user, azure_role_assignment) or Google Cloud (gcp_iam_policy).\n\nThreshold: 0 people holding administrator rights outside an active, approved elevation\n\nTool: Steampipe (AWS plugin), in a scheduled CI job that fails when the query returns a row not matched by an active elevation\n\n```sql\n-- every row is a standing administrator right unless the elevation tool lists it as active\nwith admin_policies as (\n select unnest(array['arn:aws:iam::aws:policy/AdministratorAccess', 'arn:aws:iam::aws:policy/PowerUserAccess']) as arn\n),\nadmin_sets as (\n select mpa.permission_set_arn\n from aws_ssoadmin_managed_policy_attachment mpa\n join aws_ssoadmin_permission_set ps on ps.arn = mpa.permission_set_arn\n where mpa.managed_policy_arn in (select arn from admin_policies)\n)\nselect 'iam user ' || u.name as holder\nfrom aws_iam_user u\nwhere exists (select 1 from admin_policies p where u.attached_policy_arns ? p.arn)\n or exists (select 1 from jsonb_array_elements(u.inline_policies) ip\n where ip -> 'PolicyDocument' -> 'Statement' @> '[{\"Effect\": \"Allow\", \"Action\": \"*\"}]')\nunion all\nselect 'iam group ' || g.name || ' member ' || (m ->> 'UserName')\nfrom aws_iam_group g, jsonb_array_elements(g.users) m\nwhere exists (select 1 from admin_policies p where g.attached_policy_arns ? p.arn)\nunion all\nselect 'identity center ' || a.principal_type || ' ' || a.principal_id || ' in account ' || a.target_account_id\nfrom aws_ssoadmin_account_assignment a\nwhere a.permission_set_arn in (select permission_set_arn from admin_sets)\n and a.target_account_id = '123456789012'; -- the production account\n```",
1233
+ "hubWhen": {
1234
+ "ADMIN": [
1235
+ "jit"
1236
+ ]
1237
+ }
1238
+ },
1239
+ {
1240
+ "id": "ff-break-glass",
1241
+ "type": "fitness-fn",
1242
+ "label": "Break-glass use alerts",
1243
+ "x": 1040,
1244
+ "y": 1560,
1245
+ "characteristic": "security",
1246
+ "scope": "atomic",
1247
+ "cadence": "continual",
1248
+ "invocation": "automated",
1249
+ "description": "An EventBridge rule matches console sign-ins by the break-glass user from CloudTrail and sends them to the paging topic; a quarterly drill signs in with the account in a non-production environment and times the page. The same scheduled job that counts administrators compares the account's password_last_used with its password last changed date.\n\nThreshold: A sign-in with the break-glass account raises a page to the security owner within 5 minutes; the credential's last rotation is at most 24 hours after its last use\n\nTool: Terraform (aws_cloudwatch_event_rule on CloudTrail sign-in events, SNS to the pager); on Azure: an Entra ID sign-in log alert rule for the account; on Google Cloud: a log-based alert on the service account\n\n```hcl\nresource \"aws_cloudwatch_event_rule\" \"break_glass_used\" {\n name = \"break-glass-used\"\n description = \"ADR Just-in-time privileged access: page on any use of the sealed account\"\n event_pattern = jsonencode({\n source = [\"aws.signin\"]\n \"detail-type\" = [\"AWS Console Sign In via CloudTrail\"]\n detail = {\n eventName = [\"ConsoleLogin\"]\n userIdentity = { userName = [var.break_glass_user_name] }\n }\n })\n}\n\nresource \"aws_cloudwatch_event_target\" \"break_glass_page\" {\n rule = aws_cloudwatch_event_rule.break_glass_used.name\n arn = var.security_pager_topic_arn # SNS topic wired to the on-call tool\n}\n```",
1250
+ "hubWhen": {
1251
+ "ADMIN": [
1252
+ "jit"
1253
+ ]
1254
+ }
1255
+ },
1256
+ {
1257
+ "id": "ff-admin-list",
1258
+ "type": "fitness-fn",
1259
+ "label": "Admins few and strong",
1260
+ "x": 1040,
1261
+ "y": 1690,
1262
+ "characteristic": "security",
1263
+ "scope": "atomic",
1264
+ "cadence": "triggered",
1265
+ "trigger": "nightly",
1266
+ "invocation": "automated",
1267
+ "description": "A scheduled query counts the people with administrator rights and lists those without a FIDO security key among their MFA devices (serial numbers of security keys are :u2f/ ARNs); the job fails above 5 accounts or on any without one. A passkey registered as a FIDO key appears the same way; a virtual MFA device does not count.\n\nThreshold: At most 5 administrator accounts, 0 of them without a FIDO security key registered\n\nTool: Steampipe (AWS plugin), in a scheduled CI job; for Azure: azuread_user with authentication methods, for Google Workspace: the users report with isEnforcedIn2Sv and security keys\n\n```sql\nselect\n count(*) as admins,\n count(*) filter (where not exists (\n select 1 from jsonb_array_elements(coalesce(mfa_devices, '[]'::jsonb)) d\n where d ->> 'SerialNumber' like '%:u2f/%'\n )) as without_security_key\nfrom aws_iam_user\nwhere attached_policy_arns ? 'arn:aws:iam::aws:policy/AdministratorAccess';\n-- the job fails when admins > 5 or without_security_key > 0\n```",
1268
+ "hubWhen": {
1269
+ "ADMIN": [
1270
+ "standing"
1271
+ ]
1272
+ }
1273
+ },
1274
+ {
1275
+ "id": "ff-audit-immutable",
1276
+ "type": "fitness-fn",
1277
+ "label": "Audit log cannot be changed",
1278
+ "x": 1040,
1279
+ "y": 1820,
1280
+ "characteristic": "security",
1281
+ "scope": "atomic",
1282
+ "cadence": "triggered",
1283
+ "trigger": "pull-request",
1284
+ "invocation": "automated",
1285
+ "description": "A policy over the Terraform plan in CI fails when the CloudTrail trail has no log file validation, or its bucket has no Object Lock configuration in compliance mode with a default retention (in days or years) of at least 365 days, so that no administrator can delete or edit an entry within the retention. 365 days is only a floor: the retention itself is the one the Audit trail pack decides, and the bucket is set to it.\n\nThreshold: The CloudTrail trail has log file validation on and writes to a bucket with Object Lock in compliance mode for at least 365 days, a floor below the audit trail's retention; 0 trails without both\n\nTool: Conftest on the Terraform plan (AWS form; on Azure check the storage account's immutability policy, on Google Cloud the bucket's retention policy with locked = true)\n\n```rego\npackage main\n\nimport rego.v1\n\ntrails := [r | some r in input.resource_changes; r.type == \"aws_cloudtrail\"]\nlocks := [r | some r in input.resource_changes; r.type == \"aws_s3_bucket_object_lock_configuration\"]\n\ndeny contains \"no CloudTrail trail in the plan\" if count(trails) == 0\n\ndeny contains msg if {\n\tsome t in trails\n\tnot t.change.after.enable_log_file_validation\n\tmsg := sprintf(\"%s has no log file validation\", [t.address])\n}\n\ndeny contains \"no Object Lock configuration on the audit bucket\" if count(locks) == 0\n\ndeny contains msg if {\n\tsome l in locks\n\tsome rule in l.change.after.rule\n\tsome retention in rule.default_retention\n\tnot retention.mode == \"COMPLIANCE\"\n\tmsg := sprintf(\"%s is not in compliance mode\", [l.address])\n}\n\ndeny contains msg if {\n\tsome l in locks\n\tsome rule in l.change.after.rule\n\tsome retention in rule.default_retention\n\tnumber_or_zero(retention.years) * 365 + number_or_zero(retention.days) < 365\n\tmsg := sprintf(\"%s keeps the audit log for fewer than 365 days, the floor below the audit trail's retention\", [l.address])\n}\n\nnumber_or_zero(x) := x if is_number(x)\n\nnumber_or_zero(x) := 0 if not is_number(x)\n```",
1286
+ "hubWhen": {
1287
+ "ADMIN": [
1288
+ "jit",
1289
+ "standing"
1290
+ ]
1291
+ }
1292
+ },
1293
+ {
1294
+ "id": "ff-no-data-access",
1295
+ "type": "fitness-fn",
1296
+ "label": "No person reaches data",
1297
+ "x": 1040,
1298
+ "y": 1950,
1299
+ "characteristic": "security",
1300
+ "scope": "atomic",
1301
+ "cadence": "triggered",
1302
+ "trigger": "pull-request",
1303
+ "invocation": "automated",
1304
+ "description": "A policy runs over every Terraform plan in CI and refuses a change that gives a user or group data-store actions or a wildcard inline, or attaches an administrator or data-store managed policy to a user or group; service roles are not touched.\n\nThreshold: 0 infrastructure changes that give a person access to a production data store\n\nTool: Conftest on the Terraform plan (AWS form; for Azure check azurerm_role_assignment with a user principal, for Google Cloud google_project_iam_member with user: or group: members)\n\n```rego\npackage main\n\nimport rego.v1\n\nhuman_inline := {\"aws_iam_user_policy\", \"aws_iam_group_policy\"}\nhuman_attachment := {\"aws_iam_user_policy_attachment\", \"aws_iam_group_policy_attachment\"}\ndata_policies := {\n\t\"arn:aws:iam::aws:policy/AdministratorAccess\", \"arn:aws:iam::aws:policy/PowerUserAccess\",\n\t\"arn:aws:iam::aws:policy/AmazonRDSFullAccess\", \"arn:aws:iam::aws:policy/AmazonS3FullAccess\",\n\t\"arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess\", \"arn:aws:iam::aws:policy/SecretsManagerReadWrite\",\n}\n\ndeny contains msg if {\n\tsome r in input.resource_changes\n\thuman_inline[r.type]\n\tsome s in json.unmarshal(r.change.after.policy).Statement\n\tsome a in actions(s)\n\tregex.match(\"^(\\\\*|rds[a-z-]*:|dynamodb:|s3:|secretsmanager:)\", a)\n\tmsg := sprintf(\"%s gives a person direct access to production data (%s)\", [r.address, a])\n}\n\ndeny contains msg if {\n\tsome r in input.resource_changes\n\thuman_attachment[r.type]\n\tdata_policies[r.change.after.policy_arn]\n\tmsg := sprintf(\"%s attaches %s to a person or group\", [r.address, r.change.after.policy_arn])\n}\n\ndeny contains msg if {\n\tsome r in input.resource_changes\n\tr.type == \"aws_iam_policy_attachment\"\n\tcount(array.concat(object.get(r.change.after, \"users\", []), object.get(r.change.after, \"groups\", []))) > 0\n\tmsg := sprintf(\"%s attaches a policy to users or groups\", [r.address])\n}\n\nactions(s) := s.Action if is_array(s.Action)\n\nactions(s) := [s.Action] if is_string(s.Action)\n```",
1305
+ "hubWhen": {
1306
+ "ADMIN": [
1307
+ "none"
1308
+ ]
1309
+ }
1310
+ },
1311
+ {
1312
+ "id": "ff-flat",
1313
+ "type": "fitness-fn",
1314
+ "label": "No permission checks creep in",
1315
+ "x": 1040,
1316
+ "y": 2080,
1317
+ "characteristic": "security",
1318
+ "scope": "atomic",
1319
+ "cadence": "triggered",
1320
+ "trigger": "pull-request",
1321
+ "invocation": "automated",
1322
+ "description": "A dependency rule fails the build when the code imports an authorization library, which would mean a restricted feature arrived without its decision.\n\nThreshold: 0 imports of an authorization library or role check in the application code\n\nTool: dependency-cruiser (or the equivalent for your stack: ArchUnit, NetArchTest, a RuboCop custom cop)\n\n```js\n// .dependency-cruiser.cjs\nmodule.exports = {\n forbidden: [{\n name: 'no-authorization',\n comment: 'ADR One level of access: supersede it before adding permissions',\n severity: 'error',\n from: {},\n to: { path: 'node_modules/(@casl/|casbin|accesscontrol|@openfga/|@permitio/|@cerbos/)' },\n }],\n}\n```",
1323
+ "hubWhen": {
1324
+ "MODEL": [
1325
+ "flat"
1326
+ ]
1327
+ }
1328
+ }
1329
+ ],
1330
+ "relations": [
1331
+ {
1332
+ "id": "req-deny--derives--need",
1333
+ "sourceId": "req-deny",
1334
+ "targetId": "need",
1335
+ "relationType": "derives"
1336
+ },
1337
+ {
1338
+ "id": "req-default-deny--derives--need",
1339
+ "sourceId": "req-default-deny",
1340
+ "targetId": "need",
1341
+ "relationType": "derives"
1342
+ },
1343
+ {
1344
+ "id": "req-object--derives--need",
1345
+ "sourceId": "req-object",
1346
+ "targetId": "need",
1347
+ "relationType": "derives"
1348
+ },
1349
+ {
1350
+ "id": "req-sod--derives--need",
1351
+ "sourceId": "req-sod",
1352
+ "targetId": "need",
1353
+ "relationType": "derives"
1354
+ },
1355
+ {
1356
+ "id": "req-relation-revoke--derives--need",
1357
+ "sourceId": "req-relation-revoke",
1358
+ "targetId": "need",
1359
+ "relationType": "derives"
1360
+ },
1361
+ {
1362
+ "id": "req-attributes--derives--need",
1363
+ "sourceId": "req-attributes",
1364
+ "targetId": "need",
1365
+ "relationType": "derives"
1366
+ },
1367
+ {
1368
+ "id": "req-pdp-down--derives--need",
1369
+ "sourceId": "req-pdp-down",
1370
+ "targetId": "need",
1371
+ "relationType": "derives"
1372
+ },
1373
+ {
1374
+ "id": "req-policy-release--derives--need",
1375
+ "sourceId": "req-policy-release",
1376
+ "targetId": "need",
1377
+ "relationType": "derives"
1378
+ },
1379
+ {
1380
+ "id": "req-review--derives--need",
1381
+ "sourceId": "req-review",
1382
+ "targetId": "need",
1383
+ "relationType": "derives"
1384
+ },
1385
+ {
1386
+ "id": "req-leaver--derives--need",
1387
+ "sourceId": "req-leaver",
1388
+ "targetId": "need",
1389
+ "relationType": "derives"
1390
+ },
1391
+ {
1392
+ "id": "req-directory--derives--need",
1393
+ "sourceId": "req-directory",
1394
+ "targetId": "need",
1395
+ "relationType": "derives"
1396
+ },
1397
+ {
1398
+ "id": "req-elevation--derives--need",
1399
+ "sourceId": "req-elevation",
1400
+ "targetId": "need",
1401
+ "relationType": "derives"
1402
+ },
1403
+ {
1404
+ "id": "req-break-glass--derives--need",
1405
+ "sourceId": "req-break-glass",
1406
+ "targetId": "need",
1407
+ "relationType": "derives"
1408
+ },
1409
+ {
1410
+ "id": "req-named-admins--derives--need",
1411
+ "sourceId": "req-named-admins",
1412
+ "targetId": "need",
1413
+ "relationType": "derives"
1414
+ },
1415
+ {
1416
+ "id": "req-admin-audit--derives--need",
1417
+ "sourceId": "req-admin-audit",
1418
+ "targetId": "need",
1419
+ "relationType": "derives"
1420
+ },
1421
+ {
1422
+ "id": "req-no-direct--derives--need",
1423
+ "sourceId": "req-no-direct",
1424
+ "targetId": "need",
1425
+ "relationType": "derives"
1426
+ },
1427
+ {
1428
+ "id": "req-flat--derives--need",
1429
+ "sourceId": "req-flat",
1430
+ "targetId": "need",
1431
+ "relationType": "derives"
1432
+ },
1433
+ {
1434
+ "id": "sc-deny--verifies--req-deny",
1435
+ "sourceId": "sc-deny",
1436
+ "targetId": "req-deny",
1437
+ "relationType": "verifies"
1438
+ },
1439
+ {
1440
+ "id": "sc-default-deny--verifies--req-default-deny",
1441
+ "sourceId": "sc-default-deny",
1442
+ "targetId": "req-default-deny",
1443
+ "relationType": "verifies"
1444
+ },
1445
+ {
1446
+ "id": "sc-object--verifies--req-object",
1447
+ "sourceId": "sc-object",
1448
+ "targetId": "req-object",
1449
+ "relationType": "verifies"
1450
+ },
1451
+ {
1452
+ "id": "sc-sod--verifies--req-sod",
1453
+ "sourceId": "sc-sod",
1454
+ "targetId": "req-sod",
1455
+ "relationType": "verifies"
1456
+ },
1457
+ {
1458
+ "id": "sc-relation-revoke--verifies--req-relation-revoke",
1459
+ "sourceId": "sc-relation-revoke",
1460
+ "targetId": "req-relation-revoke",
1461
+ "relationType": "verifies"
1462
+ },
1463
+ {
1464
+ "id": "sc-attributes--verifies--req-attributes",
1465
+ "sourceId": "sc-attributes",
1466
+ "targetId": "req-attributes",
1467
+ "relationType": "verifies"
1468
+ },
1469
+ {
1470
+ "id": "sc-pdp-down--verifies--req-pdp-down",
1471
+ "sourceId": "sc-pdp-down",
1472
+ "targetId": "req-pdp-down",
1473
+ "relationType": "verifies"
1474
+ },
1475
+ {
1476
+ "id": "sc-policy-release--verifies--req-policy-release",
1477
+ "sourceId": "sc-policy-release",
1478
+ "targetId": "req-policy-release",
1479
+ "relationType": "verifies"
1480
+ },
1481
+ {
1482
+ "id": "sc-review--verifies--req-review",
1483
+ "sourceId": "sc-review",
1484
+ "targetId": "req-review",
1485
+ "relationType": "verifies"
1486
+ },
1487
+ {
1488
+ "id": "sc-leaver--verifies--req-leaver",
1489
+ "sourceId": "sc-leaver",
1490
+ "targetId": "req-leaver",
1491
+ "relationType": "verifies"
1492
+ },
1493
+ {
1494
+ "id": "sc-directory--verifies--req-directory",
1495
+ "sourceId": "sc-directory",
1496
+ "targetId": "req-directory",
1497
+ "relationType": "verifies"
1498
+ },
1499
+ {
1500
+ "id": "sc-elevation--verifies--req-elevation",
1501
+ "sourceId": "sc-elevation",
1502
+ "targetId": "req-elevation",
1503
+ "relationType": "verifies"
1504
+ },
1505
+ {
1506
+ "id": "sc-break-glass--verifies--req-break-glass",
1507
+ "sourceId": "sc-break-glass",
1508
+ "targetId": "req-break-glass",
1509
+ "relationType": "verifies"
1510
+ },
1511
+ {
1512
+ "id": "sc-named-admins--verifies--req-named-admins",
1513
+ "sourceId": "sc-named-admins",
1514
+ "targetId": "req-named-admins",
1515
+ "relationType": "verifies"
1516
+ },
1517
+ {
1518
+ "id": "sc-admin-audit--verifies--req-admin-audit",
1519
+ "sourceId": "sc-admin-audit",
1520
+ "targetId": "req-admin-audit",
1521
+ "relationType": "verifies"
1522
+ },
1523
+ {
1524
+ "id": "sc-no-direct--verifies--req-no-direct",
1525
+ "sourceId": "sc-no-direct",
1526
+ "targetId": "req-no-direct",
1527
+ "relationType": "verifies"
1528
+ },
1529
+ {
1530
+ "id": "sc-flat--verifies--req-flat",
1531
+ "sourceId": "sc-flat",
1532
+ "targetId": "req-flat",
1533
+ "relationType": "verifies"
1534
+ },
1535
+ {
1536
+ "id": "ff-matrix--implements--adr-roles",
1537
+ "sourceId": "ff-matrix",
1538
+ "targetId": "adr-roles",
1539
+ "relationType": "implements"
1540
+ },
1541
+ {
1542
+ "id": "ff-matrix--implements--adr-relations",
1543
+ "sourceId": "ff-matrix",
1544
+ "targetId": "adr-relations",
1545
+ "relationType": "implements"
1546
+ },
1547
+ {
1548
+ "id": "ff-matrix--implements--adr-attributes",
1549
+ "sourceId": "ff-matrix",
1550
+ "targetId": "adr-attributes",
1551
+ "relationType": "implements"
1552
+ },
1553
+ {
1554
+ "id": "ff-matrix--implements--adr-in-code",
1555
+ "sourceId": "ff-matrix",
1556
+ "targetId": "adr-in-code",
1557
+ "relationType": "implements"
1558
+ },
1559
+ {
1560
+ "id": "ff-matrix--implements--adr-engine",
1561
+ "sourceId": "ff-matrix",
1562
+ "targetId": "adr-engine",
1563
+ "relationType": "implements"
1564
+ },
1565
+ {
1566
+ "id": "ff-route-guard--implements--adr-in-code",
1567
+ "sourceId": "ff-route-guard",
1568
+ "targetId": "adr-in-code",
1569
+ "relationType": "implements"
1570
+ },
1571
+ {
1572
+ "id": "ff-policy-tests--implements--adr-engine",
1573
+ "sourceId": "ff-policy-tests",
1574
+ "targetId": "adr-engine",
1575
+ "relationType": "implements"
1576
+ },
1577
+ {
1578
+ "id": "ff-policy-tests--implements--adr-roles",
1579
+ "sourceId": "ff-policy-tests",
1580
+ "targetId": "adr-roles",
1581
+ "relationType": "implements"
1582
+ },
1583
+ {
1584
+ "id": "ff-policy-tests--implements--adr-attributes",
1585
+ "sourceId": "ff-policy-tests",
1586
+ "targetId": "adr-attributes",
1587
+ "relationType": "implements"
1588
+ },
1589
+ {
1590
+ "id": "ff-policy-rollout--implements--adr-engine",
1591
+ "sourceId": "ff-policy-rollout",
1592
+ "targetId": "adr-engine",
1593
+ "relationType": "implements"
1594
+ },
1595
+ {
1596
+ "id": "ff-relation-tests--implements--adr-engine",
1597
+ "sourceId": "ff-relation-tests",
1598
+ "targetId": "adr-engine",
1599
+ "relationType": "implements"
1600
+ },
1601
+ {
1602
+ "id": "ff-relation-tests--implements--adr-relations",
1603
+ "sourceId": "ff-relation-tests",
1604
+ "targetId": "adr-relations",
1605
+ "relationType": "implements"
1606
+ },
1607
+ {
1608
+ "id": "ff-sod--implements--adr-roles",
1609
+ "sourceId": "ff-sod",
1610
+ "targetId": "adr-roles",
1611
+ "relationType": "implements"
1612
+ },
1613
+ {
1614
+ "id": "ff-unshare--implements--adr-relations",
1615
+ "sourceId": "ff-unshare",
1616
+ "targetId": "adr-relations",
1617
+ "relationType": "implements"
1618
+ },
1619
+ {
1620
+ "id": "ff-missing-attribute--implements--adr-attributes",
1621
+ "sourceId": "ff-missing-attribute",
1622
+ "targetId": "adr-attributes",
1623
+ "relationType": "implements"
1624
+ },
1625
+ {
1626
+ "id": "ff-fail-closed--implements--adr-engine",
1627
+ "sourceId": "ff-fail-closed",
1628
+ "targetId": "adr-engine",
1629
+ "relationType": "implements"
1630
+ },
1631
+ {
1632
+ "id": "ff-stale-grants--implements--adr-review-periodic",
1633
+ "sourceId": "ff-stale-grants",
1634
+ "targetId": "adr-review-periodic",
1635
+ "relationType": "implements"
1636
+ },
1637
+ {
1638
+ "id": "ff-directory-sync--implements--adr-review-directory",
1639
+ "sourceId": "ff-directory-sync",
1640
+ "targetId": "adr-review-directory",
1641
+ "relationType": "implements"
1642
+ },
1643
+ {
1644
+ "id": "ff-standing-admins--implements--adr-jit",
1645
+ "sourceId": "ff-standing-admins",
1646
+ "targetId": "adr-jit",
1647
+ "relationType": "implements"
1648
+ },
1649
+ {
1650
+ "id": "ff-break-glass--implements--adr-jit",
1651
+ "sourceId": "ff-break-glass",
1652
+ "targetId": "adr-jit",
1653
+ "relationType": "implements"
1654
+ },
1655
+ {
1656
+ "id": "ff-admin-list--implements--adr-standing",
1657
+ "sourceId": "ff-admin-list",
1658
+ "targetId": "adr-standing",
1659
+ "relationType": "implements"
1660
+ },
1661
+ {
1662
+ "id": "ff-audit-immutable--implements--adr-jit",
1663
+ "sourceId": "ff-audit-immutable",
1664
+ "targetId": "adr-jit",
1665
+ "relationType": "implements"
1666
+ },
1667
+ {
1668
+ "id": "ff-audit-immutable--implements--adr-standing",
1669
+ "sourceId": "ff-audit-immutable",
1670
+ "targetId": "adr-standing",
1671
+ "relationType": "implements"
1672
+ },
1673
+ {
1674
+ "id": "ff-no-data-access--implements--adr-no-direct",
1675
+ "sourceId": "ff-no-data-access",
1676
+ "targetId": "adr-no-direct",
1677
+ "relationType": "implements"
1678
+ },
1679
+ {
1680
+ "id": "ff-flat--implements--adr-flat",
1681
+ "sourceId": "ff-flat",
1682
+ "targetId": "adr-flat",
1683
+ "relationType": "implements"
1684
+ }
1685
+ ]
1686
+ }