Compare commits

...

3 Commits

Author SHA1 Message Date
bcmmbaga
feb8e90ae1 Evaluate all applied posture checks on source peers only
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
2024-12-27 23:28:34 +03:00
bcmmbaga
076d6d8a87 Evaluate all applied posture checks once
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
2024-12-27 22:12:47 +03:00
bcmmbaga
c8c25221bd Apply policy posture checks on peer
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
2024-12-27 21:49:28 +03:00

View File

@@ -1319,6 +1319,18 @@ func (a *Account) GetNetworkResourcesRoutesToSync(ctx context.Context, peerID st
}
}
if !addSourcePeers {
var peerPostureChecks []string
for _, policy := range resourcePolicies[resource.ID] {
peerPostureChecks = append(peerPostureChecks, policy.SourcePostureChecks...)
}
isValid := a.validatePostureChecksOnPeer(ctx, peerPostureChecks, peerID)
if !isValid {
continue
}
}
for _, policy := range resourcePolicies[resource.ID] {
for _, sourceGroup := range policy.SourceGroups() {
group := a.GetGroup(sourceGroup)