[PR #667] [MERGED] Feature: add custom id claim #13983

Open
opened 2026-08-05 02:09:18 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/667
Author: @gigovich
Created: 2/1/2023
Status: Merged
Merged: 2/3/2023
Merged by: @mlsmaycon

Base: mainHead: feat-add-custom-id-claim


📝 Commits (5)

  • 1ada00a feat(#507): custom user ID claim name
  • a0dbcde Add current user flag and add custom user id claim as example
  • f9990b1 Add custom ID claim to gRPC server
  • 4b020e0 After review fix for custom ID claim
  • 52a684c Regenerate management API types in a proper way

📊 Changes

32 files changed (+471 additions, -302 deletions)

View changed files

📝 infrastructure_files/docker-compose.yml.tmpl (+2 -3)
📝 infrastructure_files/management.json.tmpl (+2 -1)
📝 infrastructure_files/setup.env.example (+2 -0)
📝 management/cmd/management.go (+17 -13)
📝 management/server/account.go (+23 -17)
📝 management/server/config.go (+12 -5)
📝 management/server/grpcserver.go (+20 -7)
📝 management/server/http/api/openapi.yml (+5 -1)
📝 management/server/http/api/types.gen.go (+3 -0)
📝 management/server/http/dns_settings.go (+11 -9)
📝 management/server/http/dns_settings_test.go (+8 -8)
📝 management/server/http/events.go (+10 -8)
📝 management/server/http/events_test.go (+11 -12)
📝 management/server/http/groups.go (+15 -13)
📝 management/server/http/groups_test.go (+11 -9)
📝 management/server/http/handler.go (+26 -19)
📝 management/server/http/middleware/access_control.go (+12 -11)
📝 management/server/http/middleware/handler.go (+4 -5)
📝 management/server/http/nameservers.go (+15 -14)
📝 management/server/http/nameservers_test.go (+9 -9)

...and 12 more files

📄 Description

Describe your changes

This feature allows using the custom claim in the JWT token as a user ID.

https://github.com/netbirdio/netbird/issues/507

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/667 **Author:** [@gigovich](https://github.com/gigovich) **Created:** 2/1/2023 **Status:** ✅ Merged **Merged:** 2/3/2023 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `feat-add-custom-id-claim` --- ### 📝 Commits (5) - [`1ada00a`](https://github.com/netbirdio/netbird/commit/1ada00ad0ee0ed7e50947124b8e9d0c9c15f6deb) feat(#507): custom user ID claim name - [`a0dbcde`](https://github.com/netbirdio/netbird/commit/a0dbcde1f2c7ae334beb7f1da981a66ca6f6944d) Add current user flag and add custom user id claim as example - [`f9990b1`](https://github.com/netbirdio/netbird/commit/f9990b1720800a03f3f87208576bc43213ba6a4a) Add custom ID claim to gRPC server - [`4b020e0`](https://github.com/netbirdio/netbird/commit/4b020e0489f613774e2af63c75f82af7764dbe1c) After review fix for custom ID claim - [`52a684c`](https://github.com/netbirdio/netbird/commit/52a684cdace2925c99f824a3450032b3a2f9a108) Regenerate management API types in a proper way ### 📊 Changes **32 files changed** (+471 additions, -302 deletions) <details> <summary>View changed files</summary> 📝 `infrastructure_files/docker-compose.yml.tmpl` (+2 -3) 📝 `infrastructure_files/management.json.tmpl` (+2 -1) 📝 `infrastructure_files/setup.env.example` (+2 -0) 📝 `management/cmd/management.go` (+17 -13) 📝 `management/server/account.go` (+23 -17) 📝 `management/server/config.go` (+12 -5) 📝 `management/server/grpcserver.go` (+20 -7) 📝 `management/server/http/api/openapi.yml` (+5 -1) 📝 `management/server/http/api/types.gen.go` (+3 -0) 📝 `management/server/http/dns_settings.go` (+11 -9) 📝 `management/server/http/dns_settings_test.go` (+8 -8) 📝 `management/server/http/events.go` (+10 -8) 📝 `management/server/http/events_test.go` (+11 -12) 📝 `management/server/http/groups.go` (+15 -13) 📝 `management/server/http/groups_test.go` (+11 -9) 📝 `management/server/http/handler.go` (+26 -19) 📝 `management/server/http/middleware/access_control.go` (+12 -11) 📝 `management/server/http/middleware/handler.go` (+4 -5) 📝 `management/server/http/nameservers.go` (+15 -14) 📝 `management/server/http/nameservers_test.go` (+9 -9) _...and 12 more files_ </details> ### 📄 Description ## Describe your changes This feature allows using the custom claim in the JWT token as a user ID. ## Issue ticket number and link https://github.com/netbirdio/netbird/issues/507 ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] It is a refactor - [ ] 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:09:18 -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#13983