Skip to content

providers/oauth: Properly return error via post and for request objects - #23037

Merged
PeshekDotDev merged 7 commits into
mainfrom
oidc-form-post-error
Jun 29, 2026
Merged

PeshekDotDev merged 7 commits into
mainfrom
oidc-form-post-error

Conversation

@PeshekDotDev

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Previously all authorization errors were returned as a fragment or redirect with the error in the query params, now we return some errors via form post. This is a requirement for OIDC certification.

We also parse request objects just enough to properly reject them, which is also a requirement for OIDC certification.

Why is this change needed?

Withouth this, we do not meet certain oidc requirements.

How was this tested?

Via test suite and openid.net cert testing suite

Linked issues


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@PeshekDotDev PeshekDotDev self-assigned this Jun 12, 2026
@PeshekDotDev PeshekDotDev added the backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 label Jun 12, 2026
@netlify

netlify Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit dc9cb7e
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a30aaf27ae77c0008895aac
😎 Deploy Preview https://deploy-preview-23037--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 Jun 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.25%. Comparing base (6df2261) to head (01608a2).
⚠️ Report is 313 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
authentik/providers/oauth2/errors.py 54.54% 5 Missing ⚠️
authentik/providers/oauth2/views/authorize.py 90.90% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23037      +/-   ##
==========================================
- Coverage   93.27%   93.25%   -0.03%     
==========================================
  Files        1032     1038       +6     
  Lines       60196    60749     +553     
  Branches      400      400              
==========================================
+ Hits        56150    56652     +502     
- Misses       4046     4097      +51     
Flag Coverage Δ
conformance 36.33% <75.00%> (-0.20%) ⬇️
e2e 41.52% <36.36%> (-0.27%) ⬇️
integration 32.77% <15.90%> (-0.20%) ⬇️
rust 0.00% <ø> (ø)
unit 92.28% <61.36%> (+0.07%) ⬆️
unit-migrate 92.31% <61.36%> (+0.07%) ⬆️

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.

@netlify

netlify Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit dc9cb7e
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a30aaf2a5898000086155eb
😎 Deploy Preview https://deploy-preview-23037--authentik-integrations.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.

@netlify

netlify Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit dc9cb7e
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a30aaf206a1d90008d144cf
😎 Deploy Preview https://deploy-preview-23037--authentik-storybook.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.

@github-actions

github-actions Bot commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-e1432e1c46e535d9265931f1b77ba6d3e893aa75
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-e1432e1c46e535d9265931f1b77ba6d3e893aa75

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

@PeshekDotDev
PeshekDotDev marked this pull request as ready for review June 16, 2026 01:46
@PeshekDotDev
PeshekDotDev requested a review from a team as a code owner June 16, 2026 01:46
@BeryJu BeryJu self-assigned this Jun 22, 2026
Signed-off-by: Jens Langhammer <[email protected]>
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Jun 29, 2026
Co-authored-by: Connor Peshek <[email protected]>
Signed-off-by: Connor Peshek <[email protected]>
@PeshekDotDev
PeshekDotDev merged commit 02c136a into main Jun 29, 2026
109 of 110 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jun 29, 2026
@PeshekDotDev
PeshekDotDev deleted the oidc-form-post-error branch June 29, 2026 18:12
@authentik-automation

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.5 created: #23529

kensternberg-authentik added a commit that referenced this pull request Jun 30, 2026
…yers' into web/css/enabling-layers

