Repository navigation
providers/saml: handle XML declarations in unified endpoint (cherry-pick #22455 to version-2026.5) - #22539
Conversation
* providers/saml: handle XML declarations in unified endpoint The unified SAML endpoint decodes redirect-binding payloads to a Unicode string and then passes that string to lxml. When an SP sends an XML declaration with an encoding, lxml raises before authentik can detect whether the message is an AuthnRequest or LogoutRequest, and the endpoint reports an unknown SAML message type. Encode decoded redirect payloads back to bytes before XML parsing so lxml can honor the declaration. Add regression coverage for redirect-binding AuthnRequest and LogoutRequest payloads with XML declarations. Validation: .venv/bin/python -m pytest authentik/providers/saml/tests/test_views_unified.py; uv run ruff check authentik/providers/saml/views/unified.py authentik/providers/saml/tests/test_views_unified.py Agent-thread: https://sdko.org/internal/threads/019e3d5c-1579-7533-813c-1d7da8b7b01b Co-authored-by: Agent <[email protected]> * providers/saml: Use fixtures for unified request tests Move the inline SAML request XML into fixtures so the unified endpoint tests use reusable request bodies while preserving XML declaration coverage. Agent-thread: https://sdko.org/internal/threads/019e431d-86e3-7200-8079-e8bcb390183b Co-authored-by: Agent <[email protected]> --------- Co-authored-by: Agent <[email protected]>
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## version-2026.5 #22539 +/- ##
===============================================
Coverage 93.29% 93.29%
===============================================
Files 1032 1033 +1
Lines 60061 60074 +13
Branches 400 400
===============================================
+ Hits 56031 56045 +14
+ Misses 4030 4029 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-87f4ee6b54a60132e2f71718c7c65fd84c19f04b
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-87f4ee6b54a60132e2f71718c7c65fd84c19f04bAfterwards, run the upgrade commands from the latest release notes. |
Cherry-pick of #22455 to
version-2026.5branch.Original PR: #22455
Original Author: @dominic-r
Cherry-picked commit: 495076a