Unable to authenticate with Authentik SSO #1202

Closed
opened 2025-11-20 05:25:51 -05:00 by saavagebueno · 5 comments
Owner

Originally created by @excaliburzarau on GitHub (Sep 2, 2024).

Describe the problem

When trying to connect a mobile device or a laptop, after pressing to connect, the Netbird redirects me to Authentik, then it redirects me to a localhost:53000 page saying that i am now connected.
After i go back to the Netbird menu, i press to connect and it gets stuck on connecting. On the logs it reports that no peer auth method provided, please use a setup key or interactive SSO login and i can actually see that on the it does not get an user Id with the code accountID: UNKNOWN this can be verified on the image below.

To Reproduce

Steps to reproduce the behavior:

  1. Go to the Netbird client.
  2. Click on Change Server.
  3. Add the server.
  4. Authenticate on Authentik.
  5. Go back to the Netbird client and connect.

Expected behavior

Authenticate with the Authentik user and connect the Netbird client to my self-hosted server.

Are you using NetBird Cloud?

It is a self-host NetBird's control plane.

NetBird version

v0.28.9

NetBird status -dA output:

Not applicable

Do you face any (non-mobile) client issues?

I have issues both on the mobile client and the laptop.
Unable to run the command for the same reason as above.

Screenshots

Sem título

363506711-3ba8edcf-b368-4a31-a7aa-8d292b6d38c7

363506706-149e918a-b354-4318-8847-f976333d772e

Additional context

I believe that the Authentik application is sending the User ID but for some reason the Netbird does not receive the User ID presenting the error accountID: UNKNOWN .
If i try to set a different scope on the Authentik application it does get the data from Authentik which i can see on the Netbird logs.

Can someone give me an idea of what i might be missing?

Thank you all in advance.

Originally created by @excaliburzarau on GitHub (Sep 2, 2024). **Describe the problem** When trying to connect a mobile device or a laptop, after pressing to connect, the Netbird redirects me to Authentik, then it redirects me to a localhost:53000 page saying that i am now connected. After i go back to the Netbird menu, i press to connect and it gets stuck on connecting. On the logs it reports `that no peer auth method provided, please use a setup key or interactive SSO login` and i can actually see that on the it does not get an user Id with the code `accountID: UNKNOWN` this can be verified on the image below. **To Reproduce** Steps to reproduce the behavior: 1. Go to the Netbird client. 2. Click on Change Server. 3. Add the server. 4. Authenticate on Authentik. 5. Go back to the Netbird client and connect. **Expected behavior** Authenticate with the Authentik user and connect the Netbird client to my self-hosted server. **Are you using NetBird Cloud?** It is a self-host NetBird's control plane. **NetBird version** `v0.28.9` **NetBird status -dA output:** Not applicable **Do you face any (non-mobile) client issues?** I have issues both on the mobile client and the laptop. Unable to run the command for the same reason as above. **Screenshots** ![Sem título](https://github.com/user-attachments/assets/0198e50a-aae8-4c43-819b-347e765dd3bb) ![363506711-3ba8edcf-b368-4a31-a7aa-8d292b6d38c7](https://github.com/user-attachments/assets/90a1cd05-82fb-4f29-b365-ffd43ba6ec01) ![363506706-149e918a-b354-4318-8847-f976333d772e](https://github.com/user-attachments/assets/979ea5b3-c8cf-4db0-be34-87f762cacd5e) **Additional context** I believe that the Authentik application is sending the User ID but for some reason the Netbird does not receive the User ID presenting the error `accountID: UNKNOWN` . If i try to set a different scope on the Authentik application it does get the data from Authentik which i can see on the Netbird logs. Can someone give me an idea of what i might be missing? Thank you all in advance.
saavagebueno added the waiting-feedbacktriage-needed labels 2025-11-20 05:25:51 -05:00
Author
Owner

@excaliburzarau commented on GitHub (Sep 4, 2024):

Hello guys,

An update on the issue.

I AM using the cloudflare provider, i already enabled the grc streaming option on my DNS profile.

I also tried to create a new flow device-code-flow and assign it to a brand on Authentik, the issue still remains.

Thank you all in advance.

Best Regards

@excaliburzarau commented on GitHub (Sep 4, 2024): Hello guys, An update on the issue. I AM using the cloudflare provider, i already enabled the grc streaming option on my DNS profile. I also tried to create a new flow device-code-flow and assign it to a brand on Authentik, the issue still remains. Thank you all in advance. Best Regards
Author
Owner

@Kartel1 commented on GitHub (Nov 4, 2024):

Hello, I'm trying to use netbird with Authentik and Traefik and I'm facing the same issue.
I was able to add peers, but they never connect as I have the issue with the SSO.
I have a device flow and it's correctly set up.
I can't figure out where I failed in my conf or if it's just a bug.
I'm looking forward some help too

