Skip to content

refactor: Add resolve_implied_roles flag to role assignment listing#764

Merged
gtema merged 1 commit into
mainfrom
system-assignment
Jun 6, 2026
Merged

refactor: Add resolve_implied_roles flag to role assignment listing#764
gtema merged 1 commit into
mainfrom
system-assignment

Conversation

@gtema
Copy link
Copy Markdown
Collaborator

@gtema gtema commented Jun 5, 2026

Add resolve_implied_roles field (default false) to
RoleAssignmentListParameters and
RoleAssignmentListForMultipleActorTargetParameters to make implied role
resolution optional instead of always performed by the SQL driver.

The /role_assignments API defaults to resolving implied roles (for
backward compatibility). Auth resolvers (domain, project, system, trust)
explicitly enable it. Resource-specific endpoints
(project/system/user/role list and check) set it to false to avoid
unnecessary resolution overhead.

Implied role resolution is extracted into a separate
resolve_implied_roles method on SqlBackend. Role name resolution is
removed from the driver and remains the provider's responsibility (via
include_names).

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

🦢 Load Test Results

Goose Attack Report

Plan Overview

Action Started Stopped Elapsed Users
Increasing 26-06-06 14:03:31 26-06-06 14:03:33 00:00:02 0 → 4
Maintaining 26-06-06 14:03:33 26-06-06 14:04:03 00:00:30 4
Decreasing 26-06-06 14:04:03 26-06-06 14:04:03 00:00:00 0 ← 4

Request Metrics

Method Name # Requests # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
GET 6414 0 18.22 12 36 213.80 0.00
Aggregated 6414 0 18.22 12 36 213.80 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 16 18 23 23 24 25 27 36
Aggregated 16 18 23 23 24 25 27 36

Status Code Metrics

