Repository navigation
Support bracketed list strings in OIDC teams claim - #7467
Merged
Merged
Conversation
Some identity providers can only put strings into custom claims. For example, groups federated through AWS Cognito arrive in a custom attribute as "[uuid1, uuid2, uuid3]". Splitting that on commas left the brackets on the first and last team names, so those teams never matched, and "[]" turned into a team named "[]". Strip one pair of surrounding square brackets before splitting a string teams claim. Signed-off-by: Akhil CH <[email protected]>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
🟢 Coverage 100.00% diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage (70.00%) Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (97aa8e5) 45808 40203 87.76% Head commit (d84f849) 45812 (+4) 40207 (+4) 87.77% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#7467) 5 5 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
nscuro
approved these changes
Sep 27, 2026
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.
Description
String values of the OIDC teams claim are already split on commas, but some identity providers wrap the list in square brackets. Groups federated through AWS Cognito, for example, arrive as
"[uuid1, uuid2, uuid3]". The brackets stayed on the first and last team names, so those teams never matched. This strips one pair of surrounding brackets before splitting.Addressed Issue
Closes #3908
Additional Details
I kept the existing auto-detection rather than adding a strategy flag, since string claims are already handled without extra config. Only a bracket pair that wraps the whole value is removed, so something like
[foois left alone."[]"now gives an empty list, same as"", instead of a team named[].The
dt.oidc.teams-claimdescription inapplication.propertiesis updated too, since the generated configuration docs come from there.Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR introduces changes to the database model, and I have updated the migration changelog accordinglyThis PR is a substantial change (per the ADR criteria), and I have added an ADR underdocs/adr/