feat: Allow a returned claim to have a list of alternative fully qualified user ids to check on login - #107
feat: Allow a returned claim to have a list of alternative fully qualified user ids to check on login#107jason-famedly wants to merge 7 commits into
Conversation
…s are also declared and test
…ified user ids to check on login
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
+ Coverage 84.55% 85.51% +0.96%
==========================================
Files 13 13
Lines 900 953 +53
Branches 163 176 +13
==========================================
+ Hits 761 815 +54
+ Misses 85 84 -1
Partials 54 54
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 599638e. Configure here.
| ) | ||
| elif jwt_fq_uid is None or intro_fq_uid is None: | ||
| # Let whichever is not None win | ||
| fully_qualified_uid = jwt_fq_uid or intro_fq_uid |
There was a problem hiding this comment.
One list can authorize both sources
Medium Severity
When both JWT and introspection set alternative_fq_uids_path, a username missing from one list still logs in if the other list contains it. Helpers return None for a non-matching list, and the caller then lets the other source win, so the two lists are not required to agree.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 599638e. Configure here.
the things we do sometimes, I swear :rolling_eyes:


SYN-126
Add support for
alternative_fq_uids_pathoption in bothjwt_validationandintrospection_validation. This takes aPaththat can point into either claim to resolve to a list of fully qualified user ids.If the claim does not contain a list, there will be a failure.
If using
alternative_fq_uids_pathin either validation section, thenlocalpart_pathandfq_uid_pathcan not be used anywhere as that is also a failure.See README file updates for full details.