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

Closed
opened 2026-08-05 01:07:35 -04:00 by saavagebueno · 2 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:07:35 -04:00
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @adminnz,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

<!-- gh-comment-id:2835665749 --> @nazarewk commented on GitHub (Apr 28, 2025): Hello @adminnz, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

<!-- gh-comment-id:2927891153 --> @mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#6280