Skip to content

Conversation

@ikob
Copy link
Contributor

@ikob ikob commented Nov 16, 2025

Details

When a SAML Response is encrypted, signature verification may fail because it is performed after decryption, when the original signed structure has changed.
This PR moves the verification step for signed responses to before decryption to handle encrypted signed responses correctly.
For backward compatibility, the post-decryption check remains as a fallback.

Hopefully close 405 errors at the step 4 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)

authentik-automation bot and others added 22 commits October 20, 2025 23:43
…ntik#17607 to version-2025.10) (goauthentik#17620)

website: fix active menu link background overlap (goauthentik#17607)

Co-authored-by: Dominic R <[email protected]>
…ion-2025.10) (goauthentik#17627)

Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
…y-pick goauthentik#17625 to version-2025.10) (goauthentik#17626)

ci: use forked release action to deal with large release notes (goauthentik#17625)

* ci: use forked release action to deal with large release notes



* bump build



---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
…ry-pick goauthentik#17606 to version-2025.10) (goauthentik#17637)

enterprise: add prometheus metrics for license usage and expiry (goauthentik#17606)

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
…y-pick goauthentik#17641 to version-2025.10) (goauthentik#17652)

website/docs: rel notes 2025.10: add 3 more integration guides (goauthentik#17641)

* add 3 more int guides

* Apply suggestion from @dominic-r



* is github's suggestion thingy usually this buggy

---------

Signed-off-by: Dominic R <[email protected]>
Co-authored-by: Tana M Berry <[email protected]>
Co-authored-by: Tana M Berry <[email protected]>
Co-authored-by: Dominic R <[email protected]>
…ik#17650 to version-2025.10) (goauthentik#17651)

providers/proxy: drop headers with underscores (goauthentik#17650)

drop any headers with underscores that we set in the remote system

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
…hentik#17657 to version-2025.10) (goauthentik#17672)

website/docs: add note about invite link not bound (goauthentik#17657)

* invite link not bound

* marcelo's truth

* jens tweak

---------

Co-authored-by: Tana M Berry <[email protected]>
Co-authored-by: Tana M Berry <[email protected]>
…hentik#17642 to version-2025.10) (goauthentik#17699)

website/docs: eap add info about custom validation (goauthentik#17642)

* add info about custom validation

* tweaked table

* remove bullet

* remove other bullet

---------

Co-authored-by: Tana M Berry <[email protected]>
Co-authored-by: Tana M Berry <[email protected]>
…oauthentik#17628 to version-2025.10) (goauthentik#17633)

website/docs: add short-lived certificate recommendation (goauthentik#17628)

Add certificate recommendation

Co-authored-by: Dewi Roberts <[email protected]>
…k#17704 to version-2025.10) (goauthentik#17708)

website/docs: blueprints: add a bit more info (goauthentik#17704)

* website/docs: blueprints: add a bit more info

* this might be worth mentioning

* fix

* a bit more info

Co-authored-by: Dominic R <[email protected]>
… to version-2025.10) (goauthentik#17730)

enterprise: handle cached naive timezone (goauthentik#17695)

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
…to version-2025.10) (goauthentik#17732)

website/docs: update flow context ref (goauthentik#17723)

* website/docs: update flow context ref



* format



* Update website/docs/add-secure-apps/flows-stages/flow/context/index.mdx




* Update website/docs/add-secure-apps/flows-stages/flow/context/index.mdx




---------

Signed-off-by: Jens Langhammer <[email protected]>
Signed-off-by: Jens L. <[email protected]>
Co-authored-by: Jens L. <[email protected]>
Co-authored-by: Dominic R <[email protected]>
Co-authored-by: Tana M Berry <[email protected]>
…#17728 to version-2025.10) (goauthentik#17733)

website/docs: finalise 2025.10 release notes (goauthentik#17728)

* website/docs: finalise 2025.10 release notes



* format



---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
@ikob ikob requested a review from a team as a code owner November 16, 2025 04:43
@ikob ikob requested a review from rissson November 16, 2025 04:43
@netlify
Copy link

netlify bot commented Nov 16, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 5a34eb4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69339987a2c63d0008c419ac
😎 Deploy Preview https://deploy-preview-18176--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.

@netlify
Copy link

netlify bot commented Nov 16, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 5a34eb4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6933998722b0030008641a38
😎 Deploy Preview https://deploy-preview-18176--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
Copy link

netlify bot commented Nov 16, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 5a34eb4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69339987473fff0008269fdb
😎 Deploy Preview https://deploy-preview-18176--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.

@codecov
Copy link

codecov bot commented Nov 16, 2025

Codecov Report

❌ Patch coverage is 4.68750% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.49%. Comparing base (dbbfb3c) to head (5a34eb4).

Files with missing lines Patch % Lines
authentik/sources/saml/processors/response.py 2.38% 41 Missing ⚠️
authentik/sources/saml/tests/test_response.py 9.09% 20 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (dbbfb3c) and HEAD (5a34eb4). Click for more details.

HEAD has 23 uploads less than BASE
Flag BASE (dbbfb3c) HEAD (5a34eb4)
e2e 8 3
unit 10 2
unit-migrate 10 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #18176       +/-   ##
===========================================
- Coverage   93.22%   55.49%   -37.73%     
===========================================
  Files         933      933               
  Lines       51227    51264       +37     
===========================================
- Hits        47754    28450    -19304     
- Misses       3473    22814    +19341     
Flag Coverage Δ
e2e 39.87% <1.56%> (-4.86%) ⬇️
integration 22.74% <0.00%> (-0.07%) ⬇️
unit 52.77% <4.68%> (-38.66%) ⬇️
unit-migrate ?

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.

@rissson rissson requested a review from PeshekDotDev November 24, 2025 15:08
@rissson rissson moved this from Todo to Needs review in authentik Core Nov 24, 2025
@rissson rissson changed the title sources/SAML: move SAML Response signature verification before decryption sources/saml: move SAML Response signature verification before decryption Nov 25, 2025
Copy link
Contributor

@PeshekDotDev PeshekDotDev left a comment

Choose a reason for hiding this comment

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

Can you also add a couple comments just saying "This is the fallback verification", etc?

Really appreciate you getting to this @ikob

@github-project-automation github-project-automation bot moved this from Needs review to In Progress in authentik Core Dec 2, 2025
ikob and others added 7 commits December 4, 2025 15:08
We need some more test fixtures for fixing it.

Co-authored-by: Connor Peshek <[email protected]>
Signed-off-by: Katsushi Kobayashi <[email protected]>
…ion-2025.10) (goauthentik#17627)

Co-authored-by: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants