[PR #5529] [MERGED] [management] fix domain uniqueness #26089

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5529
Author: @pascal-fischer
Created: 3/6/2026
Status: Merged
Merged: 3/7/2026
Merged by: @pascal-fischer

Base: mainHead: fix/domain-uniqueness-over-accounts


📝 Commits (3)

📊 Changes

7 files changed (+46 additions, -48 deletions)

View changed files

📝 management/internals/modules/reverseproxy/service/manager/expose_tracker_test.go (+4 -4)
📝 management/internals/modules/reverseproxy/service/manager/manager.go (+7 -7)
📝 management/internals/modules/reverseproxy/service/manager/manager_test.go (+18 -20)
📝 management/internals/modules/reverseproxy/service/service.go (+10 -10)
📝 management/server/store/sql_store.go (+2 -2)
📝 management/server/store/store.go (+1 -1)
📝 management/server/store/store_mock.go (+4 -4)

📄 Description

Describe your changes

Stack

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)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • Refactor
    • Domain lookup simplified to use domain as the sole identifier; call paths updated and database now enforces a unique, length-constrained index on domain.
  • Bug Fixes
    • Service retrieval consistently returns decrypted data; tests and mocks updated to match domain-only lookups and standardized domain-collision messaging ("domain already taken").

🔄 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/5529 **Author:** [@pascal-fischer](https://github.com/pascal-fischer) **Created:** 3/6/2026 **Status:** ✅ Merged **Merged:** 3/7/2026 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `fix/domain-uniqueness-over-accounts` --- ### 📝 Commits (3) - [`0a3c6eb`](https://github.com/netbirdio/netbird/commit/0a3c6eb6f3796541bc313c78764160df4d979e83) make sure a domain is unique - [`ccbd554`](https://github.com/netbirdio/netbird/commit/ccbd554b4292bc271c75963a1a7a810dd78b6bf5) update type for mysql - [`3d9f3b0`](https://github.com/netbirdio/netbird/commit/3d9f3b003d52ac02249124727f772109c31257ac) update error response ### 📊 Changes **7 files changed** (+46 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `management/internals/modules/reverseproxy/service/manager/expose_tracker_test.go` (+4 -4) 📝 `management/internals/modules/reverseproxy/service/manager/manager.go` (+7 -7) 📝 `management/internals/modules/reverseproxy/service/manager/manager_test.go` (+18 -20) 📝 `management/internals/modules/reverseproxy/service/service.go` (+10 -10) 📝 `management/server/store/sql_store.go` (+2 -2) 📝 `management/server/store/store.go` (+1 -1) 📝 `management/server/store/store_mock.go` (+4 -4) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [x] 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) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Domain lookup simplified to use domain as the sole identifier; call paths updated and database now enforces a unique, length-constrained index on domain. * **Bug Fixes** * Service retrieval consistently returns decrypted data; tests and mocks updated to match domain-only lookups and standardized domain-collision messaging ("domain already taken"). <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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 07:06:52 -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#26089