mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-19 11:20:18 +02:00
Implement posture check execution in policy
This commit is contained in:
@@ -219,6 +219,21 @@ func (a *Account) getPeerConnectionResources(peerID string) ([]*nbpeer.Peer, []*
|
||||
continue
|
||||
}
|
||||
|
||||
// TODO: implement posture checks executions based on policy
|
||||
|
||||
peer, ok := a.Peers[peerID]
|
||||
if !ok && peer == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if policy.PostureCheck.OSVersionCheck.Enabled {
|
||||
err := policy.PostureCheck.OSVersionCheck.Check(*peer)
|
||||
if err != nil {
|
||||
log.Debugf(err.Error())
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
for _, rule := range policy.Rules {
|
||||
if !rule.Enabled {
|
||||
continue
|
||||
|
Reference in New Issue
Block a user