Documentation
¶
Index ¶
Constants ¶
View Source
const ( PARTITION = "judge-org" SERVICE = "judge-server" )
Variables ¶
View Source
var ( // ErrMalformedPolicy was return when the policy is malformed. ErrMalformedPolicy = errors.New("malformed policy") )
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct { // ID element specifies a global unique identifier for the policy. ID orn.ORN `json:"orn"` // Name element specifies a user friendly name for the policy. Name string `json:"name"` // Description element specifies description/usage about the policy. Description string `json:"description"` // Statements contains a list of Statement. Statements []Statement `json:"statement"` }
Policy is an entity in Judge that, when attached to an identity, defines their permissions. Judge evaluates these policies when a principal, such as a user, makes a request. Permissions in the policies determine whether the request is allowed or denied.
type Statement ¶
type Statement struct { // Effect element is required and specifies whether the statement // results in an allow or an explicit deny. Valid values for Effect are // Allow and Deny. Effect string `json:"effect"` // Actions element describes the specific action or actions that will // be allowed or denied. Actions []string `json:"action"` // Resources element specifies the object or objects that the statement // covers. Resources []resource.Resource `json:"resource"` }
The Statement element is the main element for a policy. It defines permissions.
Click to show internal directories.
Click to hide internal directories.