Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInProcessAuthorizer ¶
NewInProcessAuthorizer creates a new rbac.Authorizer that works in-process.
func NewRESTAuthorizer ¶
func NewRESTAuthorizer(u *url.URL, opts ...Option) rbac.Authorizer
NewRESTAuthorizer creates a new rbac.Authorizer that works against an OPA endpoint.
Types ¶
type Input ¶
type Input struct { Groups []string `json:"groups"` Permission rbac.Permission `json:"permission"` Resource string `json:"resource"` Subject string `json:"subject"` Tenant string `json:"tenant"` }
Input models the data that is used for OPA input documents.
type Option ¶
type Option func(c *config)
Option modifies the configuration of an OPA authorizer.
func LoggerOption ¶
LoggerOption sets a custom logger for the authorizer.
func RegistererOption ¶
func RegistererOption(r prometheus.Registerer) Option
RegistererOption sets a Prometheus registerer for the authorizer.
Click to show internal directories.
Click to hide internal directories.