network

package
v1.30.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL