Skip to content

feat: Normalize the policy enforcer structure#741

Merged
gtema merged 1 commit into
mainfrom
policy
May 29, 2026
Merged

feat: Normalize the policy enforcer structure#741
gtema merged 1 commit into
mainfrom
policy

Conversation

@gtema
Copy link
Copy Markdown
Collaborator

@gtema gtema commented May 29, 2026

Fix and normalize the structure of the data passed to OPA:

  • target describes what the user has passed
  • optional "existing" field passes the current state of the resource
  • update the ADR to fix the design

Fix and normalize the structure of the data passed to OPA:
- target describes what the user has passed
- optional "existing" field passes the current state of the resource
- update the ADR to fix the design
@github-actions
Copy link
Copy Markdown

🦢 Load Test Results

Goose Attack Report

Plan Overview

Action Started Stopped Elapsed Users
Increasing 26-05-29 18:14:39 26-05-29 18:14:41 00:00:02 0 → 4
Maintaining 26-05-29 18:14:41 26-05-29 18:15:11 00:00:30 4
Decreasing 26-05-29 18:15:11 26-05-29 18:15:11 00:00:00 0 ← 4

Request Metrics

Method Name # Requests # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
GET 7081 0 12.22 8 26 236.03 0.00
Aggregated 7081 0 12.22 8 26 236.03 0.00

Response Time Metrics

Method Name 50%ile (ms) 60%ile (ms) 70%ile (ms) 80%ile (ms) 90%ile (ms) 95%ile (ms) 99%ile (ms) 100%ile (ms)
GET 11 11 12 16 17 18 19 26
Aggregated 11 11 12 16 17 18 19 26

Status Code Metrics

Method Name Status Codes
GET 7,081 [200]
Aggregated 7,081 [200]

Transaction Metrics

Transaction # Times Run # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
ListUsers
0.0 0 0 0.00 0 0 0.00 0.00
0.1 5344 0 10.75 8 16 178.13 0.00
ValidateToken
1.0 0 0 0.00 0 0 0.00 0.00
1.1 1737 0 16.82 14 26 57.90 0.00
Aggregated 7081 0 12.22 8 26 236.03 0.00

Scenario Metrics

Transaction # Users # Times Run Average (ms) Min (ms) Max (ms) Scenarios/s Iterations
ListUsers 2 5342 10.75 8 16 178.07 2671.00
ValidateToken 1 1736 16.82 14 26 57.87 1736.00
Aggregated 3 7078 12.24 8 26 235.93 4407.00

View full report

@github-actions
Copy link
Copy Markdown

🐰 Bencher Report

Branchpolicy
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
Command_Serde/apply/remove📈 view plot
🚷 view threshold
90,357.00 ns
(-41.20%)Baseline: 153,673.40 ns
589,577.04 ns
(15.33%)
Command_Serde/apply/set📈 view plot
🚷 view threshold
90,090.00 ns
(-32.37%)Baseline: 133,201.53 ns
325,241.43 ns
(27.70%)
Command_Serde/pack/delete📈 view plot
🚷 view threshold
121.83 ns
(-0.58%)Baseline: 122.54 ns
144.73 ns
(84.18%)
Command_Serde/pack/delete_index📈 view plot
🚷 view threshold
114.48 ns
(+0.12%)Baseline: 114.34 ns
134.32 ns
(85.23%)
Command_Serde/pack/set📈 view plot
🚷 view threshold
195.15 ns
(-1.93%)Baseline: 199.00 ns
239.78 ns
(81.39%)
Command_Serde/pack/set_index📈 view plot
🚷 view threshold
114.09 ns
(-0.43%)Baseline: 114.59 ns
134.29 ns
(84.96%)
Command_Serde/unpack/delete📈 view plot
🚷 view threshold
210.12 ns
(+11.58%)Baseline: 188.32 ns
229.40 ns
(91.60%)
Command_Serde/unpack/delete_index📈 view plot
🚷 view threshold
176.99 ns
(+7.41%)Baseline: 164.77 ns
202.57 ns
(87.37%)
Command_Serde/unpack/set📈 view plot
🚷 view threshold
259.63 ns
(+5.50%)Baseline: 246.11 ns
290.50 ns
(89.37%)
Command_Serde/unpack/set_index📈 view plot
🚷 view threshold
183.12 ns
(+12.53%)Baseline: 162.73 ns
200.72 ns
(91.23%)
Payload_encryption/pack/inner📈 view plot
🚷 view threshold
66.33 ns
(+1.50%)Baseline: 65.35 ns
77.51 ns
(85.56%)
Payload_encryption/pack/remove_cmd📈 view plot
🚷 view threshold
122.48 ns
(+0.66%)Baseline: 121.67 ns
145.26 ns
(84.32%)
Payload_encryption/pack/set_cmd📈 view plot
🚷 view threshold
218.37 ns
(-5.42%)Baseline: 230.88 ns
285.76 ns
(76.42%)
Payload_encryption/unpack/inner📈 view plot
🚷 view threshold
164.73 ns
(+1.55%)Baseline: 162.22 ns
190.56 ns
(86.45%)
Payload_encryption/unpack/remove_cmd📈 view plot
🚷 view threshold
210.91 ns
(+6.84%)Baseline: 197.41 ns
241.05 ns
(87.50%)
Payload_encryption/unpack/set_cmd📈 view plot
🚷 view threshold
269.69 ns
(+4.45%)Baseline: 258.20 ns
313.21 ns
(86.11%)
Raft_1Node_Latency/prefix/1node📈 view plot
🚷 view threshold
4,917,400.00 ns
(+32.21%)Baseline: 3,719,428.12 ns
6,806,152.75 ns
(72.25%)
Raft_1Node_Latency/read/1node📈 view plot
🚷 view threshold
601.44 ns
(+8.19%)Baseline: 555.92 ns
756.16 ns
(79.54%)
Raft_1Node_Latency/remove/1node📈 view plot
🚷 view threshold
264,900.00 ns
(-32.03%)Baseline: 389,728.44 ns
1,146,684.99 ns
(23.10%)
Raft_1Node_Latency/write/1node📈 view plot
🚷 view threshold
273,640.00 ns
(-28.05%)Baseline: 380,320.31 ns
915,860.57 ns
(29.88%)
build_snapshot/default📈 view plot
🚷 view threshold
58,847.00 ns
(-36.75%)Baseline: 93,042.13 ns
156,276.04 ns
(37.66%)
fernet token/project📈 view plot
🚷 view threshold
1,440.10 ns
(-2.06%)Baseline: 1,470.37 ns
1,637.71 ns
(87.93%)
get_data_keyspace📈 view plot
🚷 view threshold
0.35 ns
(+9.63%)Baseline: 0.32 ns
0.38 ns
(92.42%)
get_db📈 view plot
🚷 view threshold
0.35 ns
(+10.31%)Baseline: 0.32 ns
0.38 ns
(92.76%)
get_fernet_token_timestamp/project📈 view plot
🚷 view threshold
145.27 ns
(-2.20%)Baseline: 148.54 ns
173.46 ns
(83.75%)
get_keyspace📈 view plot
🚷 view threshold
4.81 ns
(+3.22%)Baseline: 4.66 ns
8.27 ns
(58.12%)
🐰 View full continuous benchmarking report in Bencher

@gtema gtema merged commit 787d803 into main May 29, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant