Documentation ¶
Index ¶
- Constants
- func SecurityGroupHasAllowRuleForDestination(nsg *aznetwork.SecurityGroup, protocol aznetwork.SecurityRuleProtocol, ...) bool
- func SecurityGroupHasDenyAllRuleForDestination(nsg *aznetwork.SecurityGroup, dstAddresses []netip.Addr) bool
- func SecurityGroupNotHasRuleForDestination(nsg *aznetwork.SecurityGroup, dstAddresses []netip.Addr) bool
- type SecurityGroupValidator
- func (v *SecurityGroupValidator) HasDenyAllRuleForDestination(dstAddresses []netip.Addr) bool
- func (v *SecurityGroupValidator) HasExactAllowRule(protocol aznetwork.SecurityRuleProtocol, srcPrefixes []string, ...) bool
- func (v *SecurityGroupValidator) NotHasRuleForDestination(dstAddresses []netip.Addr) bool
Constants ¶
View Source
const (
IPV6Prefix = "IPv6"
)
Variables ¶
This section is empty.
Functions ¶
func SecurityGroupHasAllowRuleForDestination ¶ added in v1.29.0
func SecurityGroupHasAllowRuleForDestination( nsg *aznetwork.SecurityGroup, protocol aznetwork.SecurityRuleProtocol, srcPrefixes []string, dstAddresses []netip.Addr, dstPorts []string, ) bool
func SecurityGroupHasDenyAllRuleForDestination ¶ added in v1.29.0
func SecurityGroupHasDenyAllRuleForDestination(nsg *aznetwork.SecurityGroup, dstAddresses []netip.Addr) bool
func SecurityGroupNotHasRuleForDestination ¶ added in v1.29.0
func SecurityGroupNotHasRuleForDestination(nsg *aznetwork.SecurityGroup, dstAddresses []netip.Addr) bool
Types ¶
type SecurityGroupValidator ¶ added in v1.29.0
type SecurityGroupValidator struct {
// contains filtered or unexported fields
}
func NewSecurityGroupValidator ¶ added in v1.29.0
func NewSecurityGroupValidator(nsgs []*aznetwork.SecurityGroup) *SecurityGroupValidator
func (*SecurityGroupValidator) HasDenyAllRuleForDestination ¶ added in v1.29.0
func (v *SecurityGroupValidator) HasDenyAllRuleForDestination(dstAddresses []netip.Addr) bool
HasDenyAllRuleForDestination checks if the security group has a rule that denies all traffic to the given destination addresses.
func (*SecurityGroupValidator) HasExactAllowRule ¶ added in v1.29.0
func (v *SecurityGroupValidator) HasExactAllowRule( protocol aznetwork.SecurityRuleProtocol, srcPrefixes []string, dstAddresses []netip.Addr, dstPorts []string, ) bool
HasExactAllowRule checks if the security group has a rule that allows traffic from the given source prefixes to the given destination addresses and ports.
func (*SecurityGroupValidator) NotHasRuleForDestination ¶ added in v1.29.0
func (v *SecurityGroupValidator) NotHasRuleForDestination(dstAddresses []netip.Addr) bool
NotHasRuleForDestination checks if the security group has a rule specifying the given destination addresses.
Click to show internal directories.
Click to hide internal directories.