Commit Graph

592 Commits

Author SHA1 Message Date
bf4767211a Merge branch 'refs/heads/feature/optimize_sqlite_save' into deploy/posture-check-sqlite 2024-04-18 11:05:06 +03:00
515ce9e3af Update management/server/sqlite_store.go 2024-04-17 20:55:32 +02:00
89383b7f01 Update management/server/sqlite_store.go 2024-04-17 20:55:01 +02:00
db34162733 Update management/server/sqlite_store.go 2024-04-17 20:54:14 +02:00
bd761e2177 Update management/server/sqlite_store.go 2024-04-17 20:53:32 +02:00
4e1b95a4c6 Update management/server/sqlite_store.go 2024-04-17 20:53:24 +02:00
05993af7bf Update management/server/sqlite_store.go 2024-04-17 20:53:11 +02:00
9d1cb00570 Fix setup keys test 2024-04-17 20:27:55 +02:00
543731df45 Fix setup keys test 2024-04-17 19:58:24 +02:00
e6628ec231 Fix setup keys 2024-04-17 19:48:09 +02:00
41d4dd2aff reduce log level of scheduler to trace 2024-04-17 19:34:59 +02:00
30bed57711 Fix account deletion 2024-04-17 19:12:53 +02:00
6960b68322 Add pats to test save account 2024-04-17 19:07:17 +02:00
3b3aa18148 Store setup keys and ns groups in a batch 2024-04-17 18:32:13 +02:00
93045f3e3a Fix rand lint issue 2024-04-17 18:07:02 +02:00
fd3c1dea8e Add save large account test 2024-04-17 18:02:10 +02:00
48aff7a26e Fix test compilation errors 2024-04-17 17:39:28 +02:00
83dfe8e3a3 Fix test compilation errors 2024-04-17 17:27:23 +02:00
38e10af2d9 Add accountID reference 2024-04-17 17:16:56 +02:00
99854a126a Add comments 2024-04-17 17:08:01 +02:00
a75f982fcd Copy account when storing to avoid reference issues 2024-04-17 17:03:21 +02:00
e7a6483912 Optimize all other objects storing in SQLite 2024-04-17 12:35:41 +02:00
30ede299b8 Optimize peer storing in SQLite 2024-04-17 11:50:33 +02:00
6bfd1b2886 fix merge conflicts 2024-04-15 16:18:41 +03:00
8aa32a2da5 Merge branch 'refs/heads/main' into add-process-posture-check
# Conflicts:
#	management/server/peer.go
2024-04-15 16:14:21 +03:00
c6ab215d9d Extend management to sync meta and posture checks with peer (#1727)
* Add method to retrieve peer's applied posture checks

* Add posture checks in server response and update proto messages

* Refactor

* Extends peer metadata synchronization through SyncRequest and propagate posture changes on syncResponse

* Remove account lock

* Pass system info on sync

* Fix tests

* Refactor

* resolve merge

* Evaluate process check on client (#1749)

* implement  server and client sync peer meta alongside mocks

* wip: add check file and process

* Add files to peer metadata for process check

* wip: update peer meta on first sync

* Add files to peer's metadata

* Evaluate process check using files from peer metadata

* Fix panic and append windows path to files

* Fix check network address and files equality

* Evaluate active process on darwin

* Evaluate active process on linux

* Skip processing processes if no paths are set

* Return network map on peer meta-sync and update account peer's

* Update client network map on meta sync

* Get system info with applied checks

* Add windows package

* Remove a network map from sync meta-response

* Update checks proto message

* Keep client checks state and sync meta on checks change

* Evaluate a running process

* skip build for android and ios

* skip check file and process for android and ios

* bump gopsutil version

* fix tests

* move process check to separate os file

* refactor

* evaluate info with checks on receiving management events

* skip meta-update for an old client with no meta-sync support

* Check if peer meta is empty without reflection
2024-04-15 16:00:57 +03:00
e0de86d6c9 Use fixed activity codes (#1846)
* Add duplicate constants check
2024-04-15 14:15:46 +02:00
5204d07811 Pass integrated validator for API (#1814)
Pass integrated validator for API handler
2024-04-15 12:08:38 +02:00
9505805313 Rename variable (#1829) 2024-04-11 14:08:03 +02:00
704c67dec8 Allow owners that did not create the account to delete it (#1825)
Sometimes the Owner role will be passed to new users, and they need to be able to delete the account
2024-04-11 10:02:51 +02:00
36582d13aa Merge branch 'refs/heads/main' into add-process-posture-check 2024-04-10 17:58:46 +03:00
c28657710a Fix function names in comments (#1816)
Signed-off-by: verytrap <wangqiuyue@outlook.com>
2024-04-09 13:18:38 +02:00
3875c29f6b Revert "Rollback new routing functionality (#1805)" (#1813)
This reverts commit 9f32ccd453.
2024-04-08 18:56:52 +02:00
9f32ccd453 Rollback new routing functionality (#1805) 2024-04-05 20:38:49 +02:00
9af532fe71 Get scope from endpoint url instead of hardcoding (#1770) 2024-04-02 13:43:57 +02:00
22beac1b1b Fix invalid token due to the cache race (#1763) 2024-03-28 12:33:56 +01:00
2d76b058fc Feature/peer validator (#1553)
Follow up management-integrations changes

move groups to separated packages to avoid circle dependencies
save location information in Login action
2024-03-27 18:48:48 +01:00
ea2d060f93 Add limited dashboard view (#1738) 2024-03-27 16:11:45 +01:00
af50eb350f Change log level for JWT override message of single account mode (#1747) 2024-03-25 14:25:26 +01:00
2727680123 Merge branch 'main' into add-process-posture-check 2024-03-21 21:30:40 +03:00
2475473227 Support client default routes for Linux (#1667)
All routes are now installed in a custom netbird routing table.
Management and wireguard traffic is now marked with a custom fwmark.
When the mark is present the traffic is routed via the main routing table, bypassing the VPN.
When the mark is absent the traffic is routed via the netbird routing table, if:
- there's no match in the main routing table
- it would match the default route in the routing table

IPv6 traffic is blocked when a default route IPv4 route is configured to avoid leakage.
2024-03-21 16:49:28 +01:00
9dcaa51b68 Merge branch 'main' into add-process-posture-check 2024-03-18 18:41:38 +03:00
f0672b87bc Add missing dns domain to tests to avoid verbose test logs (#1724) 2024-03-18 12:25:01 +01:00
9b0fe2c8e5 Validate authentik issuer url (#1723)
* Validate authentik issuer url

* test issuer

* adjust test times on windows
2024-03-18 10:12:46 +01:00
abd57d1191 Avoid creating duplicate groups with the same name (#1579)
Avoid creating groups with the same name via API calls. 

JWT and integrations still allowed to register groups with duplicated names
2024-03-17 11:13:39 +01:00
fc7c1e397f Disable force jsonfile variable (#1611)
This enables windows management tests

Added another DNS server to the dns server tests
2024-03-15 10:50:02 +01:00
52a3ac6b06 Add support for inviting/deleting users via Zitadel (#1572)
This fixes the "Invite User" button in Dashboard v2.0.0
and enables the usage of the --user-delete-from-idp flag for Zitadel.

Unlike the NetBird SaaS solution, we rely on Zitadel to send
the emails on our behalf.
2024-03-15 10:32:51 +01:00
0b3b50c705 Remove deprecated Rules API endpoints (#1523) 2024-03-14 21:31:21 +01:00
180f5a122e Refactor posture check validations (#1705)
* Add posture checks validation

* Refactor code to incorporate posture checks validation directly into management.

* Add posture checks validation for geolocation, OS version, network, process, and NB-version

* Fix tests
2024-03-14 20:16:50 +00:00
042141db06 Update account attributes only when there is a domain (#1701)
add log for when a domain is not present
2024-03-14 14:17:22 +01:00