[PR #714] [MERGED] Check peer expiration after ACL check #12913

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/714
Author: @braginini
Created: 3/2/2023
Status: Merged
Merged: 3/2/2023
Merged by: @braginini

Base: mainHead: fix/peer_expiry_network_map


📝 Commits (4)

  • 34b7b79 Check peer expiration after ACL check
  • 9924328 Move AddedWithSSOLogin check to LoginExpired
  • 3656635 Move AddedWithSSOLogin check to LoginExpired
  • 920e03f Fix tests

📊 Changes

3 files changed (+20 additions, -7 deletions)

View changed files

📝 management/server/account_test.go (+3 -0)
📝 management/server/peer.go (+16 -7)
📝 management/server/peer_test.go (+1 -0)

📄 Description

Describe your changes

Bug 1: When calculating the network map, peers added by a setup key
were falling under expiration logic while they shouldn't.

Bug 2: Peers HTTP API didn't return expired peers for non-admin users
because of the expired peer check in the ACL logic.

The fix applies peer expiration checks outside of the ACL logic.

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/714 **Author:** [@braginini](https://github.com/braginini) **Created:** 3/2/2023 **Status:** ✅ Merged **Merged:** 3/2/2023 **Merged by:** [@braginini](https://github.com/braginini) **Base:** `main` ← **Head:** `fix/peer_expiry_network_map` --- ### 📝 Commits (4) - [`34b7b79`](https://github.com/netbirdio/netbird/commit/34b7b795fc92cbb67678c02ebf610d18328bcdc5) Check peer expiration after ACL check - [`9924328`](https://github.com/netbirdio/netbird/commit/9924328bce923112cf23f00e0abd9815f131da33) Move AddedWithSSOLogin check to LoginExpired - [`3656635`](https://github.com/netbirdio/netbird/commit/365663543e133abbad6bb603a1b13bf94b406cf9) Move AddedWithSSOLogin check to LoginExpired - [`920e03f`](https://github.com/netbirdio/netbird/commit/920e03f039590fb91ed2bd248da3446a3d68f6ec) Fix tests ### 📊 Changes **3 files changed** (+20 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account_test.go` (+3 -0) 📝 `management/server/peer.go` (+16 -7) 📝 `management/server/peer_test.go` (+1 -0) </details> ### 📄 Description ## Describe your changes Bug 1: When calculating the network map, peers added by a setup key were falling under expiration logic while they shouldn't. Bug 2: Peers HTTP API didn't return expired peers for non-admin users because of the expired peer check in the ACL logic. The fix applies peer expiration checks outside of the ACL logic. ## Issue ticket number and link ### 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) - [ ] 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:06:59 -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#12913