Documentation ¶
Overview ¶
Package evaluator defines a Evaluator interfaces that can be implemented by a policy evaluator framework.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluator ¶
type Evaluator interface { IsAuthorized(ctx context.Context, input interface{}) (*pb.IsAuthorizedReply, error) PutData(ctx context.Context, data map[string]interface{}) error }
Evaluator specifies the interface for a policy engine.
type Request ¶
type Request struct { // User context // // User contains the associated user's JWT created by the authenticate // service User string `json:"user,omitempty"` // Request context // // Method specifies the HTTP method (GET, POST, PUT, etc.). Method string `json:"method,omitempty"` // URL specifies either the URI being requested. URL string `json:"url,omitempty"` // The protocol version for incoming server requests. Proto string `json:"proto,omitempty"` // "HTTP/1.0" // Header contains the request header fields either received // by the server or to be sent by the client. Header map[string][]string `json:"headers,omitempty"` // Host specifies the host on which the URL is sought. Host string `json:"host,omitempty"` // RemoteAddr is the network address that sent the request. RemoteAddr string `json:"remote_addr,omitempty"` // RequestURI is the unmodified request-target of the // Request-Line (RFC 7230, Section 3.1.1) as sent by the client // to a server. Usually the URL field should be used instead. // It is an error to set this field in an HTTP client request. RequestURI string `json:"request_uri,omitempty"` }
A Request represents an evaluable request with an associated user, device, and request context.
Directories ¶
Path | Synopsis |
---|---|
Package mock_evaluator is a generated GoMock package.
|
Package mock_evaluator is a generated GoMock package. |
Package opa implements the policy evaluator interface to make authorization decisions.
|
Package opa implements the policy evaluator interface to make authorization decisions. |
Click to show internal directories.
Click to hide internal directories.