@agent-ix/spec-objects-security 0.5.0 → 0.9.0

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 (76) hide show
  1. package/README.md +2 -0
  2. package/manifest.yaml +247 -26
  3. package/package.json +8 -2
  4. package/schemas/Asset.json +78 -0
  5. package/schemas/AttackSurface.json +55 -0
  6. package/schemas/AuditEvent.json +57 -0
  7. package/schemas/AuditFinding.json +67 -0
  8. package/schemas/AuthFlow.json +69 -0
  9. package/schemas/ConfidentialityLevel.json +13 -0
  10. package/schemas/Control.json +83 -0
  11. package/schemas/ControlEffectiveness.json +12 -0
  12. package/schemas/ControlMapping.json +26 -0
  13. package/schemas/CorsPolicy.json +46 -0
  14. package/schemas/CsrfToken.json +46 -0
  15. package/schemas/DataClassification.json +61 -0
  16. package/schemas/DefaultedField.json +14 -0
  17. package/schemas/EffectivenessField.json +15 -0
  18. package/schemas/EncryptionKey.json +78 -0
  19. package/schemas/FindingStatus.json +14 -0
  20. package/schemas/FlowStep.json +24 -0
  21. package/schemas/IdentityField.json +15 -0
  22. package/schemas/Impact.json +14 -0
  23. package/schemas/ImpactField.json +15 -0
  24. package/schemas/JwtClaim.json +49 -0
  25. package/schemas/LevelField.json +15 -0
  26. package/schemas/Likelihood.json +14 -0
  27. package/schemas/LikelihoodField.json +15 -0
  28. package/schemas/MfaFactorKind.json +12 -0
  29. package/schemas/MfaMethod.json +69 -0
  30. package/schemas/OccurrenceField.json +14 -0
  31. package/schemas/OccurrenceTypeRef.json +15 -0
  32. package/schemas/PasswordPolicy.json +40 -0
  33. package/schemas/Permission.json +49 -0
  34. package/schemas/Policy.json +52 -0
  35. package/schemas/Risk.json +79 -0
  36. package/schemas/Role.json +55 -0
  37. package/schemas/Scope.json +49 -0
  38. package/schemas/Secret.json +78 -0
  39. package/schemas/SecretLifecycle.json +14 -0
  40. package/schemas/SessionConfig.json +43 -0
  41. package/schemas/Severity.json +14 -0
  42. package/schemas/SeverityField.json +15 -0
  43. package/schemas/StatusField.json +15 -0
  44. package/schemas/StrideCategory.json +15 -0
  45. package/schemas/StrideCategoryField.json +15 -0
  46. package/schemas/Threat.json +67 -0
  47. package/schemas/TrustBoundary.json +69 -0
  48. package/schemas/TrustLevel.json +12 -0
  49. package/schemas/TrustLevelField.json +15 -0
  50. package/schemas/Vulnerability.json +70 -0
  51. package/skeletons/asset.md +22 -14
  52. package/skeletons/asset.sysml.md +27 -0
  53. package/skeletons/attack_surface.md +21 -18
  54. package/skeletons/audit_event.md +31 -18
  55. package/skeletons/audit_finding.md +22 -18
  56. package/skeletons/auth_flow.md +56 -21
  57. package/skeletons/control.md +45 -16
  58. package/skeletons/cors_policy.md +33 -17
  59. package/skeletons/csrf_token.md +17 -13
  60. package/skeletons/data_classification.md +23 -18
  61. package/skeletons/encryption_key.md +19 -12
  62. package/skeletons/jwt_claim.md +25 -14
  63. package/skeletons/mfa_method.md +17 -11
  64. package/skeletons/password_policy.md +35 -20
  65. package/skeletons/permission.md +18 -12
  66. package/skeletons/policy.md +33 -17
  67. package/skeletons/risk.md +20 -14
  68. package/skeletons/role.md +20 -13
  69. package/skeletons/scope.md +18 -12
  70. package/skeletons/secret.md +23 -16
  71. package/skeletons/secret.sysml.md +29 -0
  72. package/skeletons/session_config.md +35 -18
  73. package/skeletons/threat.md +22 -11
  74. package/skeletons/threat.sysml.md +26 -0
  75. package/skeletons/trust_boundary.md +51 -16
  76. package/skeletons/vulnerability.md +18 -15
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/Secret.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "fields": {
7
+ "type": "array",
8
+ "items": {
9
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/FieldDecl.json"
10
+ },
11
+ "minItems": 1,
12
+ "contains": {
13
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/IdentityField.json"
14
+ }
15
+ },
16
+ "clauses": {
17
+ "type": "array",
18
+ "items": {
19
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/ClauseRef.json"
20
+ }
21
+ },
22
+ "operations": {
23
+ "type": "array",
24
+ "items": {
25
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/OperationDecl.json"
26
+ }
27
+ },
28
+ "lifecycle": {
29
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/SecretLifecycle.json"
30
+ },
31
+ "material_ref": {
32
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/SemanticId.json"
33
+ },
34
+ "custodian": {
35
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/SemanticId.json"
36
+ },
37
+ "classification": {
38
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/ConfidentialityLevel.json"
39
+ }
40
+ },
41
+ "required": [
42
+ "fields"
43
+ ],
44
+ "unevaluatedProperties": {
45
+ "not": {}
46
+ },
47
+ "description": "A confidential value kept out of code.",
48
+ "allOf": [
49
+ {
50
+ "properties": {
51
+ "fields": {
52
+ "items": {
53
+ "not": {
54
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/DefaultedField.json"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ },
60
+ {
61
+ "properties": {
62
+ "operations": {
63
+ "items": {
64
+ "properties": {
65
+ "params": {
66
+ "items": {
67
+ "not": {
68
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/DefaultedField.json"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ]
78
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/SecretLifecycle.json",
4
+ "type": "string",
5
+ "enum": [
6
+ "proposed",
7
+ "active",
8
+ "rotating",
9
+ "revoked",
10
+ "compromised",
11
+ "unknown"
12
+ ],
13
+ "description": "Where secret material is in its life. `unknown` states that it was not tracked."
14
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/SessionConfig.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "clauses": {
7
+ "type": "array",
8
+ "items": {
9
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/ClauseRef.json"
10
+ },
11
+ "minItems": 1
12
+ },
13
+ "fields": {
14
+ "type": "array",
15
+ "items": {
16
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/FieldDecl.json"
17
+ }
18
+ },
19
+ "binds_flow": {
20
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/SemanticId.json"
21
+ }
22
+ },
23
+ "required": [
24
+ "clauses"
25
+ ],
26
+ "unevaluatedProperties": {
27
+ "not": {}
28
+ },
29
+ "description": "The rules a session obeys. `operations` and `relations` are forbidden by the seal.",
30
+ "allOf": [
31
+ {
32
+ "properties": {
33
+ "fields": {
34
+ "items": {
35
+ "not": {
36
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/DefaultedField.json"
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/Severity.json",
4
+ "type": "string",
5
+ "enum": [
6
+ "none",
7
+ "low",
8
+ "medium",
9
+ "high",
10
+ "critical",
11
+ "unknown"
12
+ ],
13
+ "description": "How bad a vulnerability is. `unknown` states that it was not assessed."
14
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/SeverityField.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "const": "severity"
9
+ }
10
+ },
11
+ "required": [
12
+ "name"
13
+ ],
14
+ "description": "A `FieldDecl` named `severity`."
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/StatusField.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "const": "status"
9
+ }
10
+ },
11
+ "required": [
12
+ "name"
13
+ ],
14
+ "description": "A `FieldDecl` named `status`."
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/StrideCategory.json",
4
+ "type": "string",
5
+ "enum": [
6
+ "spoofing",
7
+ "tampering",
8
+ "repudiation",
9
+ "information_disclosure",
10
+ "denial_of_service",
11
+ "elevation_of_privilege",
12
+ "unknown"
13
+ ],
14
+ "description": "The STRIDE class of a threat. `unknown` states that it was not classified."
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/StrideCategoryField.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "const": "stride_category"
9
+ }
10
+ },
11
+ "required": [
12
+ "name"
13
+ ],
14
+ "description": "A `FieldDecl` named `stride_category`."
15
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/Threat.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "fields": {
7
+ "type": "array",
8
+ "items": {
9
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/FieldDecl.json"
10
+ },
11
+ "minItems": 1,
12
+ "contains": {
13
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/IdentityField.json"
14
+ }
15
+ },
16
+ "clauses": {
17
+ "type": "array",
18
+ "items": {
19
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/ClauseRef.json"
20
+ }
21
+ },
22
+ "relations": {
23
+ "type": "array",
24
+ "items": {
25
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/RelationDecl.json"
26
+ }
27
+ },
28
+ "stride_category": {
29
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/StrideCategory.json"
30
+ },
31
+ "exploits": {
32
+ "type": "array",
33
+ "items": {
34
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/SemanticId.json"
35
+ }
36
+ }
37
+ },
38
+ "required": [
39
+ "fields"
40
+ ],
41
+ "unevaluatedProperties": {
42
+ "not": {}
43
+ },
44
+ "description": "An adversary capability against this system. `operations` is forbidden by the seal.",
45
+ "allOf": [
46
+ {
47
+ "properties": {
48
+ "fields": {
49
+ "contains": {
50
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/StrideCategoryField.json"
51
+ }
52
+ }
53
+ }
54
+ },
55
+ {
56
+ "properties": {
57
+ "fields": {
58
+ "items": {
59
+ "not": {
60
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/DefaultedField.json"
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ]
67
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/TrustBoundary.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "fields": {
7
+ "type": "array",
8
+ "items": {
9
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/FieldDecl.json"
10
+ },
11
+ "minItems": 1,
12
+ "contains": {
13
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/IdentityField.json"
14
+ }
15
+ },
16
+ "clauses": {
17
+ "type": "array",
18
+ "items": {
19
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/ClauseRef.json"
20
+ },
21
+ "minItems": 1
22
+ },
23
+ "relations": {
24
+ "type": "array",
25
+ "items": {
26
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/RelationDecl.json"
27
+ }
28
+ },
29
+ "trust_level": {
30
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/TrustLevel.json"
31
+ },
32
+ "crosses": {
33
+ "type": "array",
34
+ "items": {
35
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/SemanticId.json"
36
+ }
37
+ }
38
+ },
39
+ "required": [
40
+ "fields",
41
+ "clauses"
42
+ ],
43
+ "unevaluatedProperties": {
44
+ "not": {}
45
+ },
46
+ "description": "A zone edge. `clauses` is required: a boundary that admits every crossing is\nnot a boundary. `operations` is forbidden by the seal.",
47
+ "allOf": [
48
+ {
49
+ "properties": {
50
+ "fields": {
51
+ "contains": {
52
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/TrustLevelField.json"
53
+ }
54
+ }
55
+ }
56
+ },
57
+ {
58
+ "properties": {
59
+ "fields": {
60
+ "items": {
61
+ "not": {
62
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/DefaultedField.json"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ ]
69
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/TrustLevel.json",
4
+ "type": "string",
5
+ "enum": [
6
+ "untrusted",
7
+ "semi_trusted",
8
+ "trusted",
9
+ "unknown"
10
+ ],
11
+ "description": "How far a zone is trusted. `untrusted` is the unassessed member, because the\nleast-granting reading of \"we never decided\" is \"we do not trust it\"."
12
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/TrustLevelField.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "const": "trust_level"
9
+ }
10
+ },
11
+ "required": [
12
+ "name"
13
+ ],
14
+ "description": "A `FieldDecl` named `trust_level`."
15
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/Vulnerability.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "fields": {
7
+ "type": "array",
8
+ "items": {
9
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/FieldDecl.json"
10
+ },
11
+ "minItems": 1,
12
+ "contains": {
13
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/IdentityField.json"
14
+ }
15
+ },
16
+ "clauses": {
17
+ "type": "array",
18
+ "items": {
19
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/ClauseRef.json"
20
+ }
21
+ },
22
+ "relations": {
23
+ "type": "array",
24
+ "items": {
25
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/RelationDecl.json"
26
+ }
27
+ },
28
+ "severity": {
29
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/Severity.json"
30
+ },
31
+ "cve_id": {
32
+ "type": "string"
33
+ },
34
+ "affects": {
35
+ "type": "array",
36
+ "items": {
37
+ "$ref": "https://schemas.agent-ix.org/semantic-core/0.3.0/SemanticId.json"
38
+ }
39
+ }
40
+ },
41
+ "required": [
42
+ "fields"
43
+ ],
44
+ "unevaluatedProperties": {
45
+ "not": {}
46
+ },
47
+ "description": "A weakness an implementation carries. `operations` is forbidden by the seal.",
48
+ "allOf": [
49
+ {
50
+ "properties": {
51
+ "fields": {
52
+ "contains": {
53
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/SeverityField.json"
54
+ }
55
+ }
56
+ }
57
+ },
58
+ {
59
+ "properties": {
60
+ "fields": {
61
+ "items": {
62
+ "not": {
63
+ "$ref": "https://schemas.agent-ix.org/agent-ix/spec-objects-security/DefaultedField.json"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ ]
70
+ }
@@ -1,22 +1,30 @@
1
1
  ---
2
2
  id: ASSET-001
3
- title: "Session store"
3
+ title: "TenantDatabase"
4
4
  type: asset
5
+ object: asset
5
6
  ---
6
- <!-- asset authoring skeleton (spec-objects-security). Fill every part with
7
+ <!-- asset authoring skeleton (spec-objects-security). Fill every section with
7
8
  substantive content. Contract (manifest body_extraction asserts):
8
- - Frontmatter MUST carry id, title, type (type: asset).
9
- - A "Description" section MUST describe the asset and why it matters. -->
10
- # [ASSET-001] Session store
11
-
12
- Redis cluster holding all active Atlas web sessions and CSRF token state.
9
+ - Frontmatter MUST carry id, title, type: asset, object: asset.
10
+ - "## Description" (H2, required): what the asset is and why it matters.
11
+ - "## Properties" (H2): one typed row per attribute, header exactly
12
+ `Field | Type | Multiplicity | Constraints`. At least one row carries
13
+ the `identity` constraint (Asset.json refuses a record without one). -->
14
+ # [ASSET-001] TenantDatabase
13
15
 
14
16
  ## Description
15
17
 
16
- The session store is the authority for who is currently authenticated:
17
- compromise yields the ability to mint or hijack any active session across all
18
- tenants, bypassing AUTHFLOW-001 entirely. It runs in the trusted private
19
- subnet behind BOUND-001, accepts only mTLS connections from the auth service,
20
- and persists nothing to disk (RDB/AOF disabled) so session identifiers never
21
- reach backup media. Data it holds is classified Confidential (CLASS-001
22
- handling applies to the embedded user identifiers).
18
+ The per-tenant PostgreSQL database holding customer records, order history and
19
+ audit trails. It is the primary confidentiality and integrity asset of the
20
+ platform: its compromise discloses every tenant's data at once.
21
+
22
+ ## Properties
23
+
24
+ | Field | Type | Multiplicity | Constraints |
25
+ |---|---|---|---|
26
+ | asset_id | UUID | 1..1 | identity |
27
+ | name | String | 1..1 | minLength: 1, maxLength: 128 |
28
+ | classification | DataRestricted | 1..1 | |
29
+ | steward | String | 1..1 | minLength: 1 |
30
+ | replica_count | Integer | 0..1 | min: 0 |
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: ASSET-001
3
+ title: "TenantDatabase"
4
+ type: asset
5
+ object: asset
6
+ ---
7
+ <!-- asset authoring skeleton, alternate Properties form. Declares exactly the
8
+ same fields as asset.md, authored as one ```sysml``` fence instead of the
9
+ typed table (FR-005-AC-2). One artifact carries one form; the alternate is
10
+ a separate file, never a second block in the same artifact. -->
11
+ # [ASSET-001] TenantDatabase
12
+
13
+ ## Description
14
+
15
+ The per-tenant PostgreSQL database holding customer records, order history and
16
+ audit trails. It is the primary confidentiality and integrity asset of the
17
+ platform: its compromise discloses every tenant's data at once.
18
+
19
+ ## Properties
20
+
21
+ ```sysml
22
+ attribute asset_id : UUID[1..1] { identity }
23
+ attribute name : String[1..1] { minLength: 1, maxLength: 128 }
24
+ ref item classification : DataRestricted[1..1]
25
+ attribute steward : String[1..1] { minLength: 1 }
26
+ attribute replica_count : Integer[0..1] { min: 0 }
27
+ ```
@@ -1,25 +1,28 @@
1
1
  ---
2
2
  id: SURF-001
3
- title: "Atlas authentication attack surface"
3
+ title: "PublicTokenEndpoint"
4
4
  type: attack_surface
5
+ object: attack_surface
5
6
  ---
6
- <!-- attack_surface authoring skeleton (spec-objects-security). Fill every part
7
- with substantive content. Contract (manifest body_extraction asserts):
8
- - Frontmatter MUST carry id, title, type (type:
9
- attack_surface).
10
- - An "Entry Points" section MUST enumerate the externally reachable
11
- entry points. -->
12
- # [SURF-001] Atlas authentication attack surface
13
-
14
- Internet-reachable surface of the Atlas authentication subsystem, reviewed
15
- whenever a new route crosses BOUND-001 outward.
7
+ <!-- attack_surface authoring skeleton (spec-objects-security). Fill every section with
8
+ substantive content. Contract (manifest body_extraction asserts):
9
+ - Frontmatter MUST carry id, title, type: attack_surface,
10
+ object: attack_surface.
11
+ - "## Entry Points" (H2, required): the reachable entry points.
12
+ - "## Properties" (H2): the typed declaration. -->
13
+ # [SURF-001] PublicTokenEndpoint
16
14
 
17
15
  ## Entry Points
18
16
 
19
- - `GET /login`, `GET /callback` — browser OIDC endpoints (AUTHFLOW-001)
20
- - `POST /api/token` — public API token exchange for integrations (SCOPE-001)
21
- - `POST /auth/local` — break-glass local login, gated by PASSPOL-001 and
22
- MFA-001
23
- - `POST /webhooks/idp` — IdP back-channel logout receiver, HMAC-verified
24
- - Session cookie and `X-Atlas-CSRF` header parsing in the gateway middleware
25
- (CSRF-001), reachable from any authenticated page
17
+ - `POST /oauth/token` — authorization-code and refresh-token grants.
18
+ - `POST /oauth/revoke` — grant-family revocation.
19
+ - `GET /.well-known/openid-configuration` — unauthenticated metadata.
20
+
21
+ ## Properties
22
+
23
+ | Field | Type | Multiplicity | Constraints |
24
+ |---|---|---|---|
25
+ | surface_id | UUID | 1..1 | identity |
26
+ | transport | String | 1..1 | minLength: 1 |
27
+ | internet_reachable | Boolean | 1..1 | |
28
+ | rate_limit_per_minute | Integer | 0..1 | min: 1 |
@@ -1,34 +1,47 @@
1
1
  ---
2
2
  id: AUDIT-001
3
- title: "user.login.succeeded audit event"
3
+ title: "TokenReuseDetected"
4
4
  type: audit_event
5
+ object: audit_event
5
6
  ---
6
- <!-- audit_event authoring skeleton (spec-objects-security). Fill every part
7
- with substantive content. Contract (manifest body_extraction asserts):
8
- - Frontmatter MUST carry id, title, type (type:
9
- audit_event).
10
- - An "Event Schema" section MUST carry a ```json code block with the
11
- event's payload schema. -->
12
- # [AUDIT-001] user.login.succeeded audit event
7
+ <!-- audit_event authoring skeleton (spec-objects-security). Fill every section with
8
+ substantive content. Contract (manifest body_extraction asserts):
9
+ - Frontmatter MUST carry id, title, type: audit_event,
10
+ object: audit_event.
11
+ - "## Properties" (H2): the declared payload as typed rows. An audit
12
+ event declaration carries NO identity field (occurrence identity
13
+ belongs to the runtime record) and at least one `Timestamp`
14
+ occurrence field; no row carries a default.
15
+ - "## Event Schema" (H2, required) holds a fenced `json` block. It is a
16
+ derived, human-facing view; the typed table is the authority. -->
17
+ # [AUDIT-001] TokenReuseDetected
13
18
 
14
- Emitted by the auth service when AUTHFLOW-001 completes and a session is
15
- established. Appended to the tenant's immutable audit stream and queryable by
16
- ROLE-001 (Tenant Auditor) holders.
19
+ TokenReuseDetected is emitted when an already-rotated refresh token is
20
+ presented. The whole grant family is revoked and the session terminated.
21
+
22
+ ## Properties
23
+
24
+ | Field | Type | Multiplicity | Constraints |
25
+ |---|---|---|---|
26
+ | occurred_at | Timestamp | 1..1 | |
27
+ | actor_reference | String | 1..1 | minLength: 1 |
28
+ | grant_family_reference | String | 1..1 | minLength: 1 |
29
+ | source_address | String | 0..1 | minLength: 1 |
17
30
 
18
31
  ## Event Schema
19
32
 
20
33
  ```json
21
34
  {
35
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
36
+ "$id": "https://specs.agent-ix.dev/audit/token-reuse-detected.schema.json",
37
+ "title": "TokenReuseDetected",
22
38
  "type": "object",
23
- "required": ["event", "occurred_at", "tenant_id", "user_id", "source_ip"],
39
+ "required": ["occurred_at", "actor_reference", "grant_family_reference"],
24
40
  "properties": {
25
- "event": { "const": "user.login.succeeded" },
26
41
  "occurred_at": { "type": "string", "format": "date-time" },
27
- "tenant_id": { "type": "string", "format": "uuid" },
28
- "user_id": { "type": "string", "format": "uuid" },
29
- "source_ip": { "type": "string" },
30
- "idp_issuer": { "type": "string", "format": "uri" },
31
- "mfa_method": { "type": "string", "enum": ["totp", "webauthn", "none"] }
42
+ "actor_reference": { "type": "string", "minLength": 1 },
43
+ "grant_family_reference": { "type": "string", "minLength": 1 },
44
+ "source_address": { "type": "string", "minLength": 1 }
32
45
  }
33
46
  }
34
47
  ```