[PR #6743] [management] add groups to default OIDC scopes for generic providers #26868

Open
opened 2026-08-05 07:07:54 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/6743
Author: @CoderSufiyan
Created: 7/12/2026
Status: 🔄 Open

Base: mainHead: fix/issue-5673-oidc-scopes


📝 Commits (2)

  • 6bacbc0 [idp] add groups to default OIDC scopes for generic providers
  • 843a585 [idp] Limit groups scope to generic OIDC

📊 Changes

3 files changed (+14 additions, -0 deletions)

View changed files

📝 idp/dex/config.go (+2 -0)
📝 idp/dex/connector.go (+2 -0)
📝 idp/dex/connector_test.go (+10 -0)

📄 Description

Description

Generic OIDC providers defaulted scopes to openid profile email, omitting groups. This prevented JWT group sync and group information from flowing through from the upstream IdP. Other providers like okta and pocketid already included groups in their default scopes.

Changes

  • Added groups to default OIDC scopes in idp/dex/connector.go (buildOIDCConnectorConfig)
  • Added groups to default OIDC scopes in idp/dex/config.go (augmentConnectorConfig)

Documentation

  • Documentation is not needed for this change (scope default change, no user-facing config impact)

Fixes #5673

Summary by CodeRabbit

  • New Features

    • OIDC connectors using the generic oidc type now request group information by default (via the groups scope), in addition to openid, profile, and email.
  • Bug Fixes

    • Ensures groups scope is consistently included for generic OIDC configuration, rather than only for certain provider-specific connector types.
  • Tests

    • Added/updated coverage to verify the OIDC scopes behavior for both generic oidc and provider-specific cases.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/6743 **Author:** [@CoderSufiyan](https://github.com/CoderSufiyan) **Created:** 7/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/issue-5673-oidc-scopes` --- ### 📝 Commits (2) - [`6bacbc0`](https://github.com/netbirdio/netbird/commit/6bacbc0efec4825067c4b3d2e96dbece9f82dcea) [idp] add groups to default OIDC scopes for generic providers - [`843a585`](https://github.com/netbirdio/netbird/commit/843a585298698ae7df0d2a7d92ef67f316e14cb7) [idp] Limit groups scope to generic OIDC ### 📊 Changes **3 files changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `idp/dex/config.go` (+2 -0) 📝 `idp/dex/connector.go` (+2 -0) 📝 `idp/dex/connector_test.go` (+10 -0) </details> ### 📄 Description ## Description Generic OIDC providers defaulted scopes to `openid profile email`, omitting `groups`. This prevented JWT group sync and group information from flowing through from the upstream IdP. Other providers like okta and pocketid already included `groups` in their default scopes. ## Changes - Added `groups` to default OIDC scopes in `idp/dex/connector.go` (buildOIDCConnectorConfig) - Added `groups` to default OIDC scopes in `idp/dex/config.go` (augmentConnectorConfig) ## Documentation - [x] Documentation is **not needed** for this change (scope default change, no user-facing config impact) Fixes #5673 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * OIDC connectors using the generic `oidc` type now request group information by default (via the `groups` scope), in addition to `openid`, `profile`, and `email`. * **Bug Fixes** * Ensures `groups` scope is consistently included for generic OIDC configuration, rather than only for certain provider-specific connector types. * **Tests** * Added/updated coverage to verify the OIDC `scopes` behavior for both generic `oidc` and provider-specific cases. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 07:07:54 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#26868