Skip to content

sources/saml: Set AuthnRequest ProtocolBinding to HTTP-POST instead of HTTP-Redirect - #17378

Merged
PeshekDotDev merged 2 commits into
goauthentik:mainfrom
ant-r-ih:fix-SAML-reesponse-binding
Jan 21, 2026
Merged

PeshekDotDev merged 2 commits into
goauthentik:mainfrom
ant-r-ih:fix-SAML-reesponse-binding

Conversation

@ikob

@ikob ikob commented Oct 10, 2025 •

Copy link
Copy Markdown
Contributor

Details

This patch aligns authentik’s SAML Source implementation with the SAML 2.0 specification.

In the SAML Source configuration, the SP metadata always declares the
AssertionConsumerService (ACS) binding as HTTP-POST, regardless of the
SingleSignOnService (SSO) binding. However, the actual AuthnRequest message
used the SSO binding as its ProtocolBinding attribute, resulting in
HTTP-Redirect being sent.

According to the OASIS SAML 2.0 specification, the HTTP-Redirect binding
MUST NOT be used for delivering the from the IdP to the SP:

Either the HTTP POST or HTTP Artifact binding can be used to transfer
the message to the service provider through the user agent.
The HTTP Redirect binding MUST NOT be used.

While many IdPs will still prefer the ACS binding declared in the SP metadata,
this change aligns the AuthnRequest with the SAML 2.0 specification.

Hopefully close Hopefully close REDIRECT case issue at the step 1 of #16627


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

@ikob
ikob requested a review from a team as a code owner October 10, 2025 07:20
@netlify

netlify Bot commented Oct 10, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit f56bbe0
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/68e8ba3e8b361e0008ad00e3

@netlify

netlify Bot commented Oct 10, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations canceled.

Name Link
🔨 Latest commit f56bbe0
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/68e8ba3e41a97c0008d4dc39

@netlify

netlify Bot commented Oct 10, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit f56bbe0
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/68e8ba3e18080f00083f5c0a

@codecov

codecov Bot commented Oct 10, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.06%. Comparing base (4816dc4) to head (f56bbe0).
⚠️ Report is 1247 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17378      +/-   ##
==========================================
+ Coverage   92.72%   93.06%   +0.33%     
==========================================
  Files         857      870      +13     
  Lines       46608    49538    +2930     
==========================================
+ Hits        43217    46102    +2885     
- Misses       3391     3436      +45     
Flag Coverage Δ
e2e 46.20% <66.66%> (+1.26%) ⬆️
integration 23.58% <0.00%> (+0.45%) ⬆️
unit 91.19% <100.00%> (+0.14%) ⬆️
unit-migrate 91.24% <100.00%> (+0.14%) ⬆️

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.

Signed-off-by: Katsushi Kobayashi <[email protected]>
@ikob ikob closed this Oct 16, 2025
@ikob
ikob deleted the fix-SAML-reesponse-binding branch October 16, 2025 05:26
@ikob
ikob restored the fix-SAML-reesponse-binding branch October 18, 2025 03:47
@ikob ikob reopened this Oct 18, 2025
@tfc

tfc commented Dec 11, 2025

Copy link
Copy Markdown

Hey @ikob is this here fixing #16627 ? If yes - what can I do to help push this further?

@ikob

ikob commented Dec 22, 2025

Copy link
Copy Markdown
Contributor Author

Sorry for late response.

Hey @ikob is this here fixing #16627 ? If yes - what can I do to help push this further?

Partially yes as mentioned other PR.

Also, there is a workaround to set BindingType to Post-* instead of Redirect binding, if the IdP supports POST binding.

@PeshekDotDev PeshekDotDev self-assigned this Jan 21, 2026

@PeshekDotDev PeshekDotDev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome catch, thank you @ikob!

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Jan 21, 2026
@PeshekDotDev PeshekDotDev added the backport/version-2025.12 Add this label to PRs to backport changes to version-2025.12 label Jan 21, 2026
@PeshekDotDev
PeshekDotDev merged commit 6057b29 into goauthentik:main Jan 21, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jan 21, 2026
authentik-automation Bot pushed a commit that referenced this pull request Jan 21, 2026
…f HTTP-Redirect (#17378)

* Use HTTP-POST instead of HTTP-Redirect for ProtocolBinding attribute in AuthnRequest

* Fix nits

Signed-off-by: Katsushi Kobayashi <[email protected]>

---------

Signed-off-by: Katsushi Kobayashi <[email protected]>
@authentik-automation

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2025.12 created: #19649

kensternberg-authentik added a commit that referenced this pull request Jan 21, 2026
…experiment

* main:
  sources/saml: properly catch InvalidSignature exception (#19641)
  sources/saml: Set AuthnRequest ProtocolBinding to HTTP-POST instead of HTTP-Redirect (#17378)
  website/docs: update endpoint agent windows log location (#19645)
  core: bump library/node from 25.3.0-trixie to 25.4.0-trixie in /website (#19632)
  core, web: update translations (#19535)
  core: bump github.com/pires/go-proxyproto from 0.8.1 to 0.9.0 (#19628)
  core: bump django-stubs[compatible-mypy] from 5.2.8 to 5.2.9 (#19629)
  web: bump @types/react from 19.2.8 to 19.2.9 in /web in the react group across 1 directory (#19631)
  core: bump sentry-sdk from 2.49.0 to 2.50.0 (#19630)
  website/integrations: update qnap (#19644)
  website/docs: Update saml google workspace guide (#19624)
  web/elements: reduce spacing between collapsible form groups (#19627)
  web/forms: fix forms not resetting state when modal closes (#19562)
  web/user: fix Firefox for Android infinite render loop in user library (#19379)
BeryJu pushed a commit that referenced this pull request Jan 22, 2026
…f HTTP-Redirect (cherry-pick #17378 to version-2025.12) (#19649)

sources/saml: Set AuthnRequest ProtocolBinding to HTTP-POST instead of HTTP-Redirect (#17378)

* Use HTTP-POST instead of HTTP-Redirect for ProtocolBinding attribute in AuthnRequest

* Fix nits



---------

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

Labels

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

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants