[PR #1037] [MERGED] Autopropagate user groups to peers #13253

Closed
opened 2026-08-05 02:07:53 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1037
Author: @gigovich
Created: 7/30/2023
Status: Merged
Merged: 8/7/2023
Merged by: @gigovich

Base: mainHead: jwt-group-propagate


📝 Commits (5)

  • e7b0b30 Autopropagate peers by JWT groups
  • e6be412 Fix tests
  • 359a6cc Add JWT groups to user auto assign groups if propagation is enabled
  • c187b09 Propagate peers via AutoGroups when update user or login peer
  • dfd9a27 Force update AutoGroups of user each time when sync with JWT

📊 Changes

7 files changed (+246 additions, -23 deletions)

View changed files

📝 management/server/account.go (+94 -17)
📝 management/server/account_test.go (+114 -1)
📝 management/server/http/accounts_handler.go (+4 -1)
📝 management/server/http/accounts_handler_test.go (+20 -2)
📝 management/server/http/api/openapi.yml (+4 -0)
📝 management/server/http/api/types.gen.go (+3 -0)
📝 management/server/user.go (+7 -2)

📄 Description

Describe your changes

When an admin updates autogroups of a user,
all peers are automatically added to the groups.

If JWT token contains groups, those have to be added
to the user and their peers.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1037 **Author:** [@gigovich](https://github.com/gigovich) **Created:** 7/30/2023 **Status:** ✅ Merged **Merged:** 8/7/2023 **Merged by:** [@gigovich](https://github.com/gigovich) **Base:** `main` ← **Head:** `jwt-group-propagate` --- ### 📝 Commits (5) - [`e7b0b30`](https://github.com/netbirdio/netbird/commit/e7b0b3010afa8ad814b5db73eb7d87a800c6edf9) Autopropagate peers by JWT groups - [`e6be412`](https://github.com/netbirdio/netbird/commit/e6be412aeedcd3b903acded2e0376579a18f51bd) Fix tests - [`359a6cc`](https://github.com/netbirdio/netbird/commit/359a6cc45e4306b9f42d3786504c085ebcd3a589) Add JWT groups to user auto assign groups if propagation is enabled - [`c187b09`](https://github.com/netbirdio/netbird/commit/c187b09b6990c4e6b5c443ced40782dc2f469093) Propagate peers via AutoGroups when update user or login peer - [`dfd9a27`](https://github.com/netbirdio/netbird/commit/dfd9a2712f364225ef5bdc4f3f2db6faca1441db) Force update AutoGroups of user each time when sync with JWT ### 📊 Changes **7 files changed** (+246 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+94 -17) 📝 `management/server/account_test.go` (+114 -1) 📝 `management/server/http/accounts_handler.go` (+4 -1) 📝 `management/server/http/accounts_handler_test.go` (+20 -2) 📝 `management/server/http/api/openapi.yml` (+4 -0) 📝 `management/server/http/api/types.gen.go` (+3 -0) 📝 `management/server/user.go` (+7 -2) </details> ### 📄 Description ## Describe your changes When an admin updates autogroups of a user, all peers are automatically added to the groups. If JWT token contains groups, those have to be added to the user and their peers. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [x] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:07:53 -04:00
saavagebueno changed title from [PR #1037] Autopropagate user groups to peers to [PR #1037] [MERGED] Autopropagate user groups to peers 2026-08-05 03:08:32 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#13253