[PR #1500] [MERGED] Add Geo Location posture check #17210

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1500
Author: @bcmmbaga
Created: 1/27/2024
Status: Merged
Merged: 2/1/2024
Merged by: @bcmmbaga

Base: feature/posture-checksHead: geo-posture-check


📝 Commits (10+)

  • fae6d26 wip: implement geolocation check
  • 5e5c431 add geo location posture checks to posture api
  • db8ede4 Merge branch 'feature/posture-checks' into geo-posture-check
  • 97a9c38 Merge branch 'feature/posture-checks' into geo-posture-check
  • a777ba8 Remove CityGeoNameID and update required fields in API
  • c894fc1 Add geoLocation checks to posture checks handler tests
  • 36b58d8 Implement geo location-based checks for peers
  • 00c7c00 Update test values and embed location struct in peer system
  • d2d5f2b add support for country wide checks
  • 3d34149 initialize country code regex once

📊 Changes

8 files changed (+555 additions, -3 deletions)

View changed files

📝 management/server/http/api/openapi.yml (+35 -1)
📝 management/server/http/api/types.gen.go (+30 -0)
📝 management/server/http/posture_checks_handler.go (+63 -1)
📝 management/server/http/posture_checks_handler_test.go (+130 -1)
📝 management/server/peer/peer.go (+6 -0)
📝 management/server/posture/checks.go (+7 -0)
management/server/posture/geo_location.go (+60 -0)
management/server/posture/geo_location_test.go (+224 -0)

📄 Description

Describe your changes

This PR extends the existing /api/posture-checks endpoint with Geo location check.

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/1500 **Author:** [@bcmmbaga](https://github.com/bcmmbaga) **Created:** 1/27/2024 **Status:** ✅ Merged **Merged:** 2/1/2024 **Merged by:** [@bcmmbaga](https://github.com/bcmmbaga) **Base:** `feature/posture-checks` ← **Head:** `geo-posture-check` --- ### 📝 Commits (10+) - [`fae6d26`](https://github.com/netbirdio/netbird/commit/fae6d26b303c4e13d3556d51aa6cb9e81099592f) wip: implement geolocation check - [`5e5c431`](https://github.com/netbirdio/netbird/commit/5e5c4317990212981189ff9a6373e119561fd7ab) add geo location posture checks to posture api - [`db8ede4`](https://github.com/netbirdio/netbird/commit/db8ede49955557c88f7f9f490767053978752c93) Merge branch 'feature/posture-checks' into geo-posture-check - [`97a9c38`](https://github.com/netbirdio/netbird/commit/97a9c389ecb111cbd24a7f7229823d845a6c9c19) Merge branch 'feature/posture-checks' into geo-posture-check - [`a777ba8`](https://github.com/netbirdio/netbird/commit/a777ba8d64b60d2e619febe21cfbcf2dfa96a9ed) Remove CityGeoNameID and update required fields in API - [`c894fc1`](https://github.com/netbirdio/netbird/commit/c894fc13574e013391834c17ae925bd833c0a677) Add geoLocation checks to posture checks handler tests - [`36b58d8`](https://github.com/netbirdio/netbird/commit/36b58d89d63cf77403d88538d58a0403f309fe2c) Implement geo location-based checks for peers - [`00c7c00`](https://github.com/netbirdio/netbird/commit/00c7c00f11b938a0b4ff8cbd68f5f687db024749) Update test values and embed location struct in peer system - [`d2d5f2b`](https://github.com/netbirdio/netbird/commit/d2d5f2bb4d9a5b7ae3dbc26a538facabc42009b2) add support for country wide checks - [`3d34149`](https://github.com/netbirdio/netbird/commit/3d341491ea0b9dfed5c1ead05cb3692beddf77bd) initialize country code regex once ### 📊 Changes **8 files changed** (+555 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `management/server/http/api/openapi.yml` (+35 -1) 📝 `management/server/http/api/types.gen.go` (+30 -0) 📝 `management/server/http/posture_checks_handler.go` (+63 -1) 📝 `management/server/http/posture_checks_handler_test.go` (+130 -1) 📝 `management/server/peer/peer.go` (+6 -0) 📝 `management/server/posture/checks.go` (+7 -0) ➕ `management/server/posture/geo_location.go` (+60 -0) ➕ `management/server/posture/geo_location_test.go` (+224 -0) </details> ### 📄 Description ## Describe your changes This PR extends the existing `/api/posture-checks` endpoint with Geo location check. ## 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 - [ ] 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 04:07:03 -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#17210