* refs/remotes/origin/web/css/enabling-layers: (23 commits)
  flows: fix flow executor authentication with jwt  (#16646)
  web: bump playwright from 1.60.0 to 1.61.0 in /web (#23542)
  core, web: update translations (#23534)
  web: bump the eslint group across 1 directory with 3 updates (#23538)
  web: bump type-fest from 5.6.0 to 5.7.0 in /web (#23544)
  lifecycle/aws: bump aws-cdk from 2.1128.0 to 2.1128.1 in /lifecycle/aws (#23535)
  core: bump deepmerge from 2.0 to 2.1.0 (#23539)
  root: fix "make gen" failing with "the input device is not a TTY" (#23546)
  core: bump library/golang from `76a2924` to `68b7145` in /lifecycle/container (#23536)
  core: bump goauthentik/fips-python from `15f00f3` to `6067443` in /lifecycle/container (#23537)
  website/integrations: fix logo missing (#23548)
  translate: Updates for project authentik and language ar_AA (#23516)
  Web/maintenance/explicit model endpoints (#22897)
  providers/oauth: Properly return error via post and for request objects (#23037)
  providers/oauth: Logout remove static html (#23002)
  core: bump dramatiq from 2.1.0 to 2.2.0 (#23381)
  website: bump semver from 7.8.4 to 7.8.5 in /website (#23299)
  web/flows: fix untranslated user field labels in identification stage (#23518)
  tasks/schedules: fix paused schedules getting unpaused on startup (#23521)
  sources/ldap: avoid re-creating connections to LDAP server (#23520)
  ...
kensternberg-authentik added a commit that referenced this pull request Jun 30, 2026
* main: (415 commits)
  Web/maintenance: Replace routine form endpoints (#23554)
  root: move server and worker healthcheck to rust (#23556)
  website/docs: api: remove note (#23555)
  web: bump @playwright/test from 1.60.0 to 1.61.0 in /web (#23545)
  providers/scim: fix enum warning when de-serializing (#23553)
  flows: fix flow executor authentication with jwt  (#16646)
  web: bump playwright from 1.60.0 to 1.61.0 in /web (#23542)
  core, web: update translations (#23534)
  web: bump the eslint group across 1 directory with 3 updates (#23538)
  web: bump type-fest from 5.6.0 to 5.7.0 in /web (#23544)
  lifecycle/aws: bump aws-cdk from 2.1128.0 to 2.1128.1 in /lifecycle/aws (#23535)
  core: bump deepmerge from 2.0 to 2.1.0 (#23539)
  root: fix "make gen" failing with "the input device is not a TTY" (#23546)
  core: bump library/golang from `76a2924` to `68b7145` in /lifecycle/container (#23536)
  core: bump goauthentik/fips-python from `15f00f3` to `6067443` in /lifecycle/container (#23537)
  website/integrations: fix logo missing (#23548)
  translate: Updates for project authentik and language ar_AA (#23516)
  Web/maintenance/explicit model endpoints (#22897)
  providers/oauth: Properly return error via post and for request objects (#23037)
  providers/oauth: Logout remove static html (#23002)
  ...
kensternberg-authentik added a commit that referenced this pull request Jun 30, 2026
* main: (487 commits)
  Web/maintenance: Replace routine form endpoints (#23554)
  root: move server and worker healthcheck to rust (#23556)
  website/docs: api: remove note (#23555)
  web: bump @playwright/test from 1.60.0 to 1.61.0 in /web (#23545)
  providers/scim: fix enum warning when de-serializing (#23553)
  flows: fix flow executor authentication with jwt  (#16646)
  web: bump playwright from 1.60.0 to 1.61.0 in /web (#23542)
  core, web: update translations (#23534)
  web: bump the eslint group across 1 directory with 3 updates (#23538)
  web: bump type-fest from 5.6.0 to 5.7.0 in /web (#23544)
  lifecycle/aws: bump aws-cdk from 2.1128.0 to 2.1128.1 in /lifecycle/aws (#23535)
  core: bump deepmerge from 2.0 to 2.1.0 (#23539)
  root: fix "make gen" failing with "the input device is not a TTY" (#23546)
  core: bump library/golang from `76a2924` to `68b7145` in /lifecycle/container (#23536)
  core: bump goauthentik/fips-python from `15f00f3` to `6067443` in /lifecycle/container (#23537)
  website/integrations: fix logo missing (#23548)
  translate: Updates for project authentik and language ar_AA (#23516)
  Web/maintenance/explicit model endpoints (#22897)
  providers/oauth: Properly return error via post and for request objects (#23037)
  providers/oauth: Logout remove static html (#23002)
  ...
kensternberg-authentik added a commit that referenced this pull request Jun 30, 2026
* main:
  Web/maintenance: Replace routine form endpoints (#23554)
  root: move server and worker healthcheck to rust (#23556)
  website/docs: api: remove note (#23555)
  web: bump @playwright/test from 1.60.0 to 1.61.0 in /web (#23545)
  providers/scim: fix enum warning when de-serializing (#23553)
  flows: fix flow executor authentication with jwt  (#16646)
  web: bump playwright from 1.60.0 to 1.61.0 in /web (#23542)
  core, web: update translations (#23534)
  web: bump the eslint group across 1 directory with 3 updates (#23538)
  web: bump type-fest from 5.6.0 to 5.7.0 in /web (#23544)
  lifecycle/aws: bump aws-cdk from 2.1128.0 to 2.1128.1 in /lifecycle/aws (#23535)
  core: bump deepmerge from 2.0 to 2.1.0 (#23539)
  root: fix "make gen" failing with "the input device is not a TTY" (#23546)
  core: bump library/golang from `76a2924` to `68b7145` in /lifecycle/container (#23536)
  core: bump goauthentik/fips-python from `15f00f3` to `6067443` in /lifecycle/container (#23537)
  website/integrations: fix logo missing (#23548)
  translate: Updates for project authentik and language ar_AA (#23516)
  Web/maintenance/explicit model endpoints (#22897)
  providers/oauth: Properly return error via post and for request objects (#23037)
  providers/oauth: Logout remove static html (#23002)
PeshekDotDev added a commit that referenced this pull request Jul 1, 2026
…ts (cherry-pick #23037 to version-2026.5) (#23529)

providers/oauth: Properly return error via post and for request objects (#23037)

Co-authored-by: Connor Peshek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants