Skip to content

feat: Introduce SecurityContext#710

Merged
gtema merged 1 commit into
mainfrom
security_context
May 14, 2026
Merged

feat: Introduce SecurityContext#710
gtema merged 1 commit into
mainfrom
security_context

Conversation

@gtema
Copy link
Copy Markdown
Collaborator

@gtema gtema commented May 13, 2026

Introduce the SecurityContext instead of the AuthenticatedInfo that is more flexible and allow being used for the SPIFFE issued principals while also trying to make heavy use of enums to prevent undefined states while re-authenticating. Additionally this prevents many logic errors my having a precise state of the authentication and authorization by heavy use of enums.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

🦢 Load Test Results

Goose Attack Report

Plan Overview

Action Started Stopped Elapsed Users
Increasing 26-05-14 12:38:21 26-05-14 12:38:23 00:00:02 0 → 4
Maintaining 26-05-14 12:38:23 26-05-14 12:38:53 00:00:30 4
Decreasing 26-05-14 12:38:53 26-05-14 12:38:53 00:00:00 0 ← 4

Request Metrics

Method Name # Requests # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
GET 8571 0 13.50 8 33 285.70 0.00
Aggregated 8571 0 13.50 8 33 285.70 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 12 14 17 17 18 19 21 33
Aggregated 12 14 17 17 18 19 21 33

Status Code Metrics

Method Name Status Codes
GET 8,571 [200]
Aggregated 8,571 [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 5269 0 10.92 8 22 175.63 0.00
ValidateToken
1.0 0 0 0.00 0 0 0.00 0.00
1.1 3302 0 17.71 14 33 110.07 0.00
Aggregated 8571 0 13.50 8 33 285.70 0.00

Scenario Metrics

Transaction # Users # Times Run Average (ms) Min (ms) Max (ms) Scenarios/s Iterations
ListUsers 2 5267 10.92 8 22 175.57 2633.50
ValidateToken 2 3300 17.71 14 33 110.00 1650.00
Aggregated 4 8567 13.54 8 33 285.57 4283.50

View full report

@gtema gtema force-pushed the security_context branch from 6dc084f to 5adebf6 Compare May 13, 2026 16:15
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

🐰 Bencher Report

Branchsecurity_context
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
116,780.00 ns
(-16.44%)Baseline: 139,758.05 ns
371,895.02 ns
(31.40%)
Command_Serde/apply/set📈 view plot
🚷 view threshold
119,790.00 ns
(-9.76%)Baseline: 132,752.79 ns
244,372.73 ns
(49.02%)
Command_Serde/pack/delete📈 view plot
🚷 view threshold
120.88 ns
(-1.47%)Baseline: 122.69 ns
145.10 ns
(83.31%)
Command_Serde/pack/delete_index📈 view plot
🚷 view threshold
115.52 ns
(+0.90%)Baseline: 114.49 ns
133.99 ns
(86.22%)
Command_Serde/pack/set📈 view plot
🚷 view threshold
201.05 ns
(+1.27%)Baseline: 198.52 ns
234.15 ns
(85.86%)
Command_Serde/pack/set_index📈 view plot
🚷 view threshold
115.40 ns
(+0.55%)Baseline: 114.77 ns
134.44 ns
(85.84%)
Command_Serde/unpack/delete📈 view plot
🚷 view threshold
184.73 ns
(-2.29%)Baseline: 189.06 ns
228.83 ns
(80.73%)
Command_Serde/unpack/delete_index📈 view plot
🚷 view threshold
158.86 ns
(-2.77%)Baseline: 163.39 ns
192.30 ns
(82.61%)
Command_Serde/unpack/set📈 view plot
🚷 view threshold
246.93 ns
(+0.26%)Baseline: 246.29 ns
288.25 ns
(85.67%)
Command_Serde/unpack/set_index📈 view plot
🚷 view threshold
157.18 ns
(-2.99%)Baseline: 162.02 ns
194.63 ns
(80.76%)
Payload_encryption/pack/inner📈 view plot
🚷 view threshold
65.10 ns
(-0.89%)Baseline: 65.69 ns
76.63 ns
(84.95%)
Payload_encryption/pack/remove_cmd📈 view plot
🚷 view threshold
119.88 ns
(-2.78%)Baseline: 123.31 ns
148.16 ns
(80.91%)
Payload_encryption/pack/set_cmd📈 view plot
🚷 view threshold
201.19 ns
(-14.68%)Baseline: 235.82 ns
294.46 ns
(68.33%)
Payload_encryption/unpack/inner📈 view plot
🚷 view threshold
161.63 ns
(-1.14%)Baseline: 163.50 ns
193.08 ns
(83.71%)
Payload_encryption/unpack/remove_cmd📈 view plot
🚷 view threshold
202.44 ns
(+1.89%)Baseline: 198.69 ns
233.96 ns
(86.53%)
Payload_encryption/unpack/set_cmd📈 view plot
🚷 view threshold
262.22 ns
(-0.05%)Baseline: 262.34 ns
316.66 ns
(82.81%)
Raft_1Node_Latency/prefix/1node📈 view plot
🚷 view threshold
3,411,900.00 ns
(-1.63%)Baseline: 3,468,480.95 ns
6,471,755.63 ns
(52.72%)
Raft_1Node_Latency/read/1node📈 view plot
🚷 view threshold
581.31 ns
(+6.20%)Baseline: 547.38 ns
787.31 ns
(73.84%)
Raft_1Node_Latency/remove/1node📈 view plot
🚷 view threshold
332,640.00 ns
(-9.13%)Baseline: 366,078.10 ns
651,533.47 ns
(51.05%)
Raft_1Node_Latency/write/1node📈 view plot
🚷 view threshold
338,710.00 ns
(-11.52%)Baseline: 382,789.52 ns
832,743.87 ns
(40.67%)
build_snapshot/default📈 view plot
🚷 view threshold
89,981.00 ns
(-1.92%)Baseline: 91,738.37 ns
145,338.35 ns
(61.91%)
fernet token/project📈 view plot
🚷 view threshold
1,522.00 ns
(+2.84%)Baseline: 1,479.91 ns
1,594.17 ns
(95.47%)
get_data_keyspace📈 view plot
🚷 view threshold
0.31 ns
(-2.74%)Baseline: 0.32 ns
0.37 ns
(83.55%)
get_db📈 view plot
🚷 view threshold
0.31 ns
(-2.50%)Baseline: 0.32 ns
0.37 ns
(83.43%)
get_fernet_token_timestamp/project📈 view plot
🚷 view threshold
144.51 ns
(-3.24%)Baseline: 149.36 ns
173.27 ns
(83.40%)
get_keyspace📈 view plot
🚷 view threshold
4.35 ns
(-0.43%)Baseline: 4.37 ns
5.11 ns
(85.24%)
🐰 View full continuous benchmarking report in Bencher

@gtema gtema force-pushed the security_context branch 2 times, most recently from d2393bc to 9c6837f Compare May 14, 2026 10:02
Introduce the SecurityContext instead of the AuthenticatedInfo that is
more flexible and allow being used for the SPIFFE issued principals
while also trying to make heavy use of enums to prevent undefined states
while re-authenticating. Additionally this prevents many logic errors my
having a precise state of the authentication and authorization by heavy
use of enums.
@gtema gtema force-pushed the security_context branch from 9c6837f to 1691fda Compare May 14, 2026 12:26
@gtema gtema merged commit e21e86f into main May 14, 2026
33 checks passed
@gtema gtema changed the title fear: Introduce SecurityContext feat: Introduce SecurityContext May 14, 2026
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