mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-19 03:16:58 +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
|
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 {
|
for _, rule := range policy.Rules {
|
||||||
if !rule.Enabled {
|
if !rule.Enabled {
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user