package
17.12.1-ce-rc2+incompatible
Repository: https://github.com/docker/cli.git
Documentation: pkg.go.dev
# Functions
GetPluginGetter gets the plugingetter.
NewCtx creates new authZ context, it is used to store authorization information related to a specific docker REST http session A context provides two method: Authenticate Request: Call authZ plugins with current REST request and AuthN response Request contains full HTTP packet sent to the docker daemon https://docs.docker.com/engine/reference/api/
Authenticate Response: Call authZ plugins with full info about current REST request, REST response and AuthN response The response from this method may contains content that overrides the daemon response This allows authZ plugins to filter privileged content
If multiple authZ plugins are specified, the block/allow decision is based on ANDing all plugin results For response manipulation, the response from each plugin is piped between plugins.
NewMiddleware creates a new Middleware with a slice of plugins names.
NewResponseModifier creates a wrapper to an http.ResponseWriter to allow inspecting and modifying the content.
SetPluginGetter sets the plugingetter.
# Constants
AuthZApiImplements is the name of the interface all AuthZ plugins implement.
AuthZApiRequest is the url for daemon request authorization.
AuthZApiResponse is the url for daemon response authorization.
# Structs
Ctx stores a single request-response interaction context.
Middleware uses a list of plugins to handle authorization in the API requests.
Request holds data required for authZ plugins.
Response represents authZ plugin response.
# Interfaces
Plugin allows third party plugins to authorize requests and responses in the context of docker API.
ResponseModifier allows authorization plugins to read and modify the content of the http.response.
# Type aliases
PeerCertificate is a wrapper around x509.Certificate which provides a sane encoding/decoding to/from PEM format and JSON.