[PR #184] [MERGED] Link account id with the external user store #2596

Closed
opened 2025-11-20 07:11:49 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/184
Author: @mlsmaycon
Created: 1/8/2022
Status: Merged
Merged: 1/24/2022
Merged by: @mlsmaycon

Base: mainHead: link-account-id-with-external


📝 Commits (10+)

  • d8093bc get account id from access token claim
  • b478cf0 use GetOrCreateAccountByUser and add test
  • 08a6cef correct account id claim
  • 7065959 remove unused account
  • 43e1e8c Idp manager interface
  • 7d8241d auth0 idp manager
  • 9258a2c use if instead of switch case
  • f74e4cb remove unnecessary lock
  • c18c377 NewAuth0Manager
  • 618539d move idpmanager to its own package

📊 Changes

21 files changed (+806 additions, -28 deletions)

View changed files

📝 client/cmd/testutil.go (+1 -1)
📝 client/internal/engine_test.go (+1 -1)
📝 go.sum (+0 -1)
📝 infrastructure_files/management.json.tmpl (+11 -1)
📝 management/README.md (+1 -1)
📝 management/client/client_test.go (+1 -1)
📝 management/cmd/management.go (+6 -1)
📝 management/server/account.go (+28 -1)
📝 management/server/account_test.go (+31 -1)
📝 management/server/config.go (+3 -0)
📝 management/server/http/handler/peers.go (+8 -5)
📝 management/server/http/handler/setupkeys.go (+7 -6)
📝 management/server/http/handler/util.go (+8 -4)
📝 management/server/http/server.go (+2 -2)
management/server/idp/auth0.go (+207 -0)
management/server/idp/auth0_test.go (+403 -0)
management/server/idp/idp.go (+63 -0)
management/server/idp/util.go (+13 -0)
📝 management/server/management_proto_test.go (+1 -1)
📝 management/server/management_test.go (+1 -1)

...and 1 more files

📄 Description

  • idpmanager interface for managing external IDP providers
  • auth0manager for managing Auth0
  • check if wt_account_id attribute was provided within the JWT token
  • if no wt_account_id was provided, associate it to the user id in auth0
  • new configuration options for idpmanager
  • updated tests

closes #173


🔄 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/184 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 1/8/2022 **Status:** ✅ Merged **Merged:** 1/24/2022 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `link-account-id-with-external` --- ### 📝 Commits (10+) - [`d8093bc`](https://github.com/netbirdio/netbird/commit/d8093bc68e105be605df626c3cfc86adefd7a977) get account id from access token claim - [`b478cf0`](https://github.com/netbirdio/netbird/commit/b478cf08501b9ddf80524d5efbcd6711b10ed6ba) use GetOrCreateAccountByUser and add test - [`08a6cef`](https://github.com/netbirdio/netbird/commit/08a6cefbda4773c73efea40aca4a0ad4caec1409) correct account id claim - [`7065959`](https://github.com/netbirdio/netbird/commit/7065959513aa879d5d887c5fe2bee642f70ad2b9) remove unused account - [`43e1e8c`](https://github.com/netbirdio/netbird/commit/43e1e8c57f42bca29cf883aada78a906219f24ff) Idp manager interface - [`7d8241d`](https://github.com/netbirdio/netbird/commit/7d8241d4e30acdc042093bed908d02bcd7bd7015) auth0 idp manager - [`9258a2c`](https://github.com/netbirdio/netbird/commit/9258a2c455608290745e1737c9fef4fb6f2f7308) use if instead of switch case - [`f74e4cb`](https://github.com/netbirdio/netbird/commit/f74e4cbcfd9e3cafb82ace9be63710d14f546834) remove unnecessary lock - [`c18c377`](https://github.com/netbirdio/netbird/commit/c18c377e53a7bd38ab023605d79f850dbd4f4ee3) NewAuth0Manager - [`618539d`](https://github.com/netbirdio/netbird/commit/618539d49bad382c9f5b7ff11d39d9b39674a911) move idpmanager to its own package ### 📊 Changes **21 files changed** (+806 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/testutil.go` (+1 -1) 📝 `client/internal/engine_test.go` (+1 -1) 📝 `go.sum` (+0 -1) 📝 `infrastructure_files/management.json.tmpl` (+11 -1) 📝 `management/README.md` (+1 -1) 📝 `management/client/client_test.go` (+1 -1) 📝 `management/cmd/management.go` (+6 -1) 📝 `management/server/account.go` (+28 -1) 📝 `management/server/account_test.go` (+31 -1) 📝 `management/server/config.go` (+3 -0) 📝 `management/server/http/handler/peers.go` (+8 -5) 📝 `management/server/http/handler/setupkeys.go` (+7 -6) 📝 `management/server/http/handler/util.go` (+8 -4) 📝 `management/server/http/server.go` (+2 -2) ➕ `management/server/idp/auth0.go` (+207 -0) ➕ `management/server/idp/auth0_test.go` (+403 -0) ➕ `management/server/idp/idp.go` (+63 -0) ➕ `management/server/idp/util.go` (+13 -0) 📝 `management/server/management_proto_test.go` (+1 -1) 📝 `management/server/management_test.go` (+1 -1) _...and 1 more files_ </details> ### 📄 Description * idpmanager interface for managing external IDP providers * auth0manager for managing Auth0 * check if wt_account_id attribute was provided within the JWT token * if no wt_account_id was provided, associate it to the user id in auth0 * new configuration options for idpmanager * updated tests closes #173 --- <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 2025-11-20 07:11:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2596