Skip to content

providers/oauth: handle token exchange when no signing key is set - #26049

Merged
dewi-tik merged 2 commits into
mainfrom
providers/oauth--token-exchange-without-signing-key
Sep 11, 2026
Merged

dewi-tik merged 2 commits into
mainfrom
providers/oauth--token-exchange-without-signing-key

Conversation

@dewi-tik

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Fixes provider-federated JWT verification for OAuth2 providers without a configured signing key. These providers use HS256 with their client secret, but verification incorrectly attempted to call .public_key() on the secret.

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.

@dewi-tik dewi-tik self-assigned this Sep 11, 2026
@dewi-tik
dewi-tik requested a review from a team as a code owner September 11, 2026 11:49
@dewi-tik dewi-tik added the backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8 label Sep 11, 2026
@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

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

@dewi-tik dewi-tik moved this from Todo to Needs review in authentik Core Sep 11, 2026
@codecov

codecov Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (d2ce018) to head (17835a4).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #26049      +/-   ##
==========================================
- Coverage   91.88%   91.85%   -0.04%     
==========================================
  Files        1170     1170              
  Lines       75520    75532      +12     
  Branches     4054     4054              
==========================================
- Hits        69392    69379      -13     
- Misses       6086     6111      +25     
  Partials       42       42              
Flag Coverage Δ
conformance 33.75% <0.00%> (-0.01%) ⬇️
e2e 38.43% <0.00%> (-0.01%) ⬇️
integration 30.01% <0.00%> (-0.46%) ⬇️
rust 42.92% <ø> (ø)
unit 93.43% <100.00%> (+<0.01%) ⬆️
unit-migrate 93.46% <100.00%> (+<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 Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e — ⚠️ Passed with flakes

Result Count
✅ Passed 43
❌ Failed 0
⚠️ Flaky 1
⏭️ Skipped 4

Workflow run · HTML report hosting is gated off until the authentik-playwright-artifacts S3 bucket is provisioned (vars.PLAYWRIGHT_S3_ENABLED). Until then, download the playwright-report artifact from the run page.

Signed-off-by: Jens Langhammer <[email protected]>
@github-project-automation github-project-automation Bot moved this from Needs review to In Progress in authentik Core Sep 11, 2026
@dewi-tik
dewi-tik enabled auto-merge (squash) September 11, 2026 12:06
@dewi-tik
dewi-tik merged commit 712d802 into main Sep 11, 2026
144 checks passed
@dewi-tik
dewi-tik deleted the providers/oauth--token-exchange-without-signing-key branch September 11, 2026 12:30
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Sep 11, 2026
@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.8 created: #26051

@github-actions

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-17835a449ae8f6074713af88ce3b62218cb21847
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-17835a449ae8f6074713af88ce3b62218cb21847

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

dewi-tik added a commit that referenced this pull request Sep 11, 2026
…erry-pick #26049 to version-2026.8) (#26051)

providers/oauth: handle token exchange when no signing key is set (#26049)

* Handle token exchange when no signing key is set

* explicit grant types



---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Dewi Roberts <[email protected]>
Co-authored-by: Jens Langhammer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants