[GH-ISSUE #2819] Required Token Field Audience is Absent #6135

Open
opened 2026-08-05 01:06:53 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @adminnz on GitHub (Oct 30, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2819

Describe the problem

I have setup netbird in a digital ocean Kubernetes cluster with an OpenIddict identity server. Openiddict is OIDC compliant.

I can login to the dashboard from a browser.
However any client (Windows, Docker, Android) when trying to connect, successfully redirects to my identity server, but then on login and redirect back, all the clients fail with

interactive sso login failed: waiting for borwser login failed: validate access token failed with error: required token field audience is absent

My JWT's do not have an "aud" claim.

To Reproduce

Steps to reproduce the behavior:

  1. Use an identity server that does not issue JWT's with an "aud" claim.
  2. Set HttpConfig.AuthAudience to "none"
  3. Set DeviceAuthorizationFlow.AuthAudience to "none"
  4. Set PKCEAuthorizationFlow.AuthAudience to "none"

Expected behavior

Looking through this repository it appears there is an offhand comment here about setting NETBIRD_DASH_AUTH_USE_AUDIENCE=false

Following the usage of this, leds to this config which sets these environment variables:

export NETBIRD_DASH_AUTH_AUDIENCE=none
export NETBIRD_AUTH_PKCE_AUDIENCE=

Which then ultimately get set in the HttpConfig, which led me to believe that setting the AuthAudience to "none" would not do an audience check.

However it appears that in multiple places in the code, that its always expecting there to be an audience in the JWT.

Are you using NetBird Cloud?
Self hosted in Kubernetes with OpenIddict as an identity server.

NetBird version
0.30.3

Is there someway to disable the audience check for clients?

Originally created by @adminnz on GitHub (Oct 30, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2819 **Describe the problem** I have setup netbird in a digital ocean Kubernetes cluster with an [OpenIddict](https://github.com/openiddict/openiddict-core) identity server. Openiddict is OIDC compliant. I can login to the dashboard from a browser. However any client (Windows, Docker, Android) when trying to connect, successfully redirects to my identity server, but then on login and redirect back, all the clients fail with > interactive sso login failed: waiting for borwser login failed: validate access token failed with error: required token field audience is absent My JWT's do not have an "aud" claim. **To Reproduce** Steps to reproduce the behavior: 1. Use an identity server that does not issue JWT's with an "aud" claim. 2. Set HttpConfig.AuthAudience to "none" 3. Set DeviceAuthorizationFlow.AuthAudience to "none" 4. Set PKCEAuthorizationFlow.AuthAudience to "none" **Expected behavior** Looking through this repository it appears there is an offhand comment [here](https://github.com/netbirdio/netbird/blob/ec5095ba6b0c5f3c43a652bf5afeda07fcaffb55/infrastructure_files/setup.env.example#L32) about setting NETBIRD_DASH_AUTH_USE_AUDIENCE=false Following the usage of this, leds to [this](https://github.com/netbirdio/netbird/blob/ec5095ba6b0c5f3c43a652bf5afeda07fcaffb55/infrastructure_files/configure.sh#L214) config which sets these environment variables: export NETBIRD_DASH_AUTH_AUDIENCE=none export NETBIRD_AUTH_PKCE_AUDIENCE= Which then ultimately get set in the HttpConfig, which led me to believe that setting the AuthAudience to "none" would not do an audience check. However it appears that in multiple places in the [code](https://github.com/netbirdio/netbird/blob/ec5095ba6b0c5f3c43a652bf5afeda07fcaffb55/client/internal/auth/util.go#L24), that its always expecting there to be an audience in the JWT. **Are you using NetBird Cloud?** Self hosted in Kubernetes with OpenIddict as an identity server. **NetBird version** 0.30.3 Is there someway to disable the audience check for clients?
saavagebueno added the serverwaiting-feedbackself-hosting labels 2026-08-05 01:06:53 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#6135