-
-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netbird can't query users when using newer versions than Zitadel 2.61.0 #2616
Comments
Can confirm the same issue with Zitadel 2.62.1 and Netbird 0.29.3 The logs in the Zitadel container are identical like above. It worked before months and several version (combinations) of Netbird and Zitadel. I am usually quite fast with updates and had no issues so far until the last update of Netbird and Zitadel. So I guess something has changed either in Netbird or Zitadel in the last 1-2 releases which is the root cause of this issue. |
I see that Zitadel released v2.62.1 two days ago, but they have now marked v2.59.3 as the latest version. Could you try using v2.59.3 (latest) for now or rollback to the previous version that was working for you? In meantime we will run tests to confirm the breaking changes and update the NetBird Zitadel implementation accordingly. |
This is for sure some mistake by Zitadel tagging this version 2.59.3 as "latest". |
I just wanted to follow up with both a "me too" and some info from the zitadel side. the events history does say a token was created and authenticated properly for me. so it appears to be some kind of permission issue just with the netbird user accessing that endpoint. This was all working previously for many months. I have some experience writing integrations with zitadel, I'll poke around to see what netbird is calling vs. what the api is expecting. edit: I added some extra logging and error response parsing into the management server and zitadel is responding with:
will continue poking around edit2: so it looks like the client id we're using to authenticate "netbird" by the docs, + the client secret are getting encoded into the JWT returned from zitadel. and we're using that client id "netbird" to make requests. zitadel on the on the otherhand is doing some work to verify the access token and they're looking up the client_id from the access token we pass in. they're looking up that client_id in the registered apps list to see which app and project it should belong to. but "netbird" isn't the client id of the app, it's however if we use that client id to perform the management query, they're logging this error:
there's definitely some confusion happening on what credentials should be used |
another follow-up: I added a PAT for the netbird user and made changes to the management service overloading the ClientSecret and Authenticate method to just make a pretend JWT with the AccessToken being the PAT to use that instead of authenticating a JWT and everything seems to be working fine this way since it just concatenates I think it would be a relatively simple change to just use a PAT and refactor the config a bit if we want to swerve this issue. I'll keep tweaking configurations and hacking on both sides to see if I can find the real cause though. In the meantime at least my management service is back online :) |
more extra data: I added support in netbird for using the Bearer "Access Token Type" instead of JWT from zitadel as well, and get the same I also tried adding the |
I'm getting another chance to look at this today and at this point I'm pretty sure there's some undesired behaviour going on the zitadel side here. I've followed all of the specs A-Z to build this token for a service user from their docs and their examples, but none of them will authenticate. I think it may have been introduced in a big refactor on their side at edit: though there's not much talk on their github issues list about this, I found some folks complaining in discord about service accounts not working with the same error. |
zitadel/terraform-provider-zitadel#199 I'm seeing the issue pop up in some other places as well. linking for posterity. |
Can agree issue exists on Zitadel v2.62.1 |
Thanks for the hint. Can confirm 2.61.1 gets the access to the dashboard working again. |
I've just tested against Zitadel's latest release, it's working now for me. https://github.com/zitadel/zitadel/releases/tag/v2.62.4 |
Can confirm the issue is gone with Zitadel 2.63.1, too. |
Describe the problem
When updating Zitadel to 2.61.2 or anything newer, then Netbird can't query the Zitadel user endpoint anymore.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Zitadel integration should still work if it gets updated.
Are you using NetBird Cloud?
Selfhosted
NetBird version
0.29.3
Additional context
Add any other context about the problem here.
Netbird management logs
Zitadel log entries:
I've tried re-creating the service account secret, but the error persisted. Also, not sure if this is an issue on Zitadel's side or on Netbird. But given that Netbird is the only app I had issues with, I opened a bug here.
The text was updated successfully, but these errors were encountered: