Skip to content

providers/saml: show users a generic error message and log details; make translatable - #27013

Merged
PeshekDotDev merged 8 commits into
mainfrom
providers/saml-request-errors
Nov 16, 2026
Merged

PeshekDotDev merged 8 commits into
mainfrom
providers/saml-request-errors

Conversation

@PeshekDotDev

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Why is this change needed?

How was this tested?

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)
  • I have read the AI usage policy.

@PeshekDotDev PeshekDotDev self-assigned this Oct 19, 2026
@PeshekDotDev
PeshekDotDev requested a review from a team as a code owner October 19, 2026 07:20
@netlify

netlify Bot commented Oct 19, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit b23e1ea
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6ad5c4b782c79fb0cba2e36b
😎 Deploy Preview https://deploy-preview-27013--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.

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.46479% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.06%. Comparing base (c2e8995) to head (0832085).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
authentik/providers/saml/views/sso.py 15.38% 11 Missing ⚠️
authentik/common/saml/parsers/verify.py 33.33% 2 Missing ⚠️
authentik/providers/saml/views/sp_slo.py 86.66% 2 Missing ⚠️
authentik/common/saml/parsers/logout_response.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27013      +/-   ##
==========================================
+ Coverage   93.00%   93.06%   +0.05%     
==========================================
  Files        1238     1238              
  Lines       86559    86589      +30     
  Branches     4894     4894              
==========================================
+ Hits        80508    80584      +76     
+ Misses       5964     5918      -46     
  Partials       87       87              
Flag Coverage Δ
conformance 30.32% <12.67%> (+0.04%) ⬆️
e2e 34.96% <12.67%> (+0.32%) ⬆️
integration 27.83% <12.67%> (-0.01%) ⬇️
rust 51.12% <ø> (ø)
unit 94.59% <77.46%> (-0.01%) ⬇️
unit-migrate 94.60% <77.46%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

Download this run's HTML report and traces, then open the report:

gh run download 43910535703 -D playwright-artifacts
npx playwright show-report playwright-artifacts/playwright-report

Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-0832085b57626625b66d861f0da01beee65fb483
# Distroless image: AUTHENTIK_TAG=gh-0832085b57626625b66d861f0da01beee65fb483-distroless
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:

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-0832085b57626625b66d861f0da01beee65fb483
        # Distroless image: tag: gh-0832085b57626625b66d861f0da01beee65fb483-distroless

Afterwards, run the upgrade commands from the latest release notes.

Comment on lines +76 to +79
detail=(
f"ACS URL of {request_acs_url} doesn't match Provider "
f"ACS URL of {self.provider.acs_url}."
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

missing translation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

raise CannotHandleAssertion(ERROR_CANNOT_DECODE_REQUEST) from None
except ValueError as exc:
# covers binascii.Error (invalid base64) and UnicodeDecodeError (not UTF-8)
raise CannotHandleAssertion(ERROR_CANNOT_DECODE_REQUEST, detail=str(exc)) from None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(applies to all of these) just pass the exception directly instead of casting it to string

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Event.new(
EventAction.CONFIGURATION_ERROR,
provider=self.provider,
message=f"{message} {exc.detail}" if exc.detail else message,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use exception_to_dict instead of the string of the exception

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed but please verify

Comment thread authentik/providers/saml/views/sso.py Outdated
Event.new(
EventAction.CONFIGURATION_ERROR,
provider=self.provider,
message=f"{message} {exc.detail}" if exc.detail else message,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same with exception_to_dict

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed but please verify

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Oct 19, 2026
@PeshekDotDev
PeshekDotDev requested a review from BeryJu October 22, 2026 21:09
@PeshekDotDev
PeshekDotDev enabled auto-merge (squash) November 16, 2026 16:43
@PeshekDotDev
PeshekDotDev merged commit b37ff93 into main Nov 16, 2026
405 of 411 checks passed
@PeshekDotDev
PeshekDotDev deleted the providers/saml-request-errors branch November 16, 2026 17:48
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Nov 16, 2026
kensternberg-authentik added a commit that referenced this pull request Nov 17, 2026
* main: (158 commits)
  website/integrations: document ezbookkeeping username format (#27831)
  core: bump twilio from 9.12.0 to 9.13.0 (#27872)
  core: bump watchdog from 7.0.0 to 7.1.0 (#27876)
  core: bump ruff from 0.17.4 to 0.17.5 (#27870)
  core: bump importlib-metadata from 10.1.0 to 10.2.0 (#27875)
  core: bump cachetools from 7.3.0 to 7.3.1 (#27873)
  core: bump goauthentik/fips-python from `4ad62df` to `96730cd` in /lifecycle/container (#27868)
  core: bump goauthentik/fips-debian from `2c0f8e5` to `56dbb46` in /lifecycle/container (#27867)
  web: enable Danish (da-DK) locale (#26776)
  website/docs: add expiring users to release notes (#27860)
  enterprise/endpoints/connectors/agent: fix Platform SSO web login (#27858)
  providers/saml: show users a generic error message and log details; make translatable (#27013)
  core: bump psycopg[c,pool] from 3.3.8 to 3.3.9 (#27848)
  core: bump watchdog from 6.0.0 to 7.0.0 (#27846)
  core: bump hyper-unix-socket from 0.7.0 to 0.8.0 (#27845)
  core: bump library/node from 26.13.0-trixie-slim to 26.13.1-trixie-slim in /lifecycle/container (#27839)
  ci: bump getsentry/action-release from 3.7.2 to 3.8.0 (#27842)
  core: bump goauthentik/fips-python from `f4eb865` to `4ad62df` in /lifecycle/container (#27837)
  core: bump jsonpatch from 1.43 to 1.44 (#27843)
  core: bump types-ldap3 from 2.9.13.20260827 to 2.9.13.20261107 in the types group (#27836)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants