feat(scim): ADR 0024 - Phase 3 (Groups + membership isolation)#928
Merged
Conversation
Add /SCIM/v2/{domain_id}/Groups create/list/show/update/delete,
mirroring the Users vertical slice: ownership fencing, domain-wide
displayName uniqueness, and the same ScimApiError/ScimRealmAuth
scaffolding. Group.id stays server-assigned and externalId optional -
unlike Users, nothing federates in as a Group, so there's no
convergence hazard a deterministic id would solve.
New backend surface Groups didn't have at all before this: update_group
(+ GroupUpdate type), list_users_of_group (member hydration, mirrors
list_groups_of_user), and find_group_by_name_ci (mirrors
find_user_by_name_ci). PUT membership resync diffs the desired set
against list_users_of_group and applies it via the existing
add_users_to_groups/remove_user_from_group primitives.
Cross-realm membership fencing (ADR 0024 §7) and the 1000-member cap
(§11) are enforced before any mutation, on both create and update.
Delete neutralizes the group's role assignments and tombstones the
ScimResourceIndex without touching membership rows, matching the
forensic-retention rationale in §6.B.
Add policy/identity/scim/group/{create,list,show,update,delete}.rego
mirroring the Users policies, and 20 handler unit tests plus 8 new
identity-driver-sql tests for the new backend methods.
Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
ad69b8f to
1e6214a
Compare
|
🦢 Load Test Results Goose Attack ReportPlan Overview
Request Metrics
Response Time Metrics
Status Code Metrics
Transaction Metrics
Scenario Metrics
|
|
| Branch | claude/scim-v2-support-adr-u1f488 |
| 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 | 144,060.00 ns(-50.50%)Baseline: 291,039.92 ns | 1,680,724.39 ns (8.57%) |
| Command_Serde/apply/set | 📈 view plot 🚷 view threshold | 149,090.00 ns(-39.92%)Baseline: 248,170.33 ns | 1,003,315.24 ns (14.86%) |
| Command_Serde/pack/delete | 📈 view plot 🚷 view threshold | 125.38 ns(+2.70%)Baseline: 122.09 ns | 145.50 ns (86.17%) |
| Command_Serde/pack/delete_index | 📈 view plot 🚷 view threshold | 111.68 ns(+1.16%)Baseline: 110.40 ns | 131.14 ns (85.16%) |
| Command_Serde/pack/set | 📈 view plot 🚷 view threshold | 206.72 ns(+5.30%)Baseline: 196.31 ns | 237.79 ns (86.94%) |
| Command_Serde/pack/set_index | 📈 view plot 🚷 view threshold | 111.84 ns(+1.38%)Baseline: 110.32 ns | 130.75 ns (85.54%) |
| Command_Serde/unpack/delete | 📈 view plot 🚷 view threshold | 203.69 ns(+5.88%)Baseline: 192.38 ns | 236.31 ns (86.19%) |
| Command_Serde/unpack/delete_index | 📈 view plot 🚷 view threshold | 165.38 ns(+3.11%)Baseline: 160.40 ns | 200.32 ns (82.56%) |
| Command_Serde/unpack/set | 📈 view plot 🚷 view threshold | 296.13 ns(+9.39%)Baseline: 270.72 ns | 331.36 ns (89.37%) |
| Command_Serde/unpack/set_index | 📈 view plot 🚷 view threshold | 161.32 ns(+1.32%)Baseline: 159.21 ns | 197.56 ns (81.66%) |
| Payload_encryption/pack/remove_cmd | 📈 view plot 🚷 view threshold | 118.54 ns(+1.79%)Baseline: 116.45 ns | 141.46 ns (83.80%) |
| Payload_encryption/pack/set_cmd | 📈 view plot 🚷 view threshold | 253.91 ns(+23.68%)Baseline: 205.29 ns | 267.54 ns (94.90%) |
| Payload_encryption/unpack/remove_cmd | 📈 view plot 🚷 view threshold | 225.72 ns(+9.87%)Baseline: 205.45 ns | 258.26 ns (87.40%) |
| Payload_encryption/unpack/set_cmd | 📈 view plot 🚷 view threshold | 307.53 ns(+8.74%)Baseline: 282.81 ns | 351.79 ns (87.42%) |
| Raft_1Node_Latency/prefix/1node | 📈 view plot 🚷 view threshold | 2,600,400.00 ns(-5.98%)Baseline: 2,765,780.31 ns | 6,275,473.83 ns (41.44%) |
| Raft_1Node_Latency/read/1node | 📈 view plot 🚷 view threshold | 43,296.00 ns(+91.14%)Baseline: 22,651.12 ns | 70,580.01 ns (61.34%) |
| Raft_1Node_Latency/remove/1node | 📈 view plot 🚷 view threshold | 389,620.00 ns(-21.96%)Baseline: 499,261.56 ns | 1,386,266.44 ns (28.11%) |
| Raft_1Node_Latency/write/1node | 📈 view plot 🚷 view threshold | 419,750.00 ns(-30.12%)Baseline: 600,666.41 ns | 2,172,417.46 ns (19.32%) |
| build_snapshot/default | 📈 view plot 🚷 view threshold | 118,300.00 ns(+7.63%)Baseline: 109,916.30 ns | 145,973.15 ns (81.04%) |
| fernet token/project | 📈 view plot 🚷 view threshold | 1,451.50 ns(+4.62%)Baseline: 1,387.41 ns | 1,633.12 ns (88.88%) |
| get_data_keyspace | 📈 view plot 🚷 view threshold | 0.32 ns(+2.00%)Baseline: 0.31 ns | 0.37 ns (87.75%) |
| get_db | 📈 view plot 🚷 view threshold | 0.31 ns(-0.52%)Baseline: 0.31 ns | 0.37 ns (85.61%) |
| get_fernet_token_timestamp/project | 📈 view plot 🚷 view threshold | 142.11 ns(-1.06%)Baseline: 143.63 ns | 181.34 ns (78.37%) |
| get_keyspace | 📈 view plot 🚷 view threshold | 4.36 ns(-12.76%)Baseline: 5.00 ns | 10.66 ns (40.91%) |
Open
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.
Add /SCIM/v2/{domain_id}/Groups create/list/show/update/delete,
mirroring the Users vertical slice: ownership fencing, domain-wide
displayName uniqueness, and the same ScimApiError/ScimRealmAuth
scaffolding. Group.id stays server-assigned and externalId optional -
unlike Users, nothing federates in as a Group, so there's no
convergence hazard a deterministic id would solve.
New backend surface Groups didn't have at all before this: update_group
(+ GroupUpdate type), list_users_of_group (member hydration, mirrors
list_groups_of_user), and find_group_by_name_ci (mirrors
find_user_by_name_ci). PUT membership resync diffs the desired set
against list_users_of_group and applies it via the existing
add_users_to_groups/remove_user_from_group primitives.
Cross-realm membership fencing (ADR 0024 §7) and the 1000-member cap
(§11) are enforced before any mutation, on both create and update.
Delete neutralizes the group's role assignments and tombstones the
ScimResourceIndex without touching membership rows, matching the
forensic-retention rationale in §6.B.
Add policy/identity/scim/group/{create,list,show,update,delete}.rego
mirroring the Users policies, and 20 handler unit tests plus 8 new
identity-driver-sql tests for the new backend methods.
Assisted-by: Claude noreply@anthropic.com
Signed-off-by: Artem Goncharov artem.goncharov@gmail.com