goauthentik / authentik

The authentication glue you need.
https://goauthentik.io
Other
13.67k stars 916 forks source link

core: fix source_flow_manager throwing error when authenticated user attempts to re-authenticate with existing link #12080

Closed BeryJu closed 2 days ago

BeryJu commented 2 days ago

Details

In previous versions we used to save the connection earlier which caused an Integrity Error which was caused and did a root redirect, however this was refactored to save the connection later and as such we don't redirect and don't catch the exception for this one specific user flow.

This user flow was also not tested, as it was assumed that the user would only authenticate with their source connection when they're not already authenticated, however this is something that might happen accidentally


Checklist

If an API change has been made

If changes to the frontend have been made

If applicable

netlify[bot] commented 2 days ago

Deploy Preview for authentik-storybook canceled.

Name Link
Latest commit 8933eff17266bf1b8d31b32c93056a49bc484b09
Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/673cbe33d2a9560008640f93
netlify[bot] commented 2 days ago

Deploy Preview for authentik-docs canceled.

Name Link
Latest commit 8933eff17266bf1b8d31b32c93056a49bc484b09
Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/673cbe33614a9c0008f7b960
codecov[bot] commented 2 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.60%. Comparing base (9e96f19) to head (8933eff). Report is 3 commits behind head on main.

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #12080 +/- ## ========================================== - Coverage 92.60% 92.60% -0.01% ========================================== Files 761 761 Lines 37916 37929 +13 ========================================== + Hits 35112 35124 +12 - Misses 2804 2805 +1 ``` | [Flag](https://app.codecov.io/gh/goauthentik/authentik/pull/12080/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goauthentik) | Coverage Δ | | |---|---|---| | [e2e](https://app.codecov.io/gh/goauthentik/authentik/pull/12080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goauthentik) | `49.09% <7.69%> (-0.02%)` | :arrow_down: | | [integration](https://app.codecov.io/gh/goauthentik/authentik/pull/12080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goauthentik) | `24.85% <0.00%> (-0.01%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/goauthentik/authentik/pull/12080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goauthentik) | `90.19% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goauthentik#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

BeryJu commented 2 days ago

/cherry-pick version-2024.10

github-actions[bot] commented 2 days ago

authentik PR Installation instructions

Instructions for docker-compose Add the following block to your `.env` file: ```shell AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server AUTHENTIK_TAG=gh-8933eff17266bf1b8d31b32c93056a49bc484b09 AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s ``` For arm64, use these values: ```shell AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server AUTHENTIK_TAG=gh-8933eff17266bf1b8d31b32c93056a49bc484b09-arm64 AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s ``` Afterwards, run the upgrade commands from the latest release notes.
Instructions for Kubernetes Add the following block to your `values.yml` file: ```yaml 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-8933eff17266bf1b8d31b32c93056a49bc484b09 ``` For arm64, use these values: ```yaml 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-8933eff17266bf1b8d31b32c93056a49bc484b09-arm64 ``` Afterwards, run the upgrade commands from the latest release notes.