mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-04 22:10:56 +01:00
Implement posture check execution in policy
This commit is contained in:
parent
3a717368f7
commit
ea01ef79f7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user