-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
Given a SAML application with POST binding, the POST request back to the service provider carrying the SamlResponse is submitted twice on Chromium browsers in rapid succession. We have been able to replicate it with Edge, Chrome and Chromium on most recent versions.
How to reproduce
- Set up a SAML Provider with a POST binding
- Execute authentication flow in a chromium based browser
- Observe a double POST redirect in Network tab under developer tools
Expected behavior
A single POST request being sent out
Screenshots
Additional context
The root cause seems to be an incorrect use of a lit lifecycle hook updated in ak-stage-autosubmit which triggers twice under some conditions.
authentik/web/src/flow/stages/autosubmit/AutosubmitStage.ts
Lines 28 to 34 in a0fe677
| updated(changed: PropertyValues<this>): void { | |
| super.updated(changed); | |
| if (this.challenge.url !== undefined) { | |
| this.form?.submit(); | |
| } | |
| } |
Depending on network latency and the DOM interaction that first POST may fully be transmitted before it gets cancelled by the second POST. Our service provider rejects authentication attempts when it sees a SamlResponse being replayed, so whenever the race condition is complete it results in failed authentication attempts sporadically for us.
Deployment Method
Other (please specify)
Version
2025.10.2
Relevant log output
N/A