goauthentik / goauthentik/authentik

Proxy providers created by blueprint silently force the default oauth scope mappings

Open
#17,074 5 comments 0 reactions 0 assignees View on GitHub
area:backend bug status/reviewing
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 1h
Merged PRs (30d)
644

Description

**Describe the bug**
When applying a blueprint that contains a proxy provider, the default scope mappings (app entitlements, oid email, oid openid, oid profile, and "Proxy outpost") are silently attached to the provider, even when not included in the blueprint. Even if these are manually removed, they will reappear next time the blueprint is applied.

This is a major issue when the user has attributes with a large amount of data. For example, [when following the docs here](https://docs.goauthentik.io/users-sources/sources/social-logins/discord/#store-oauth-info-in-attribute-and-create-avatar-attribute-from-discord-avatar), each user's Discord avatar is stored as a user attribute. By forcing the Proxy outpost mapping, the HTTP header with the authentik JWT (`X-Authentik-JWT` I think) ends up including the Discord avatar in the claims. This makes makes the header absolutely massive - tens of kilobytes or more. This is way too large for some webservers by default, like Apache Tomcat and Jetty.

**To Reproduce**
Steps to reproduce the behavior:

1. Deploy the blueprint defined [here](https://github.com/solidDoWant/infra-mk3/blob/d1927f1781e0b43fc9cb62b74070d3741e67b3a8/cluster/gitops/downloads/nzbhydra2/app/authentik-nzbhydra2-application-blueprint.yaml#L43-L79)

Notice that this does not include the `authentik default OAuth Mapping: Proxy outpost` scope mapping, and instead includes a replacement that I've written [here](https://github.com/solidDoWant/infra-mk3/blob/d1927f1781e0b43fc9cb62b74070d3741e67b3a8/cluster/gitops/security/authentik/configuration/baseline-setup/library.yaml#L30-L59).
2. Check the created proxy provider in the UI. This will show all five default claims, as well as the `authentik default OAuth Mapping: Proxy outpost reduced` claim that I've added.

**Expected behavior**
Scope mapping should not be added unless they are explicitly defined.

**Screenshots**

Here's an example of what the blueprint looks like when applied:
Image

**Logs**
Not seeing anything applicable here. If there's specific logs you want, let me know and I'll grab them.

**Version and Deployment (please complete the following information):**

- authentik version: 2025.8.3
- Deployment: [helm](https://github.com/solidDoWant/infra-mk3/blob/d1927f1781e0b43fc9cb62b74070d3741e67b3a8/cluster/gitops/security/authentik/app/hr.yaml#L16)

**Additional context**
N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.