providers/saml: send logoutResponse on sp-init logout#17691
providers/saml: send logoutResponse on sp-init logout#17691PeshekDotDev merged 13 commits intomainfrom
Conversation
✅ Deploy Preview for authentik-docs canceled.
|
✅ Deploy Preview for authentik-integrations canceled.
|
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17691 +/- ##
==========================================
- Coverage 93.23% 93.20% -0.04%
==========================================
Files 968 971 +3
Lines 53567 54053 +486
==========================================
+ Hits 49945 50380 +435
- Misses 3622 3673 +51
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-afe9b73f82be2eeb369d5fc100fd61e2c46e1210
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-afe9b73f82be2eeb369d5fc100fd61e2c46e1210Afterwards, run the upgrade commands from the latest release notes. |
50b9b38 to
9947850
Compare
a2403c8 to
836c410
Compare
| const messageKey = this.challenge.samlResponse ? "response" : "request"; | ||
| return html`<ak-flow-card .challenge=${this.challenge} loading> | ||
| <span slot="title" | ||
| >${msg(str`Posting logout request to SAML provider: ${providerName}`)}</span | ||
| >${msg( | ||
| str`Posting logout ${messageKey} to SAML provider: ${providerName}`, | ||
| )}</span |
There was a problem hiding this comment.
Should be separate strings instead to better support translation (for the messageKey
| interface LogoutURLData { | ||
| url: string; | ||
| saml_request?: string; | ||
| saml_response?: string; | ||
| relay_state?: string; | ||
| provider_name?: string; | ||
| binding?: string; | ||
| } |
There was a problem hiding this comment.
This shouldn't need to be defined manually, they should come from the API schema
class LogoutURL(PassiveSerializer):
url = CharField()
[ ... ]
class IframeLogoutChallenge(Challenge):
"""Challenge for iframe logout"""
component = CharField(default="ak-provider-iframe-logout")
logout_urls = ListField(child=LogoutURL(), default=list)
There was a problem hiding this comment.
enum LogoutStatusStatus {
"pending" , "success" , "error",
}
interface LogoutStatus {
providerName: string;
status: LogoutStatusStatus;
}
mainly for the switch case to complain when it's not exhaustive
| firstUpdated(changed: PropertyValues<this>): void { | ||
| super.firstUpdated(changed); | ||
|
|
||
| if (this.challenge.url !== undefined) { |
There was a problem hiding this comment.
| if (this.challenge.url !== undefined) { | |
| if (changed.has("challenge") && this.challenge.url !== undefined) { |
There was a problem hiding this comment.
disclaimer: my solution, not @goauthentik/frontend approved
There was a problem hiding this comment.
| component = CharField(default="ak-provider-saml-native-logout") | |
| provider_name = CharField() | |
| url = CharField() | |
| binding = CharField() # If possible, choice field | |
| saml_request = CharField(required=False) | |
| saml_response = CharField(required=False) | |
| relay_state = CharField(required=False) | |
| is_complete = BooleanField(default=False) |
Signed-off-by: Connor Peshek <connor@connorpeshek.me>
authentik/providers/iframe_logout.py
Outdated
| class SAMLLogoutURL(LogoutURL): | ||
| """SAML-specific logout URL data""" | ||
|
|
||
| saml_request = CharField(required=False, allow_null=True) | ||
| saml_response = CharField(required=False, allow_null=True) | ||
| saml_relay_state = CharField(required=False, allow_null=True) | ||
|
|
There was a problem hiding this comment.
For the time being we can just do a single class actually
* main: (59 commits) website/docs: 2025.12.4 release notes (#20226) website/docs: 2025.10.4 release notes (#20242) security: CVE-2026-25748 (#20240) security: CVE-2026-25922 (#20241) security: CVE-2026-25227 (#20239) ci: fix release testing (#20207) core: Apply CSpell corrections. (#20191) core: bump goauthentik.io/api/v3 to 3.2026.5.0-rc1-1770842608 (#20213) core, web: update translations (#20215) core: bump library/node from 25.6.0-trixie to 25.6.1-trixie in /website (#20220) core: bump google-api-python-client from 2.189.0 to 2.190.0 (#20217) core: bump webauthn from 2.7.0 to 2.7.1 (#20218) ci: bump docker/build-push-action from 6.18.0 to 6.19.1 (#20221) website/integrations: Update Komga instructions to add "email_verified" attribute to "email" claim. (#20135) website: Apply CSpell corrections. (#20189) providers/saml: send logoutResponse on sp-init logout (#17691) website/docs: ssf: update SSF documentation (#20195) website/docs: draft of new WS-Fed provider docs (#20091) website/docs: add email verification scope doc (#20141) website/docs: correct reference to overriden S3 variable (#20156) ...
* main: (59 commits) website/docs: 2025.12.4 release notes (#20226) website/docs: 2025.10.4 release notes (#20242) security: CVE-2026-25748 (#20240) security: CVE-2026-25922 (#20241) security: CVE-2026-25227 (#20239) ci: fix release testing (#20207) core: Apply CSpell corrections. (#20191) core: bump goauthentik.io/api/v3 to 3.2026.5.0-rc1-1770842608 (#20213) core, web: update translations (#20215) core: bump library/node from 25.6.0-trixie to 25.6.1-trixie in /website (#20220) core: bump google-api-python-client from 2.189.0 to 2.190.0 (#20217) core: bump webauthn from 2.7.0 to 2.7.1 (#20218) ci: bump docker/build-push-action from 6.18.0 to 6.19.1 (#20221) website/integrations: Update Komga instructions to add "email_verified" attribute to "email" claim. (#20135) website: Apply CSpell corrections. (#20189) providers/saml: send logoutResponse on sp-init logout (#17691) website/docs: ssf: update SSF documentation (#20195) website/docs: draft of new WS-Fed provider docs (#20091) website/docs: add email verification scope doc (#20141) website/docs: correct reference to overriden S3 variable (#20156) ...
Details
This PR automatically sends a logoutResponse when logging out of a samlprovider via the SP
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)