Documentation
¶
Index ¶
- func IsPrincipalAuthorised(user string, allowList []string, denyList []string) bool
- type Listener
- type NetworkACL
- func (a *NetworkACL) Allow(n *net.IPNet)
- func (a *NetworkACL) AllowFromString(n string) error
- func (a *NetworkACL) Authorise(addr *net.TCPAddr) bool
- func (a *NetworkACL) AuthoriseConn(c net.Conn) (bool, error)
- func (a *NetworkACL) AuthoriseFromString(addr string) (bool, error)
- func (a *NetworkACL) Deny(net *net.IPNet)
- func (a *NetworkACL) DenyFromString(n string) error
- type NetworkACLConfig
- type PrincipalACLConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Listener ¶
type Listener struct {
NetworkACL *NetworkACL
Listener net.Listener
Logger zerolog.Logger
}
type NetworkACL ¶
type NetworkACL struct {
AllowByDefault bool
// contains filtered or unexported fields
}
func NewNetworkACL ¶
func NewNetworkACL(cfg NetworkACLConfig) (*NetworkACL, error)
func (*NetworkACL) Allow ¶
func (a *NetworkACL) Allow(n *net.IPNet)
func (*NetworkACL) AllowFromString ¶
func (a *NetworkACL) AllowFromString(n string) error
func (*NetworkACL) Authorise ¶
func (a *NetworkACL) Authorise(addr *net.TCPAddr) bool
Authorise if both allow is checked first, if empty if ip is in allow but also matches deny, authorisation is denied this is to allow people to deny subsets of allowed CIDR ranges.
func (*NetworkACL) AuthoriseConn ¶
func (a *NetworkACL) AuthoriseConn(c net.Conn) (bool, error)
func (*NetworkACL) AuthoriseFromString ¶
func (a *NetworkACL) AuthoriseFromString(addr string) (bool, error)
func (*NetworkACL) Deny ¶
func (a *NetworkACL) Deny(net *net.IPNet)
func (*NetworkACL) DenyFromString ¶
func (a *NetworkACL) DenyFromString(n string) error
type NetworkACLConfig ¶
type PrincipalACLConfig ¶
Click to show internal directories.
Click to hide internal directories.