Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sia-mfierro
Copy link

@sia-mfierro sia-mfierro commented Jan 3, 2025

Details

According to the SCIM standard both id and userName must be unique.
The current behaviour only rejects duplicate ids, 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

  • Local tests pass (sudo poetry run python -m manage test authentik/sources/scim/tests/test_users.py)
  • The code has been formatted (make lint-fix)

@sia-mfierro sia-mfierro requested a review from a team as a code owner January 3, 2025 07:12
Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit eab1f0e
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/67778dc9167d210008d1a54b

Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit eab1f0e
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/67778dc98b3c7e00084bf0fb

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.79%. Comparing base (bdf4236) to head (eab1f0e).
Report is 44 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12547      +/-   ##
==========================================
+ Coverage   92.69%   92.79%   +0.09%     
==========================================
  Files         770      770              
  Lines       38873    38885      +12     
==========================================
+ Hits        36033    36082      +49     
+ Misses       2840     2803      -37     
Flag Coverage Δ
e2e 48.74% <7.69%> (+0.14%) ⬆️
integration 24.57% <0.00%> (-0.01%) ⬇️
unit 90.41% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants