-
-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sources/scim: fix user creation (duplicate userName) #12547
sources/scim: fix user creation (duplicate userName) #12547
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12547 +/- ##
==========================================
+ Coverage 92.69% 92.78% +0.08%
==========================================
Files 770 769 -1
Lines 38873 38879 +6
==========================================
+ Hits 36033 36073 +40
+ Misses 2840 2806 -34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jens Langhammer <[email protected]>
* sources/scim: fix user creation (duplicate userName) * sources/scim: add test case (duplicate username) * Formatting * simplify query with Q Signed-off-by: Jens Langhammer <[email protected]> --------- Signed-off-by: Jens Langhammer <[email protected]> Co-authored-by: Jens Langhammer <[email protected]>
Details
According to the SCIM standard both
id
anduserName
must be unique.The current behaviour only rejects duplicate
id
s, and this PR fixes it.A new test case has been added:
test_user_create_duplicate_by_username
, and run.Results from https://scimvalidator.microsoft.com/ have been saved and replayed for local testing.
Checklist
sudo poetry run python -m manage test authentik/sources/scim/tests/test_users.py
)make lint-fix
)