Skip to content

providers/scim: fix scim user conflict resolution - #25998

Merged
BeryJu merged 2 commits into
goauthentik:mainfrom
ryanpesek:fix-scim-user-conflict-resolution
Sep 10, 2026
Merged

BeryJu merged 2 commits into
goauthentik:mainfrom
ryanpesek:fix-scim-user-conflict-resolution

Conversation

@ryanpesek

@ryanpesek ryanpesek commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Fixes SCIM user conflict recovery by normalizing the top-level list response before reading its resources.
Adds regression tests for both standard Resources and lowercase resources response keys.

Why is this change needed?

When POST /Users returns HTTP 409, authentik searches for the existing remote user. The response handling normalized the resources list instead of the response dictionary, causing recovery to either miss the user or raise AttributeError. This issue was introduced in #24441 and present in 2026.8.0+ and 2026.5.7

How was this tested?

  • Added conflict-recovery tests for both supported key casings.

Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)
  • I have read the AI usage policy.

@ryanpesek
ryanpesek requested a review from a team as a code owner September 10, 2026 02:50
@netlify

netlify Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 6a3e529
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6aa2b39b840c930008555ccb
😎 Deploy Preview https://deploy-preview-25998--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.83%. Comparing base (8c8bd38) to head (6a3e529).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25998      +/-   ##
==========================================
- Coverage   91.86%   91.83%   -0.03%     
==========================================
  Files        1169     1169              
  Lines       75451    75469      +18     
  Branches     4054     4054              
==========================================
- Hits        69310    69308       -2     
- Misses       6099     6119      +20     
  Partials       42       42              
Flag Coverage Δ
conformance 33.74% <0.00%> (-0.01%) ⬇️
e2e 38.43% <0.00%> (-0.01%) ⬇️
integration 30.01% <0.00%> (-0.46%) ⬇️
rust 42.92% <ø> (ø)
unit 93.42% <100.00%> (+0.01%) ⬆️
unit-migrate 93.45% <100.00%> (+0.01%) ⬆️

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

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

@BeryJu
BeryJu merged commit 82ca019 into goauthentik:main Sep 10, 2026
137 checks passed
@dewi-tik dewi-tik added backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8 labels Sep 10, 2026
@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.5 created: #26024

@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.8 created: #26025

BeryJu added a commit that referenced this pull request Sep 21, 2026
…to version-2026.8) (#26025)

providers/scim: fix scim user conflict resolution (#25998)

fix scim user conflict resolution

Co-authored-by: Ryan Pesek <[email protected]>
Co-authored-by: Jens L. <[email protected]>
Co-authored-by: Dominic Roy <[email protected]>
GirlBossRush pushed a commit that referenced this pull request Nov 28, 2026
fix scim user conflict resolution

Co-authored-by: Jens L. <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants