Repository navigation
stages/authenticator_validate: prevent WebAuthn challenge races - #26291
Conversation
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Related work: #22369 addresses the other half of the authenticator-validation issues found during this investigation. This PR is intentionally focused on concurrency and session races that can replace a pending WebAuthn challenge or overwrite flow progress. #22369 provides the broader validation-stage refactor, including server-side challenge lookup, per-device challenge lifecycles, prevention of cross-device-type response validation, and preventing WebAuthn stage loads or re-renders from decrementing the user reputation score. Once both are merged, they cover the race conditions and the validation-model and reputation issues independently. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26291 +/- ##
==========================================
+ Coverage 92.96% 93.01% +0.04%
==========================================
Files 1230 1230
Lines 85916 85989 +73
Branches 4894 4894
==========================================
+ Hits 79874 79979 +105
+ Misses 5955 5923 -32
Partials 87 87
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ddbdb8f to
657379e
Compare
…til it's answered Rendering the stage again, from another tab or a selection request, replaced the challenge an in-progress assertion was signed for. Reuse it instead, and remove it once validated, skipped, enrolled, or passed by identification. Co-authored-by: Jens Langhammer <[email protected]>
Selecting any other device has no effect on the server, but the request still re-renders the stage and races the actual response.
657379e to
485f964
Compare
* main: website/docs: dry run: move :ak-version to header (#27678) web: policy dry run UI (#26621) providers/oauth2: fix max_age=0 not forcing reauth (#27518) ci: bump pnpm/action-setup from 6.1.0 to 6.1.1 (#27666) core: bump oauthlib from 4.0.0 to 4.0.1 (#27658) core: bump psycopg[c,pool] from 3.3.6 to 3.3.7 (#27672) core: bump selenium from 4.51.0 to 4.52.0 (#27670) ci: bump helm/kind-action from 1.15.1 to 1.15.2 (#27667) ci: bump pnpm/action-setup from 6.1.0 to 6.1.1 in /.github/actions/setup (#27668) ci: bump the codeql group across 1 directory with 3 updates (#27665) ci: bump taiki-e/install-action from 2.89.1 to 2.90.0 in /.github/actions/setup (#27669) core: bump goauthentik/fips-python from `69e7058` to `b203e83` in /lifecycle/container (#27664) core: bump openapitools/openapi-generator-cli from v7.26.0 to v7.27.0 in /packages/client-go (#27661) stages/authenticator_validate: prevent WebAuthn challenge races (#26291) web/i18n: load the locale catalog before boot and remove msg() thunks (#27618)
Details
This PR keeps the pending WebAuthn challenge stable until it's answered. Closes #26986; complements #27395 and #25212.
Checklist
make all)make docs)