feat(adr0034): Restrict the assignment DC group to admins - #1221
Merged
Conversation
The `assignment` group binds a domain to an assignment backend, which is a role-minting surface: a domain manager who could set it would pick which driver mints roles for their own domain (ADR 0034 §6). - Add a `touches_assignment_group` guard to the domain-manager `allow` clause of domain_config create/update/delete. It fires on the group or option path (`input.target.group == "assignment"`) and on an `assignment` block in a whole-config PATCH/PUT body (`input.target.config.assignment`). - The `admin` / `is_admin` clauses stay unconditional; they key on the authentication chain and are never satisfiable by a domain-scoped token. - A whole-config DELETE carries no group, so a manager can still drop their domain's entire configuration; that only reverts the domain to the global driver, which mints nothing. - Cover the decision with `opa test` cases and, in the group handler, with tests driven through the real `opa run` policy and the production HttpPolicyEnforcer. Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
|
🧪 Tempest Identity Compatibility Results (advisory, non-blocking) rust Failed test IDs |
|
🦢 Load Test Results Goose Attack ReportPlan Overview
Request Metrics
Response Time Metrics
Status Code Metrics
Transaction Metrics
Scenario Metrics
Error Metrics
|
|
| Project | keystone |
| Branch | claude/per-domain-assignments-provider-k0tp5e |
| Testbed | ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|
| Command_Serde/apply/remove | 📈 view plot 🚷 view threshold | 261,830.00 ns(+1.51%)Baseline: 257,929.19 ns | 1,308,224.68 ns (20.01%) |
| Command_Serde/apply/set | 📈 view plot 🚷 view threshold | 445,440.00 ns(+7.00%)Baseline: 416,299.28 ns | 3,206,165.49 ns (13.89%) |
| Command_Serde/pack/delete | 📈 view plot 🚷 view threshold | 97.33 ns(-17.33%)Baseline: 117.73 ns | 152.65 ns (63.76%) |
| Command_Serde/pack/delete_index | 📈 view plot 🚷 view threshold | 90.45 ns(-13.83%)Baseline: 104.96 ns | 135.23 ns (66.88%) |
| Command_Serde/pack/set | 📈 view plot 🚷 view threshold | 155.76 ns(-18.39%)Baseline: 190.85 ns | 241.68 ns (64.45%) |
| Command_Serde/pack/set_index | 📈 view plot 🚷 view threshold | 88.78 ns(-15.38%)Baseline: 104.92 ns | 135.79 ns (65.38%) |
| Command_Serde/unpack/delete | 📈 view plot 🚷 view threshold | 172.46 ns(-7.77%)Baseline: 186.99 ns | 268.43 ns (64.25%) |
| Command_Serde/unpack/delete_index | 📈 view plot 🚷 view threshold | 141.56 ns(-8.97%)Baseline: 155.51 ns | 217.11 ns (65.20%) |
| Command_Serde/unpack/set | 📈 view plot 🚷 view threshold | 220.54 ns(-16.35%)Baseline: 263.65 ns | 359.33 ns (61.38%) |
| Command_Serde/unpack/set_index | 📈 view plot 🚷 view threshold | 138.97 ns(-9.21%)Baseline: 153.08 ns | 211.62 ns (65.67%) |
| Payload_encryption/pack/remove_cmd | 📈 view plot 🚷 view threshold | 91.27 ns(-18.74%)Baseline: 112.32 ns | 149.00 ns (61.26%) |
| Payload_encryption/pack/set_cmd | 📈 view plot 🚷 view threshold | 151.09 ns(-24.16%)Baseline: 199.23 ns | 261.91 ns (57.69%) |
| Payload_encryption/unpack/remove_cmd | 📈 view plot 🚷 view threshold | 170.21 ns(-12.92%)Baseline: 195.46 ns | 282.10 ns (60.34%) |
| Payload_encryption/unpack/set_cmd | 📈 view plot 🚷 view threshold | 239.07 ns(-12.43%)Baseline: 273.01 ns | 375.39 ns (63.69%) |
| Raft_1Node_Latency/prefix/1node | 📈 view plot 🚷 view threshold | 1,844,100.00 ns(-39.95%)Baseline: 3,070,777.17 ns | 7,923,702.43 ns (23.27%) |
| Raft_1Node_Latency/read/1node | 📈 view plot 🚷 view threshold | 27,050.00 ns(-27.73%)Baseline: 37,431.47 ns | 51,663.54 ns (52.36%) |
| Raft_1Node_Latency/remove/1node | 📈 view plot 🚷 view threshold | 903,930.00 ns(-23.15%)Baseline: 1,176,161.41 ns | 11,500,152.56 ns (7.86%) |
| Raft_1Node_Latency/write/1node | 📈 view plot 🚷 view threshold | 621,860.00 ns(-36.37%)Baseline: 977,268.28 ns | 7,555,838.77 ns (8.23%) |
| build_snapshot/default | 📈 view plot 🚷 view threshold | 188,310.00 ns(+53.13%)Baseline: 122,970.27 ns | 268,756.26 ns (70.07%) |
| fernet token/project | 📈 view plot 🚷 view threshold | 1,256.20 ns(-11.80%)Baseline: 1,424.23 ns | 1,796.95 ns (69.91%) |
| get_data_keyspace | 📈 view plot 🚷 view threshold | 0.27 ns(-13.26%)Baseline: 0.31 ns | 0.39 ns (70.85%) |
| get_db | 📈 view plot 🚷 view threshold | 0.27 ns(-13.14%)Baseline: 0.32 ns | 0.39 ns (71.05%) |
| get_fernet_token_timestamp/project | 📈 view plot 🚷 view threshold | 119.19 ns(-15.02%)Baseline: 140.26 ns | 180.04 ns (66.20%) |
| get_keyspace | 📈 view plot 🚷 view threshold | 3.59 ns(-38.87%)Baseline: 5.87 ns | 13.51 ns (26.55%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
assignmentgroup binds a domain to an assignment backend, which isa role-minting surface: a domain manager who could set it would pick
which driver mints roles for their own domain (ADR 0034 §6).
touches_assignment_groupguard to the domain-managerallowclause of domain_config create/update/delete. It fires on the group or
option path (
input.target.group == "assignment") and on anassignmentblock in a whole-config PATCH/PUT body(
input.target.config.assignment).admin/is_adminclauses stay unconditional; they key on theauthentication chain and are never satisfiable by a domain-scoped
token.
their domain's entire configuration; that only reverts the domain to
the global driver, which mints nothing.
opa testcases and, in the group handler,with tests driven through the real
opa runpolicy and the productionHttpPolicyEnforcer.
Signed-off-by: Artem Goncharov artem.goncharov@gmail.com