Skip to content

providers/saml: skip empty authorization flows for saml providers - #25417

Merged
jsachs merged 3 commits into
goauthentik:mainfrom
ryanpesek:saml-skip-empty-authorization-flow
Dec 1, 2026
Merged

jsachs merged 3 commits into
goauthentik:mainfrom
ryanpesek:saml-skip-empty-authorization-flow

Conversation

@ryanpesek

Copy link
Copy Markdown
Contributor

Summary

Skip flow execution for SAML providers whose authorization flow has no configured stages.

Empty authorization flows now return the SAML POST or Redirect response directly. Providers with configured authorization stages continue through the normal flow executor.

When continuous login is enabled:

  • For an empty authorization flow, release the tab lock after authentication completes.
  • For a non-empty authorization flow, retain the tab lock until authorization completes.

Testing

Added backend coverage for empty and configured authorization flows, including POST, Redirect, and continuous login scenarios. Added frontend coverage for continuous login tab-lock behavior.

Linked issues

Closes #24878


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 review from a team as code owners August 23, 2026 22:34
@netlify

netlify Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 65d59d2
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6b0f375e7060bae11502e9be
😎 Deploy Preview https://deploy-preview-25417--authentik-storybook.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.

@netlify

netlify Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 7b581a3
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6b0f05bb5b67d3220443dfe1
😎 Deploy Preview https://deploy-preview-25417--authentik-integrations.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.

@netlify

netlify Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 7b581a3
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6b0f05bbfe1a7e498ca655dc
😎 Deploy Preview https://deploy-preview-25417--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 Aug 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.21260% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.77%. Comparing base (b7ca3be) to head (65d59d2).

Files with missing lines Patch % Lines
authentik/providers/saml/views/flows.py 88.88% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25417      +/-   ##
==========================================
- Coverage   93.78%   93.77%   -0.01%     
==========================================
  Files        1262     1262              
  Lines       91440    91680     +240     
  Branches     5752     5752              
==========================================
+ Hits        85754    85972     +218     
- Misses       5600     5622      +22     
  Partials       86       86              
Flag Coverage Δ
conformance 29.21% <12.20%> (-0.02%) ⬇️
e2e 33.64% <15.74%> (+<0.01%) ⬆️
integration 26.56% <4.72%> (-0.37%) ⬇️
rust 62.37% <ø> (ø)
unit 94.99% <98.81%> (+0.03%) ⬆️
unit-migrate 94.99% <98.81%> (+0.03%) ⬆️

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.

Comment thread authentik/providers/saml/views/sso.py Resolved
Comment thread authentik/providers/saml/views/flows.py Resolved
Comment thread authentik/flows/planner.py Resolved
@ryanpesek

Copy link
Copy Markdown
Contributor Author

Besides the review fixes, I also fixed two CI failures the PR already had, in dc44013 and e19aa1f: the generated TypeScript client now matches the generator's output, and the test file is formatted with black. And I merged main in 3c4ff3e to resolve the conflicts. RedirectStage keeps main's best-effort try/catch around the multi-tab calls, and stage_ok() keeps main's inspector_accessible() check for the history entry.

@GirlBossRush
GirlBossRush force-pushed the saml-skip-empty-authorization-flow branch from 7b581a3 to 85f9c6d Compare December 1, 2026 18:15
@GirlBossRush
GirlBossRush requested a review from a team as a code owner December 1, 2026 18:15
@GirlBossRush GirlBossRush added the backport/version-2026.11 Add this label to PRs to backport changes to version-2026.11 label Dec 1, 2026
@GirlBossRush GirlBossRush added this to the Release 2026.11.0 milestone Dec 1, 2026
@jsachs
jsachs merged commit 626779a into goauthentik:main Dec 1, 2026
164 checks passed
@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.11 created: #28390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.11 Add this label to PRs to backport changes to version-2026.11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SAML Provider: Special case for form_post when flow is skipped

4 participants