Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CasbinAuthZPlugin ¶
type CasbinAuthZPlugin struct {
// contains filtered or unexported fields
}
CasbinAuthZPlugin is the Casbin Authorization Plugin
func NewPlugin ¶
func NewPlugin(casbinModel string, casbinPolicy string) (*CasbinAuthZPlugin, error)
newPlugin creates a new casbin authorization plugin
func (*CasbinAuthZPlugin) AuthZReq ¶
func (plugin *CasbinAuthZPlugin) AuthZReq(req authorization.Request) authorization.Response
AuthZReq authorizes the docker client command. The command is allowed only if it matches a Casbin policy rule. Otherwise, the request is denied!
func (*CasbinAuthZPlugin) AuthZRes ¶
func (plugin *CasbinAuthZPlugin) AuthZRes(req authorization.Request) authorization.Response
AuthZRes authorizes the docker client response. All responses are allowed by default.
Click to show internal directories.
Click to hide internal directories.