Closed redecs closed 5 months ago
Some additional information: the management services keeps restarting, here is the log snippet that keeps repeating:
management-1 | 2024-05-20T20:03:03Z INFO management/cmd/management.go:455: loading OIDC configuration from the provided IDP configuration endpoint https://accounts.google.com/.well-known/openid-configuration
management-1 | 2024-05-20T20:03:04Z INFO management/cmd/management.go:460: loaded OIDC configuration from the provided IDP configuration endpoint: https://accounts.google.com/.well-known/openid-configuration
management-1 | 2024-05-20T20:03:04Z INFO management/cmd/management.go:462: overriding HttpConfig.AuthIssuer with a new value https://accounts.google.com, previously configured value: https://accounts.google.com
management-1 | 2024-05-20T20:03:04Z INFO management/cmd/management.go:466: overriding HttpConfig.AuthKeysLocation (JWT certs) with a new value https://www.googleapis.com/oauth2/v3/certs, previously configured value: https://www.googleapis.com/oauth2/v3/certs
management-1 | 2024-05-20T20:03:04Z INFO management/server/telemetry/app_metrics.go:177: enabled application metrics and exposing on http://0.0.0.0:8081
management-1 | 2024-05-20T20:03:04Z INFO management/server/store.go:95: using SQLite store engine
management-1 | 2024-05-20T20:03:04Z INFO management/server/migration/migration.go:128: No records in table peers, no migration needed
management-1 | 2024-05-20T20:03:04Z INFO management/server/migration/migration.go:128: No records in table peers, no migration needed
management-1 | 2024-05-20T20:03:04Z INFO management/cmd/management.go:173: geo location service has been initialized from /var/lib/netbird/
management-1 | 2024-05-20T20:03:04Z INFO management/server/account.go:889: single account mode enabled, accounts number 0
management-1 | Error: failed creating JWT validator: invalid character '<' looking for beginning of value
Tracked down the error here: https://github.com/netbirdio/netbird/blob/main/management/cmd/management.go#L242
After more digging I discovered that the GET request for https://www.googleapis.com/oauth2/v3/certs
fails when performed insider the container. Tested with go code (similar to Netbird) and curl. From inside the container I get a 403, while if I do it on the host I get expected 200 response.
At this point I'm pretty sure this issue is related to some networking issues, either related to Docker or Hetzner (the provider for the VPS) or a combination of those two, so I'm closing this.
I've setup a different VPS where the networking isn't an issue anymore and now all the docker compose services are running fine (no restarts) but unfortunately the Google Workspace Issue is still there.
This is how the manager logs look now:
management-1 | 2024-05-21T11:24:45Z INFO management/cmd/management.go:292: running gRPC backward compatibility server: [::]:33073
management-1 | 2024-05-21T11:24:45Z INFO management/cmd/management.go:324: management server version 0.27.7
management-1 | 2024-05-21T11:24:45Z INFO management/cmd/management.go:325: running HTTP server and gRPC server on the same port: [::]:443
management-1 | 2024-05-21T11:24:45Z INFO management/server/account.go:1076: 1 entries received from IdP management
management-1 | 2024-05-21T11:24:45Z INFO management/server/account.go:1107: warmed up IDP cache with 0 entries for 0 accounts
Hi @redecs,
NETBIRD_AUTH_SUPPORTED_SCOPES="netbird@<PROJECT_ID>.iam.gserviceaccount.com"
should be NETBIRD_AUTH_SUPPORTED_SCOPES="openid profile email"
Hi @pascal-fischer, that worked! Now that you point it to me, it totally makes sense. Thank you!
Describe the problem
Hello! I’m trying to setup Netbird self-hosted with Google Workspace IdP following the instructions outlined here: https://docs.netbird.io/selfhosted/identity-providers#google-workspace I’ve gone through the process multiple times only to encounter the same error when trying to access the Netbird Dashboard: I get redirected to Google Auth page with the error message
Error 400: invalid_scope
Tried searching around for similar issues and solutions but didn’t manage to find anything helpful.
To Reproduce
Steps to reproduce the behavior: Followed the steps from the guide: https://docs.netbird.io/selfhosted/identity-providers#google-workspace
Here's how my
setup.env
looks like:Expected behavior
I would have expected the Google authorization to succeed.
Are you using NetBird Cloud?
No, I'm using the self-host NetBird's control plane.
NetBird version
v0.27.7 (git tag of the repo with the tools I've used for the setup),
latest
in the generateddocker-compose.yml
Additional context
Before trying the Advanced Setup with Google Workspace as IdP I tested Netbird with the Quick Start Guid with Zitadel and that worked fine but I would like to remove to remove additional component (Zitadel) and use Google as the IdP.
Thank you!