Method Name Status Codes
GET 6,414 [200]
Aggregated 6,414 [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 3924 0 14.82 12 23 130.80 0.00
ValidateToken
1.0 0 0 0.00 0 0 0.00 0.00
1.1 2490 0 23.67 20 36 83.00 0.00
Aggregated 6414 0 18.22 12 36 213.80 0.00

Scenario Metrics

Transaction # Users # Times Run Average (ms) Min (ms) Max (ms) Scenarios/s Iterations
ListUsers 2 3922 14.83 12 23 130.73 1961.00
ValidateToken 2 2488 23.68 20 36 82.93 1244.00
Aggregated 4 6410 18.26 12 36 213.67 3205.00

View full report

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

🐰 Bencher Report

Branchsystem-assignment
Testbedubuntu-latest

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
Raft_1Node_Latency/prefix/1nodeLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
9.46 ms
(+162.35%)Baseline: 3.61 ms
6.93 ms
(136.50%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
Command_Serde/apply/remove📈 view plot
🚷 view threshold
88,449.00 ns
(-41.83%)Baseline: 152,056.24 ns
527,175.14 ns
(16.78%)
Command_Serde/apply/set📈 view plot
🚷 view threshold
85,195.00 ns
(-37.04%)Baseline: 135,306.56 ns
313,094.46 ns
(27.21%)
Command_Serde/pack/delete📈 view plot
🚷 view threshold
124.38 ns
(+1.97%)Baseline: 121.98 ns
143.89 ns
(86.44%)
Command_Serde/pack/delete_index📈 view plot
🚷 view threshold
115.45 ns
(+1.22%)Baseline: 114.05 ns
134.17 ns
(86.05%)
Command_Serde/pack/set📈 view plot
🚷 view threshold
192.70 ns
(-2.59%)Baseline: 197.83 ns
237.62 ns
(81.10%)
Command_Serde/pack/set_index📈 view plot
🚷 view threshold
114.88 ns
(+0.61%)Baseline: 114.19 ns
133.69 ns
(85.93%)
Command_Serde/unpack/delete📈 view plot
🚷 view threshold
222.12 ns
(+18.86%)Baseline: 186.87 ns
228.05 ns
(97.40%)
Command_Serde/unpack/delete_index📈 view plot
🚷 view threshold
185.80 ns
(+13.22%)Baseline: 164.11 ns
201.87 ns
(92.04%)
Command_Serde/unpack/set📈 view plot
🚷 view threshold
267.54 ns
(+9.27%)Baseline: 244.85 ns
288.24 ns
(92.82%)
Command_Serde/unpack/set_index📈 view plot
🚷 view threshold
186.01 ns
(+14.33%)Baseline: 162.69 ns
201.03 ns
(92.53%)
Payload_encryption/pack/inner📈 view plot
🚷 view threshold
70.10 ns
(+8.16%)Baseline: 64.81 ns
76.44 ns
(91.71%)
Payload_encryption/pack/remove_cmd📈 view plot
🚷 view threshold
119.85 ns
(-1.53%)Baseline: 121.71 ns
145.33 ns
(82.47%)
Payload_encryption/pack/set_cmd📈 view plot
🚷 view threshold
189.47 ns
(-18.40%)Baseline: 232.21 ns
293.06 ns
(64.65%)
Payload_encryption/unpack/inner📈 view plot
🚷 view threshold
164.51 ns
(+1.04%)Baseline: 162.82 ns
191.44 ns
(85.93%)
Payload_encryption/unpack/remove_cmd📈 view plot
🚷 view threshold
219.38 ns
(+11.90%)Baseline: 196.04 ns
241.53 ns
(90.83%)
Payload_encryption/unpack/set_cmd📈 view plot
🚷 view threshold
273.41 ns
(+6.28%)Baseline: 257.26 ns
311.26 ns
(87.84%)
Raft_1Node_Latency/prefix/1node📈 view plot
🚷 view threshold
🚨 view alert (🔔)
9,461,100.00 ns
(+162.35%)Baseline: 3,606,250.47 ns
6,931,248.02 ns
(136.50%)

Raft_1Node_Latency/read/1node📈 view plot
🚷 view threshold
599.74 ns
(+7.02%)Baseline: 560.38 ns
743.15 ns
(80.70%)
Raft_1Node_Latency/remove/1node📈 view plot
🚷 view threshold
260,740.00 ns
(-32.88%)Baseline: 388,452.79 ns
1,059,562.97 ns
(24.61%)
Raft_1Node_Latency/write/1node📈 view plot
🚷 view threshold
260,880.00 ns
(-31.95%)Baseline: 383,378.60 ns
866,175.34 ns
(30.12%)
build_snapshot/default📈 view plot
🚷 view threshold
94,778.00 ns
(+1.16%)Baseline: 93,687.20 ns
157,746.76 ns
(60.08%)
fernet token/project📈 view plot
🚷 view threshold
1,429.60 ns
(-1.82%)Baseline: 1,456.04 ns
1,656.56 ns
(86.30%)
get_data_keyspace📈 view plot
🚷 view threshold
0.35 ns
(+10.37%)Baseline: 0.32 ns
0.38 ns
(93.18%)
get_db📈 view plot
🚷 view threshold
0.36 ns
(+11.14%)Baseline: 0.32 ns
0.38 ns
(93.65%)
get_fernet_token_timestamp/project📈 view plot
🚷 view threshold
136.65 ns
(-7.00%)Baseline: 146.94 ns
172.70 ns
(79.12%)
get_keyspace📈 view plot
🚷 view threshold
4.84 ns
(+1.34%)Baseline: 4.77 ns
8.97 ns
(53.90%)
🐰 View full continuous benchmarking report in Bencher

Add resolve_implied_roles field (default false) to
RoleAssignmentListParameters and
RoleAssignmentListForMultipleActorTargetParameters to make implied role
resolution optional instead of always performed by the SQL driver.

The /role_assignments API defaults to resolving implied roles (for
backward compatibility). Auth resolvers (domain, project, system, trust)
explicitly enable it. Resource-specific endpoints
(project/system/user/role list and check) set it to false to avoid
unnecessary resolution overhead.

Implied role resolution is extracted into a separate
resolve_implied_roles method on SqlBackend. Role name resolution is
removed from the driver and remains the provider's responsibility (via
include_names).
@gtema gtema force-pushed the system-assignment branch from 73a870a to 7182a7a Compare June 6, 2026 13:46
@gtema gtema merged commit c0a1a9b into main Jun 6, 2026
32 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