@openauditmodel/cli 0.3.0 → 0.4.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 (30) hide show
  1. package/README.md +62 -6
  2. package/dist/conformance/src/cli.js +113 -6
  3. package/dist/conformance/src/cli.js.map +1 -1
  4. package/dist/conformance/src/privacy/types.d.ts +19 -0
  5. package/dist/conformance/src/privacy/types.js +8 -0
  6. package/dist/conformance/src/privacy/types.js.map +1 -1
  7. package/dist/conformance/src/profiles/coverage.d.ts +62 -0
  8. package/dist/conformance/src/profiles/coverage.js +114 -0
  9. package/dist/conformance/src/profiles/coverage.js.map +1 -0
  10. package/package.json +7 -2
  11. package/profiles/README.md +42 -0
  12. package/profiles/api-and-integration-management/0.1/profile.json +258 -0
  13. package/profiles/backup-and-recovery/0.1/profile.json +178 -0
  14. package/profiles/customer-and-account-management/0.1/profile.json +237 -0
  15. package/profiles/deployment-and-change-management/0.1/profile.json +298 -0
  16. package/profiles/document-management/0.1/profile.json +170 -0
  17. package/profiles/financial-transaction-management/0.1/profile.json +247 -0
  18. package/profiles/identity-and-access-management/0.1/profile.json +120 -0
  19. package/profiles/incident-management/0.1/profile.json +256 -0
  20. package/profiles/incident-management/0.2/profile.json +287 -0
  21. package/profiles/incident-management/README.md +39 -21
  22. package/profiles/incident-management/profile.json +37 -6
  23. package/profiles/message-broker-management/0.1/profile.json +399 -0
  24. package/profiles/secrets-and-key-management/0.1/profile.json +219 -0
  25. package/semantic-conventions/README.md +15 -10
  26. package/semantic-conventions/backup-and-recovery.md +124 -0
  27. package/semantic-conventions/customer-and-account.md +133 -0
  28. package/semantic-conventions/financial-transactions.md +128 -0
  29. package/semantic-conventions/message-brokers.md +128 -0
  30. package/semantic-conventions/secrets-and-keys.md +132 -0
