NET-1784: Adv Acl Rules (#3239)

* define direction on acl req

* define protocol types and rule model

* get rules for node

* fetch acl rule for a node

* redine acl firewall model

* add json tags

* update port,protocol, and direction

* add json tags to acl options

* convert protocol to string

* simplify acl map

* add json tags to acl rules

* add networks to fw update

* add acls rules

* NET-1784: add allow all field

* add allow all field on fw udpate

* remove debug logs

* fix port and protocol types

* migrate default acl policies

* define constants for service types

* add adv options for user rules on ingress gw

* debug log

* allow whole network

* add static nodes to acl rules

* replace peers on acl updates

* initiliase rule map

* add user acl rules on target node

* revert acl check on extclient

* handle static node rules on ingress gw

* update multiple policies for users

* check allowed direction

* remove debug logs
This commit is contained in:
Abhishek K
2024-12-10 11:21:14 +04:00
committed by GitHub
parent 31c2311bef
commit f124b10c35
12 changed files with 707 additions and 118 deletions

View File

@@ -215,6 +215,19 @@ func (node *Node) PrimaryAddress() string {
return node.Address6.IP.String()
}
func (node *Node) AddressIPNet4() net.IPNet {
return net.IPNet{
IP: node.Address.IP,
Mask: net.CIDRMask(32, 32),
}
}
func (node *Node) AddressIPNet6() net.IPNet {
return net.IPNet{
IP: node.Address6.IP,
Mask: net.CIDRMask(128, 128),
}
}
// ExtClient.PrimaryAddress - returns ipv4 IPNet format
func (extPeer *ExtClient) AddressIPNet4() net.IPNet {
return net.IPNet{