smplkit 3.0.21 → 3.0.22

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/audit/events.rb +11 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38771e2469f7abb018b9c57b1a841a8a9da9a350b47be1206254ee60aad6df17
4
- data.tar.gz: d19aedd7e56e0fec286c70640d9268ad8502003da974c1fa65fe7ec511335146
3
+ metadata.gz: 81748d66161d109c1a8948824656edb9ad0fd9bef8dffd37a1969474c8a731fa
4
+ data.tar.gz: 188a085ba9c2c99fe3ff5c3e246a75b033e264e7d87efe9e87d94f8e46c8cb34
5
5
  SHA512:
6
- metadata.gz: d320d1ddd09c4ce053cd67e209f9515e712021737f4e6b10b13bbb3a513296596eeafe68048cdf1911705d3f7ed55bbf12eda73d62417a962bc8722abeeaff5c
7
- data.tar.gz: e5bb79dd560c8109c75ad76d20047add2746b421c2891435560268b97ef12ed1a82c7849713bcb87ecd75adee8c53781b21e37821cc07f14d4cb512b98fe3be2
6
+ metadata.gz: 704759f5899aa706dcd6a4217634ca7ab722b452583d470a10f4dd23411f23d429b2989503658bdf6142a4b5a87e024592eceae6a22b5e33d299da7a0b9bb1b6
7
+ data.tar.gz: b4916402670ef7c2659a2a776388dbd4ef7954560f219f0cb62e69d69b937e24e4a8a930a8d2e2c282a35a0a04134103456d92146611968c7aa14c9a6b1b8e11
@@ -15,11 +15,18 @@ module Smplkit
15
15
 
16
16
  # Enqueue an audit event for asynchronous delivery.
17
17
  #
18
+ # Actor attribution (+actor_type+, +actor_id+, +actor_label+) is
19
+ # customer-supplied and free-form. The audit service stores
20
+ # whatever the caller passed and never backfills from the request
21
+ # credential — supply the fields explicitly when you want the
22
+ # event attributed.
23
+ #
18
24
  # Customer attempts to record events with +resource_type+ starting
19
25
  # with +smpl.+ are rejected by the server with a 403 (the buffer
20
26
  # logs and drops permanent failures).
21
27
  def record(action:, resource_type:, resource_id:,
22
- occurred_at: nil, data: nil, idempotency_key: nil,
28
+ occurred_at: nil, actor_type: nil, actor_id: nil,
29
+ actor_label: nil, data: nil, idempotency_key: nil,
23
30
  do_not_forward: false)
24
31
  raise ArgumentError, "action is required" if action.nil? || action.to_s.empty?
25
32
  raise ArgumentError, "resource_type is required" if resource_type.nil? || resource_type.to_s.empty?
@@ -45,6 +52,9 @@ module Smplkit
45
52
  resource_type: resource_type,
46
53
  resource_id: resource_id,
47
54
  occurred_at: normalized_occurred_at,
55
+ actor_type: actor_type,
56
+ actor_id: actor_id,
57
+ actor_label: actor_label,
48
58
  data: data || {},
49
59
  do_not_forward: do_not_forward
50
60
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smplkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.21
4
+ version: 3.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smpl Solutions LLC