Thanks in advance :)

@Kartel1 commented on GitHub (Nov 4, 2024): Hello, I'm trying to use netbird with Authentik and Traefik and I'm facing the same issue. I was able to add peers, but they never connect as I have the issue with the SSO. I have a device flow and it's correctly set up. I can't figure out where I failed in my conf or if it's just a bug. I'm looking forward some help too Thanks in advance :)
Author
Owner

@Kartel1 commented on GitHub (Nov 5, 2024):

Actually I figure out what was wrong.
I'm using Traefik as reverse proxy with letsencrypt for SSL and the acme.json file had this entry:
*.myDomain.tld
I had to delete this entry (and only this one)
When you check Traefik's logs there is an error message about signal-management (netbird). LetsEncrypt doesn't consider the domain for signal is valid.
I made some test with the netbird docker client and the log was pretty explicit, Signal was the culprit.

You should check your netbird docker-compose file and for dashboard and signal, make sure you're not specifying any https
for traefik labels you should have something like this:

  • dashboard
    labels:
    - "traefik.enable=true"
    - "traefik.http.routers.netbird-http.rule=Host(netbird.myDomain.tld)"
    - "traefik.http.routers.netbird-http.entrypoints=websecure,web"
    - "traefik.http.routers.netbird-http.tls=true"
    - "traefik.http.routers.netbird-http.service=netbird-svc@docker"
    - "traefik.http.services.netbird-svc.loadBalancer.server.port=80"
    - "traefik.docker.network=Your_network"
  • Signal:

labels:
- "traefik.enable=true"
- "traefik.http.routers.netbird-signal-http.rule=Host(netbird.myDomain.tld) && PathPrefix(/signalexchange.SignalExchange/)"
- "traefik.http.routers.netbird-signal-http.entrypoints=websecure,web"
- "traefik.http.routers.netbird-signal-http.tls=true"
- "traefik.http.routers.netbird-signal-http.service=netbird-signal-svc@docker"
- "traefik.http.services.netbird-signal-svc.loadBalancer.server.port=80"
- "traefik.http.services.netbird-signal-svc.loadBalancer.server.scheme=h2c"
- "traefik.docker.network=Your_network"

With that you should be able to connect your peer to netbird as you can see on this picture (green dot)
the first one is a docker container on my windows machine and the second one is my phone

image

The only thing I have to try now is to connect my phone through mobile network because i was on wifi here (it didn't work so far, but that's 100% on my side this one)

@Kartel1 commented on GitHub (Nov 5, 2024): Actually I figure out what was wrong. I'm using Traefik as reverse proxy with letsencrypt for SSL and the acme.json file had this entry: `*.myDomain.tld` I had to delete this entry (and only this one) When you check Traefik's logs there is an error message about signal-management (netbird). LetsEncrypt doesn't consider the domain for signal is valid. I made some test with the netbird docker client and the log was pretty explicit, Signal was the culprit. You should check your netbird docker-compose file and for dashboard and signal, make sure you're not specifying any https for traefik labels you should have something like this: - dashboard labels: - "traefik.enable=true" - "traefik.http.routers.netbird-http.rule=Host(`netbird.myDomain.tld`)" - "traefik.http.routers.netbird-http.entrypoints=websecure,web" - "traefik.http.routers.netbird-http.tls=true" - "traefik.http.routers.netbird-http.service=netbird-svc@docker" - "traefik.http.services.netbird-svc.loadBalancer.server.port=80" - "traefik.docker.network=Your_network" - Signal: labels: - "traefik.enable=true" - "traefik.http.routers.netbird-signal-http.rule=Host(`netbird.myDomain.tld`) && PathPrefix(`/signalexchange.SignalExchange/`)" - "traefik.http.routers.netbird-signal-http.entrypoints=websecure,web" - "traefik.http.routers.netbird-signal-http.tls=true" - "traefik.http.routers.netbird-signal-http.service=netbird-signal-svc@docker" - "traefik.http.services.netbird-signal-svc.loadBalancer.server.port=80" - "traefik.http.services.netbird-signal-svc.loadBalancer.server.scheme=h2c" - "traefik.docker.network=Your_network" With that you should be able to connect your peer to netbird as you can see on this picture (green dot) the first one is a docker container on my windows machine and the second one is my phone ![image](https://github.com/user-attachments/assets/58d7768f-374d-48c3-8b97-0c18febf5a72) The only thing I have to try now is to connect my phone through mobile network because i was on wifi here (it didn't work so far, but that's 100% on my side this one)
Author
Owner

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

Hello @excaliburzarau,

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!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @excaliburzarau, 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.

@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: SVI/netbird#1202