Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProjectList ¶
ProjectList is a convenience function, allowing us to pass
engine.ProjectList("project-9")
instead of
engine.Projects([]string{"project-9"})
as argument to `FilterAuthorizedProjects`
Types ¶
type Authorizer ¶
type Authorizer interface { // ProjectsAuthorized returns a subset of the requested projects (Projects) // allowed by the subjects/action/resource tuple. ProjectsAuthorized(context.Context, Subjects, Action, Resource, Projects) ([]string, error) // FilterAuthorizedProjects returns a sublist of the passed-in pairs // allowed by the subjects. FilterAuthorizedPairs(context.Context, Subjects, []Pair) ([]Pair, error) // FilterAuthorizedProjects returns a list of allowed projects // for the given subjects FilterAuthorizedProjects(context.Context, Subjects) ([]string, error) }
type Engine ¶
type Engine interface { // Authorizer and Writer are never used together (the authz section of the // service needs Authorizer, the policy section cares about Writer), so we // collect them here instead of introducing a Engine interface. Authorizer Writer }
Engine abstracts different decision engines.
type Pair ¶
Pair is a convenience type for filtering a set of pairs according to their authorization
type Project ¶
type Project string
Project is the input query's REQUESTED project i.e. the project selected in the project filter. TODO: make this an array!!
Click to show internal directories.
Click to hide internal directories.