Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRequest ¶
type CheckRequest struct { // Principal is typically the user. Principal Principal `json:"principal"` // Action is the verb (e.g., read, write, update, view, list) Action Action `json:"action"` // Resource is the thing being accessed. Resource Resource `json:"resource"` }
CheckRequest - Provides a principal, action, and resource for Cedar Agent to evaluate an authorization decision.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client - A client for interacting with Cedar Agent.
type Decision ¶ added in v0.1.2
type Decision struct { // Allowed - Whether the principal is allowed to perform the action on the // resource. Allowed bool // Diagnostics - Insight into how the decision was reached. Diagnostics Diagnostics }
Decision - An authorization decision.
type Diagnostics ¶ added in v0.1.2
type Diagnostics struct { // Errors that occurred during the evaluation decisions. Errors []interface{} `json:"errors"` // Reason that the decision was made (e.g., policies involved). Reason []string `json:"reason"` }
Diagnostics - Sheds light into the evaluation decision.
type IsAuthorizedResponse ¶ added in v0.1.2
type IsAuthorizedResponse struct { // Decision - Whether the principal is allowed to perform the action on the // resource. Decision string `json:"decision"` // Diagnostics - Insight into how the decision was reached. Diagnostics Diagnostics `json:"diagnostics"` }
IsAuthorizedResponse - HTTP Response from Cedar Agent.
type Option ¶
type Option func(*config)
Option - A functional option for configuring your Cedar Agent client.
func WithBaseURL ¶
WithBaseURL - Configures Cedar Agent's base URL. By default, we assume it runs on http://localhost:8180.
func WithParallelizationFactor ¶
WithParallelizationFactor - Configures the client's parallelization factor when performing a batch of authorization requests in parallel.
Click to show internal directories.
Click to hide internal directories.