README
¶
Docker authz extension api.
Go handler to create external authz extensions for Docker.
Usage
This library is designed to be integrated in your program.
- Implement the
authz.Plugin
interface. - Initialize a
authz.Handler
with your implementation. - Call either
ServeTCP
orServeUnix
from theauthz.Handler
.
Example using TCP sockets:
p := MyAuthZPlugin{}
h := authz.NewHandler(p)
h.ServeTCP("test_plugin", ":8080")
Example using Unix sockets:
p := MyAuthZPlugin{}
h := authz.NewHandler(p)
h.ServeUnix("root", "test_plugin")
Full example plugins
License
MIT
Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
sdk.Handler
// contains filtered or unexported fields
}
Handler forwards requests and responses between the docker daemon and the plugin.
func NewHandler ¶
func NewHandler(plugin Plugin) *Handler
NewHandler initializes the request handler with a plugin implementation.
type Plugin ¶
type Plugin interface {
AuthZReq(Request) Response
AuthZRes(Request) Response
}
Plugin represent the interface a plugin must fulfill.
Click to show internal directories.
Click to hide internal directories.