identitymanager

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 31 Imported by: 4

Documentation

Index

Constants

View Source
const (
	HTTPHeaderReqURI     = "X-Auth-Request-Redirect"
	HTTPHeaderOrigMethod = "X-Original-Method"
	HTTPHeaderEmail      = "X-Auth-Request-Email"
)

HTTP constants

Variables

This section is empty.

Functions

func NewIdentityController added in v0.1.13

func NewIdentityController(store entitystore.EntityStore, enforcer *casbin.SyncedEnforcer, resync time.Duration) controller.Controller

NewIdentityController creates a new controller to manage the reconciliation of policy entities

func SetupEnforcer added in v0.1.13

func SetupEnforcer(store entitystore.EntityStore) *casbin.SyncedEnforcer

SetupEnforcer sets up the casbin enforcer

Types

type Action added in v0.1.13

type Action string

Action defines the type for an action

const (
	ActionGet    Action = "get"
	ActionCreate Action = "create"
	ActionUpdate Action = "update"
	ActionDelete Action = "delete"
)

Identity manager action constants

type CasbinEntityAdapter added in v0.1.13

type CasbinEntityAdapter struct {
	// contains filtered or unexported fields
}

CasbinEntityAdapter type

func NewCasbinEntityAdapter added in v0.1.13

func NewCasbinEntityAdapter(store entitystore.EntityStore) *CasbinEntityAdapter

NewCasbinEntityAdapter creates a new casbin entity adapter

func (*CasbinEntityAdapter) AddPolicy added in v0.1.13

func (a *CasbinEntityAdapter) AddPolicy(sec string, ptype string, rule []string) error

AddPolicy adds a policy rule to the storage.

func (*CasbinEntityAdapter) LoadPolicy added in v0.1.13

func (a *CasbinEntityAdapter) LoadPolicy(model casbinModel.Model) error

LoadPolicy loads a policy into the casbin entity adapter

func (*CasbinEntityAdapter) RemoveFilteredPolicy added in v0.1.13

func (a *CasbinEntityAdapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error

RemoveFilteredPolicy removes policy rules that match the filter from the storage.

func (*CasbinEntityAdapter) RemovePolicy added in v0.1.13

func (a *CasbinEntityAdapter) RemovePolicy(sec string, ptype string, rule []string) error

RemovePolicy removes a policy rule from the storage.

func (*CasbinEntityAdapter) SavePolicy added in v0.1.13

func (a *CasbinEntityAdapter) SavePolicy(model casbinModel.Model) error

SavePolicy saves all policy rules to the storage.

type Handlers

type Handlers struct {
	SkipAuth            bool
	OAuth2ProxyAuthURL  string
	BootstrapConfigPath string
	CookieName          string
	// contains filtered or unexported fields
}

Handlers defines the interface for the identity manager handlers

func NewHandlers added in v0.1.13

func NewHandlers(watcher controller.Watcher, store entitystore.EntityStore, enforcer *casbin.SyncedEnforcer) *Handlers

NewHandlers create a new Policy Manager Handler

func (*Handlers) ConfigureHandlers

func (h *Handlers) ConfigureHandlers(api middleware.RoutableAPI)

ConfigureHandlers registers the identity manager handlers to the API

type Organization added in v0.1.16

type Organization struct {
	entitystore.BaseEntity
}

Organization is a data struct used to store organization (tenants) into entity store

type Policy added in v0.1.13

type Policy struct {
	entitystore.BaseEntity
	Global bool   `json:"global"`
	Rules  []Rule `json:"rules"`
}

Policy is a data struct used to store policy into entity store

type Resource added in v0.1.13

type Resource string

Resource defines the type for a resource

const (
	ResourceIAM Resource = "iam"
)

Identity manager resources type constants

type Rule added in v0.1.13

type Rule struct {
	entitystore.BaseEntity
	Subjects  []string `json:"subjects"`
	Resources []string `json:"resources"`
	Actions   []string `json:"actions"`
}

Rule is a data struct to store rules within a policy

type ServiceAccount added in v0.1.13

type ServiceAccount struct {
	entitystore.BaseEntity
	PublicKey    string `json:"publicKey"`
	Domain       string `json:"domain"`
	JWTAlgorithm string `json:"jwtAlgorithm"`
}

ServiceAccount is a data struct used to store service accounts into entity store

Directories

Path Synopsis
gen
restapi
Package restapi Identity Manager VMware Dispatch Identity Manager Schemes: http https Host: localhost BasePath: / Version: 1.0.0 Contact: <dispatch@vmware.com> Consumes: - application/json Produces: - application/json swagger:meta
Package restapi Identity Manager VMware Dispatch Identity Manager Schemes: http https Host: localhost BasePath: / Version: 1.0.0 Contact: <dispatch@vmware.com> Consumes: - application/json Produces: - application/json swagger:meta

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL