Documentation ¶
Index ¶
- func Manage(rbac *Rbac) node.Node
- type AccessControl
- type Auth
- type Cert
- type CertHandler
- type Generator
- type Permission
- type Rbac
- type Role
- func (role *Role) CheckActionPreConstraints(r *node.ActionRequest) (bool, error)
- func (role *Role) CheckContainerPreConstraints(r *node.ChildRequest) (bool, error)
- func (role *Role) CheckFieldPreConstraints(r *node.FieldRequest, hnd *node.ValueHandle) (bool, error)
- func (role *Role) CheckListPreConstraints(r *node.ListRequest) (bool, error)
- func (role *Role) CheckNotifyFilterConstraints(msg *node.Selection) (bool, error)
- func (role *Role) ContextConstraint(s *node.Selection) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessControl ¶
type AccessControl struct { Path string Permissions Permission }
type Auth ¶
type Auth interface {
ConstrainRoot(role string, c *node.Constraints)
}
type Cert ¶
type Cert struct { PrivateKey *rsa.PrivateKey Cert *x509.Certificate Raw []byte }
type CertHandler ¶
func (*CertHandler) VerifyRequest ¶
func (self *CertHandler) VerifyRequest(certs []*x509.Certificate) error
type Rbac ¶
This does not implement NETMOD ACLs, but rather a simplistic implementation to be both useful and example of more complex implementations
func (*Rbac) ConstrainRoot ¶
func (self *Rbac) ConstrainRoot(role string, c *node.Constraints)
type Role ¶
type Role struct { Id string Access map[string]*AccessControl }
func (*Role) CheckActionPreConstraints ¶
func (role *Role) CheckActionPreConstraints(r *node.ActionRequest) (bool, error)
func (*Role) CheckContainerPreConstraints ¶
func (role *Role) CheckContainerPreConstraints(r *node.ChildRequest) (bool, error)
func (*Role) CheckFieldPreConstraints ¶
func (role *Role) CheckFieldPreConstraints(r *node.FieldRequest, hnd *node.ValueHandle) (bool, error)
func (*Role) CheckListPreConstraints ¶
func (role *Role) CheckListPreConstraints(r *node.ListRequest) (bool, error)
func (*Role) CheckNotifyFilterConstraints ¶
Click to show internal directories.
Click to hide internal directories.