Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend management to sync meta and posture checks with peer #1727

Merged
merged 16 commits into from
Apr 15, 2024

Conversation

bcmmbaga
Copy link
Contributor

Describe your changes

Extends the management behavior as follows:

  • Upon peer login, the management will also include the posture checks applied on the peer, which are to be evaluated on the client.
  • During synchronization, the management will receive the updated peer metadata, update them if there are any changes, and return the currently applied posture checks on the peer.

Issue ticket number and link

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

@bcmmbaga bcmmbaga changed the base branch from main to add-process-posture-check March 18, 2024 15:41
@bcmmbaga bcmmbaga marked this pull request as ready for review March 21, 2024 18:40
* 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
@bcmmbaga bcmmbaga merged commit c6ab215 into add-process-posture-check Apr 15, 2024
18 of 19 checks passed
@bcmmbaga bcmmbaga deleted the peer-meta-sync branch April 15, 2024 13:00
bcmmbaga added a commit that referenced this pull request Jun 10, 2024
* wip: add process check posture

* add process posture check to posture checks handlers

* Extend peer metadata with processes

* Add process validation for peer metadata

* fix tests

* Allow set of single unix or windows path check

* Add single Unix/Windows path check in process tests

* Refactor

* Fix tests

* Fix linters

* 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

* 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

* fix merge conflicts

* go mod tidy

* split unix path into a linux and mac path (#1893)

* Fix peer sync metadata

* go mod tidy

* remove comment from merge

* Fix SonarCloud issues (#2096)

* Fix posture check sonar lint errors

* Refactor error handling and streamline connection process in grpc client

* Refactor GRPC server code for improved readability

* Refactoring

* Remove duplicate GetPeerAppliedPostureChecks method

* Regenerate mgmnt protocol messages

---------

Co-authored-by: Pascal Fischer <pascal@netbird.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants