Documentation ¶
Index ¶
- Constants
- Variables
- func NewIdentityController(store entitystore.EntityStore, enforcer *casbin.SyncedEnforcer) controller.Controller
- func SetupEnforcer(store entitystore.EntityStore) *casbin.SyncedEnforcer
- type Action
- type CasbinEntityAdapter
- func (a *CasbinEntityAdapter) AddPolicy(sec string, ptype string, rule []string) error
- func (a *CasbinEntityAdapter) LoadPolicy(model casbinModel.Model) error
- func (a *CasbinEntityAdapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
- func (a *CasbinEntityAdapter) RemovePolicy(sec string, ptype string, rule []string) error
- func (a *CasbinEntityAdapter) SavePolicy(model casbinModel.Model) error
- type Handlers
- type Organization
- type Policy
- type Resource
- type Rule
- type ServiceAccount
Constants ¶
const ( HTTPHeaderReqURI = "X-Auth-Request-Redirect" HTTPHeaderOrigMethod = "X-Original-Method" HTTPHeaderEmail = "X-Auth-Request-Email" )
HTTP constants
Variables ¶
var IdentityManagerFlags = struct { CookieName string `long:"cookie-name" description:"The cookie name used to identify users" default:"_oauth2_proxy"` SkipAuth bool `long:"skip-auth" description:"Skips authorization, not to be used in production env"` BootstrapConfigPath string `long:"bootstrap-config-path" description:"The path that contains the bootstrap keys" default:"/bootstrap"` DbFile string `long:"db-file" description:"Backend DB URL/Path" default:"./db.bolt"` DbBackend string `long:"db-backend" description:"Backend DB Name" default:"boltdb"` DbUser string `long:"db-username" description:"Backend DB Username" default:"dispatch"` DbPassword string `long:"db-password" description:"Backend DB Password" default:"dispatch"` DbDatabase string `long:"db-database" description:"Backend DB Name" default:"dispatch"` ResyncPeriod int `long:"resync-period" description:"The time period (in seconds) to refresh policies" default:"30"` OAuth2ProxyAuthURL string `` /* 152-byte string literal not displayed */ ServiceAccountDomain string `long:"service-account-domain" description:"The default domain name to use for service accounts" default:"svc.dispatch.local"` Tracer string `long:"tracer" description:"Open Tracing Tracer endpoint" default:""` }{}
IdentityManagerFlags are configuration flags for the identity manager
Functions ¶
func NewIdentityController ¶ added in v0.1.13
func NewIdentityController(store entitystore.EntityStore, enforcer *casbin.SyncedEnforcer) 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 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 {
// 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" SkipAuthOrg = "default" )
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
Source Files ¶
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 |