Skip to content

providers/oauth2: add token exchange targeting - #24874

Open
BeryJu wants to merge 3 commits into
mainfrom
providers/oauth2/token-exchange-audience
Open

providers/oauth2: add token exchange targeting#24874
BeryJu wants to merge 3 commits into
mainfrom
providers/oauth2/token-exchange-audience

Conversation

@BeryJu

@BeryJu BeryJu commented Aug 7, 2026

Copy link
Copy Markdown
Member

the last missing piece

@BeryJu
BeryJu requested review from a team as code owners August 7, 2026 14:11
@BeryJu BeryJu added the backport/version-2026.8 Add this label to PRs to backport changes to version-2026.8 label Aug 7, 2026
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit dee88de
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a78b17fd649ba0008b2fe48
😎 Deploy Preview https://deploy-preview-24874--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 Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit dee88de
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a78b17f3eaab600098c074c
😎 Deploy Preview https://deploy-preview-24874--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 Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.42%. Comparing base (771740c) to head (dee88de).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24874      +/-   ##
==========================================
+ Coverage   91.40%   91.42%   +0.01%     
==========================================
  Files        1145     1145              
  Lines       71751    71865     +114     
  Branches     3875     3875              
==========================================
+ Hits        65586    65701     +115     
+ Misses       6130     6129       -1     
  Partials       35       35              
Flag Coverage Δ
conformance 34.83% <7.89%> (-0.04%) ⬇️
e2e 39.53% <7.89%> (-0.05%) ⬇️
integration 31.39% <6.14%> (-0.04%) ⬇️
rust 38.89% <ø> (ø)
unit 93.07% <100.00%> (+0.01%) ⬆️
unit-migrate 93.10% <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.

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@github-actions

github-actions Bot commented Aug 7, 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-dee88de9f191eb0e35ac6ebfee177af2d070f607
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-dee88de9f191eb0e35ac6ebfee177af2d070f607

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

@kensternberg-authentik kensternberg-authentik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some suggestions.

- `scope`: The scopes granted to the issued token

The issued token is a new access token for the requesting provider, carrying the identity of the user named by the subject token.
The issued token is a new access token carrying the identity of the user named by the subject token. It is issued for the requesting provider, unless [`audience`](#audience) names a different one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"different one" what? Maybe "different provider"?


### Audience

By default the issued token is a token for the provider that performed the exchange. Set `audience` to receive a token for a different provider instead:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"By default the issued token is for the provider that performed the exchange."

### Scopes

The scopes granted to the issued token are the requested `scope` values, reduced to those the requesting provider is configured to issue. If `scope` is omitted, the issued token is granted no scopes.
The scopes granted to the issued token are the requested `scope` values, reduced to those the provider the token is issued for is configured to issue — the target provider when `audience` is set, otherwise the requesting provider. If `scope` is omitted, the issued token is granted no scopes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"... the provider for which the token is issued." The two nouns in a row is confusing to parse.

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

# Conflicts:
#	authentik/providers/oauth2/views/token.py
@netlify

netlify Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-storybook ready!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants