Cant assign manually created groups via jwt group sync #1304

Open
opened 2025-11-20 05:27:51 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @BcTpe4HbIu on GitHub (Oct 2, 2024).

Is your feature request related to a problem? Please describe.
If group was created via api it wont be assigned on users via jwt group sync.
For example, if you prepare routes and policies before any user login with new groups, group will be created via API and jwt sync will ignore it. See here

Describe the solution you'd like
Some kind of switch in UI for group to change group.Issued to JWT would be great.
A switch in UI to change group type (group.Issued) to JWT. And/Or property in api method "update group".

Describe alternatives you've considered
Currently I've changed group.Issued directly in sqlite and will try to ensure that groups are created via jwt sync. But it's not exactly easy.

Originally created by @BcTpe4HbIu on GitHub (Oct 2, 2024). **Is your feature request related to a problem? Please describe.** If group was created via api it wont be assigned on users via jwt group sync. For example, if you prepare routes and policies before any user login with new groups, group will be created via API and jwt sync will ignore it. See [here](https://github.com/netbirdio/netbird/blob/a3a479429eb13dc53b9d9dd7bfb1b0710c5055c0/management/server/account.go#L877) **Describe the solution you'd like** Some kind of switch in UI for group to change `group.Issued` to JWT would be great. A switch in UI to change group type (`group.Issued`) to JWT. And/Or property in api method "update group". **Describe alternatives you've considered** Currently I've changed `group.Issued` directly in sqlite and will try to ensure that groups are created via jwt sync. But it's not exactly easy.
saavagebueno added the feature-requestapi labels 2025-11-20 05:27:51 -05:00
Author
Owner

@salvatorebic commented on GitHub (Oct 23, 2024):

Apart from interacting with the db, is there any other workaround that could work? Thx.

@salvatorebic commented on GitHub (Oct 23, 2024): Apart from interacting with the db, is there any other workaround that could work? Thx.
Author
Owner

@febs commented on GitHub (Oct 25, 2024):

@BcTpe4HbIu Would you mind please sharing how did you edit the database? Thank you.

@febs commented on GitHub (Oct 25, 2024): @BcTpe4HbIu Would you mind please sharing how did you edit the database? Thank you.
Author
Owner

@BcTpe4HbIu commented on GitHub (Oct 25, 2024):

@febs That's depends on what database you are using and how you deploy your netbird management service.
Assuming default docker-compose setup:

  1. Get static sqlite3 binary from here
  2. Copy binary to management container docker-compose cp ./sqlite3 management:/var/lib/netbird/sqlite3
  3. Exec into management container docker-compose exec -ti management bash
  4. Make a database backup (just in case) cd /var/lib/netbird && cp store.db store.db.$(date +%s)
  5. Make sqlite3 excutable and connect to DB cd /var/lib/netbird && chmod +x sqlite3 && ./sqlite3 store.db
  6. Update required groups with "jwt" type update groups set issued='jwt' where name='GROUP_NAME_HERE';
  7. Done.
@BcTpe4HbIu commented on GitHub (Oct 25, 2024): @febs That's depends on what database you are using and how you deploy your netbird management service. Assuming default docker-compose setup: 1. Get static sqlite3 binary from [here](https://github.com/CompuRoot/static-sqlite3/releases/tag/3.46.1_01) 2. Copy binary to management container `docker-compose cp ./sqlite3 management:/var/lib/netbird/sqlite3` 3. Exec into management container `docker-compose exec -ti management bash` 4. Make a database backup (just in case) `cd /var/lib/netbird && cp store.db store.db.$(date +%s)` 5. Make sqlite3 excutable and connect to DB `cd /var/lib/netbird && chmod +x sqlite3 && ./sqlite3 store.db` 6. Update required groups with "jwt" type `update groups set issued='jwt' where name='GROUP_NAME_HERE';` 7. Done.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1304