@@ -0,0 +1,128 @@
1
+ # Message Broker Events
2
+
3
+ **Specification version: 0.1 · Status: Experimental**
4
+
5
+ Category: `data-infrastructure`
6
+
7
+ ## 1. Recommended event names
8
+
9
+ These names cover the **control plane** of a message broker: the operations that change what the
10
+ broker is, who may use it and what consumers will see. The data plane is out of scope — see §2.
11
+
12
+ ### Cluster and configuration
13
+
14
+ | Name | Operation |
15
+ | ----------------------------- | --------------------------------------- |
16
+ | `broker.cluster.create` | A cluster was provisioned |
17
+ | `broker.cluster.delete` | A cluster was decommissioned |
18
+ | `broker.cluster.scale` | Cluster capacity was changed |
19
+ | `broker.cluster.upgrade` | A cluster was upgraded |
20
+ | `broker.cluster.failover` | Traffic was moved to another cluster |
21
+ | `broker.configuration.update` | Broker or cluster configuration changed |
22
+
23
+ ### Destinations
24
+
25
+ | Name | Operation |
26
+ | ------------------------------ | ------------------------------------ |
27
+ | `broker.topic.create` | A topic was created |
28
+ | `broker.topic.update` | A topic's configuration changed |
29
+ | `broker.topic.delete` | A topic was deleted |
30
+ | `broker.queue.create` | A queue was created |
31
+ | `broker.queue.update` | A queue's configuration changed |
32
+ | `broker.queue.delete` | A queue was deleted |
33
+ | `broker.queue.purge` | A queue's messages were discarded |
34
+ | `broker.exchange.create` | An exchange was created |
35
+ | `broker.exchange.update` | An exchange's configuration changed |
36
+ | `broker.exchange.delete` | An exchange was deleted |
37
+ | `broker.stream.create` | A stream was created |
38
+ | `broker.stream.update` | A stream's configuration changed |
39
+ | `broker.stream.trim` | A stream's retained records were cut |
40
+ | `broker.stream.delete` | A stream was deleted |
41
+ | `broker.consumer-group.create` | A consumer group was created |
42
+ | `broker.consumer-group.update` | A consumer group's settings changed |
43
+ | `broker.consumer-group.delete` | A consumer group was removed |
44
+
45
+ ### Access and quotas
46
+
47
+ | Name | Operation |
48
+ | -------------------------- | --------------------------------------- |
49
+ | `broker.acl.grant` | An access control entry was added |
50
+ | `broker.acl.revoke` | An access control entry was removed |
51
+ | `broker.permission.grant` | A permission was granted to a principal |
52
+ | `broker.permission.revoke` | A permission was removed |
53
+ | `broker.quota.create` | A quota was defined |
54
+ | `broker.quota.update` | A quota was changed |
55
+ | `broker.quota.delete` | A quota was removed |
56
+
57
+ ### Position and replay
58
+
59
+ | Name | Operation |
60
+ | ----------------------- | ------------------------------------------------- |
61
+ | `broker.offset.reset` | A consumer group's position was moved |
62
+ | `broker.message.replay` | Messages were re-delivered from a stored position |
63
+
64
+ ## 2. The data plane is not an audit trail
65
+
66
+ A published message is not an audit event, and a broker that emitted one per message would produce
67
+ volume nobody reviews. Recording every publish and every consume also duplicates the broker's own
68
+ telemetry while adding the one thing telemetry must not carry: message content.
69
+
70
+ What belongs here is the operation that changed the broker, not the traffic that flowed through it.
71
+ Where a business operation happens to be carried by a message, the **application** records the
72
+ business event; the broker records that a destination or a permission changed.
73
+
74
+ `broker.queue.purge`, `broker.stream.trim`, `broker.offset.reset` and `broker.message.replay` are the
75
+ exceptions that prove the rule: each is a control-plane operation whose effect is on data, which is
76
+ exactly why they are governed.
77
+
78
+ ## 3. Position changes deserve their own attention
79
+
80
+ `broker.offset.reset` and `broker.message.replay` change what consumers see without changing what was
81
+ written. A reset can hide a poison message, replay a day of financial instructions, or make a
82
+ downstream system process an order twice — and none of it leaves a trace in the destination itself.
83
+
84
+ An auditor reading a broker trail looks for these first. The event SHOULD carry the position moved
85
+ from and the position moved to in `metadata`, and the reason the position was moved in `reason`. Where
86
+ the operation was performed to recover from an incident, `request.correlationId` SHOULD tie it to the
87
+ incident's own events.
88
+
89
+ ## 4. Which principal goes where
90
+
91
+ | Operation | `actor` | `resource` | `subject` |
92
+ | -------------------------------------------- | ------------------ | ---------------------- | --------- |
93
+ | An operator creates a topic | the operator | the **topic** | absent |
94
+ | An operator grants a service an ACL entry | the operator | the **topic or queue** | absent |
95
+ | A platform job upgrades a cluster | the job's identity | the **cluster** | absent |
96
+ | An operator resets a consumer group's offset | the operator | the **consumer group** | absent |
97
+
98
+ The principal receiving an ACL or a permission is a **related resource**, never a `subject`. `subject`
99
+ is the principal on whose behalf the actor acted, and a service being granted access delegated
100
+ nothing to the operator granting it. See [actor-model.md](../specification/actor-model.md) §5.
101
+
102
+ ## 5. What must never be recorded
103
+
104
+ **Message payloads, keys and headers.** A broker carries other systems' data, and an audit event that
105
+ quoted a message would copy that data into a store with a different retention period, a different
106
+ access model and a different threat model. This includes a "sample" message, a truncated payload and a
107
+ payload hash that could confirm a guess.
108
+
109
+ Connection strings, SASL credentials and TLS private material are equally out of bounds — see
110
+ [privacy.md](../specification/privacy.md) §6.
111
+
112
+ ## 6. Context to populate
113
+
114
+ | Field | Guidance |
115
+ | ----------------------- | ------------------------------------------------------------------------ |
116
+ | `authorization` | The decision that permitted the control-plane operation |
117
+ | `change` | `changedFields`, and before and after for configuration and quotas |
118
+ | `relatedResources` | The cluster the destination belongs to, and the principal granted access |
119
+ | `reason` | Why a purge, trim, offset reset or replay was performed |
120
+ | `metadata.broker` | The broker's own identifiers: cluster, destination, group, position |
121
+ | `request.correlationId` | Shared with the incident or change request that prompted the operation |
122
+
123
+ ## 7. Example
124
+
125
+ See
126
+ [examples/profiles/message-broker-management/valid/offset-reset.json](../examples/profiles/message-broker-management/valid/offset-reset.json)
127
+ for a consumer-group offset reset with the authorization decision, the positions moved between and
128
+ the reason it was moved.
@@ -0,0 +1,132 @@
1
+ # Secret and Key Events
2
+
3
+ **Specification version: 0.1 · Status: Experimental**
4
+
5
+ ## 1. Recommended event names
6
+
7
+ This domain spans four categories, because the operations differ in kind rather than in subject: a
8
+ key generation is a security operation, reading a secret is data access, and changing a rotation
9
+ policy is configuration.
10
+
11
+ | Family | `event.category` |
12
+ | ----------------------------------- | ---------------------- |
13
+ | Secret and key lifecycle | `security` |
14
+ | Reading a secret or exporting a key | `data-access` |
15
+ | Emergency and break-glass access | `privileged-operation` |
16
+ | Rotation and expiry policy | `configuration` |
17
+
18
+ ### Secrets
19
+
20
+ | Name | Operation |
21
+ | --------------- | -------------------------------------------- |
22
+ | `secret.create` | A secret was stored |
23
+ | `secret.update` | A secret's value was replaced in place |
24
+ | `secret.rotate` | A secret was replaced on a rotation schedule |
25
+ | `secret.reveal` | A principal read a secret's value |
26
+ | `secret.export` | A secret left the store |
27
+ | `secret.revoke` | A secret was invalidated before its expiry |
28
+ | `secret.delete` | A secret was removed from the store |
29
+
30
+ ### Keys
31
+
32
+ | Name | Operation |
33
+ | -------------- | ----------------------------------------------- |
34
+ | `key.generate` | A key was created inside the store |
35
+ | `key.import` | A key created elsewhere was brought in |
36
+ | `key.rotate` | A new key version replaced the active one |
37
+ | `key.enable` | A key was made usable |
38
+ | `key.disable` | A key was made unusable without being destroyed |
39
+ | `key.export` | Key material left the store |
40
+ | `key.destroy` | A key was destroyed and cannot be recovered |
41
+
42
+ ### Certificates
43
+
44
+ | Name | Operation |
45
+ | -------------------- | ---------------------------------------- |
46
+ | `certificate.issue` | A certificate was issued |
47
+ | `certificate.renew` | A certificate was reissued before expiry |
48
+ | `certificate.revoke` | A certificate was revoked |
49
+ | `certificate.delete` | A certificate was removed |
50
+
51
+ ### Policy
52
+
53
+ `secret.policy.update` records a change to the rules governing rotation, expiry or access for a
54
+ secret or a class of secrets.
55
+
56
+ **Open item.** The profile also selects the prefix `key.policy.`, and no name is published under it
57
+ and no fixture carries one. Either a key policy operation exists and should be named here, or the
58
+ prefix should be withdrawn. It is recorded as an open question rather than filled with an invented
59
+ name.
60
+
61
+ ## 2. The overlap with `configuration.secret.access`
62
+
63
+ [configuration-and-change.md](configuration-and-change.md) §6 publishes `configuration.secret.access`
64
+ for a principal reading a secret held as application configuration. This document publishes
65
+ `secret.reveal` for a principal reading a secret from a secret store, which is what the
66
+ secrets-and-key-management profile enforces.
67
+
68
+ These are two names for what is arguably one operation, and this document does not resolve that. A
69
+ convention may not quietly withdraw a name another convention publishes: `event-model.md` §7.2 makes
70
+ name stability a MUST, and a producer already emitting either name is conforming. Reconciling the two
71
+ is a specification change and needs an issue against
72
+ [CONTRIBUTING.md](../CONTRIBUTING.md)'s specification-change process.
73
+
74
+ Until then: a producer whose secrets are configuration values SHOULD use
75
+ `configuration.secret.access`; a producer with a secret store as a distinct system SHOULD use
76
+ `secret.reveal`. A producer SHOULD NOT emit both for one read.
77
+
78
+ ## 3. What must never be recorded
79
+
80
+ **The material itself.** Not the secret, not the key, not a private key, not a certificate's private
81
+ half, not a fragment, not a prefix, and not a hash that would let a reader confirm a guess. This is
82
+ the domain where the rule matters most, because the events are about material whose whole value is
83
+ that nobody else has it.
84
+
85
+ An event records that a secret was read, by whom, under what authorization, and which secret — by
86
+ identifier. It does not record what the secret was. See
87
+ [privacy.md](../specification/privacy.md) §6, and note that the privacy linter is a backstop for
88
+ this rule, not the control that enforces it.
89
+
90
+ `keyId` names a key and MUST NOT carry key material — [integrity.md](../specification/integrity.md)
91
+ §6.1 already says so for the integrity object, and the same holds here.
92
+
93
+ ## 4. Which principal goes where
94
+
95
+ | Operation | `actor` | `resource` | `subject` |
96
+ | ---------------------------------------------------- | ------------ | -------------- | ------------ |
97
+ | An engineer reads a secret | the engineer | the **secret** | absent |
98
+ | A service reads a secret at start-up | the service | the **secret** | absent |
99
+ | An operator generates a key for an application | the operator | the **key** | absent |
100
+ | An operator reveals a secret for an on-call engineer | the operator | the **secret** | the engineer |
101
+
102
+ The last row is the only one where `subject` appears, and only because the operator acted on someone
103
+ else's behalf. The application a secret belongs to is a **related resource**, not a subject — see
104
+ [actor-model.md](../specification/actor-model.md) §5.
105
+
106
+ ## 5. Emergency access
107
+
108
+ Break-glass reads are the events this domain exists for. Where a producer distinguishes emergency
109
+ access from routine access, the event SHOULD carry that distinction in `metadata` and SHOULD record
110
+ the justification in `reason`. An emergency read with no recorded reason is the finding an auditor is
111
+ looking for.
112
+
113
+ Where the producer's own policy requires approval for a class of access, the decision belongs in
114
+ `approval` — including when approval was evaluated and found not to be required.
115
+
116
+ ## 6. Context to populate
117
+
118
+ | Field | Guidance |
119
+ | ------------------------- | -------------------------------------------------------------------- |
120
+ | `authorization` | The decision that permitted the operation |
121
+ | `resource.classification` | How sensitive the secret or key is, in the producer's own vocabulary |
122
+ | `approval` | Where the operation required a second principal's decision |
123
+ | `reason` | Why a reveal, export, revoke or destroy was performed |
124
+ | `metadata.secret` | The store's own identifiers, the secret type, and the rotation state |
125
+ | `relatedResources` | The application or service the secret or key serves |
126
+
127
+ ## 7. Example
128
+
129
+ See
130
+ [examples/profiles/secrets-and-key-management/valid/secret-reveal-emergency.json](../examples/profiles/secrets-and-key-management/valid/secret-reveal-emergency.json)
131
+ for an emergency secret read with the authorization decision, the justification and the approval that
132
+ permitted it — and no trace of the secret itself.