netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.6k stars 474 forks source link

Cannot connect via SSO from a linux cli #2485

Open JonathanManass opened 2 weeks ago

JonathanManass commented 2 weeks ago

Describe the problem

Whenever running netbird up from a remote linux vm via the cli I get the following error if I do not give it an access key :

2024-08-26T11:55:04Z ERRO management/client/grpc.go:350: failed to login to Management Service: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login
2024-08-26T11:55:04Z WARN client/server/server.go:259: failed login: rpc error: code = InvalidArgument desc = invalid setup-key or no sso information provided, err: invalid UUID length: 0
2024-08-26T11:55:04Z WARN client/internal/device_auth.go:81: server couldn't find device flow, contact admin: rpc error: code = NotFound desc = no device authorization flow information available

SSO has been correctly set and I all windows personal computers connected can properly connect via Azure.

I'm not sure whether it is a bug, related to configuration, or just that it does not work because I'm trying to connect via SSO on a machine without a graphical interface

To Reproduce

Expected behavior

For it to be able to work, similarly to for example, aws sso login by either opening up a browser or giving a link to press that will connect you.

Are you using NetBird Cloud?

Self-Hosted

NetBird version

0.28.8

jb606 commented 2 weeks ago

Hello, I think you will need to use a setup key when your device does not have a GUI.

lblazewski commented 2 weeks ago

Observing the same issue. I recall this used to work in the past where a link was present in the console that could be copy pasted to browser in order to finish the auth flow and then the machine would be connected (I was using this just for testing, I know that setup keys should be used in such cases).