model

package
v0.14.26 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientCertHeader       = "X-Client-CertPem"
	EdgeRouterProxyRequest = "X-Edge-Router-Proxy-Request"
)
View Source
const (
	//Identity Name Formatting
	FormatSentinelStart       = "["
	FormatSentinelEnd         = "]"
	FormatSymbolCaName        = "caName"
	FormatSymbolCaId          = "caId"
	FormatSymbolCommonName    = "commonName"
	FormatSymbolRequestedName = "requestedName"
	FormatSymbolIdentityId    = "identityId"

	//ex: $caName$ - $commonName$
	DefaultCaIdentityNameFormat = FormatSentinelStart + FormatSymbolCaName + FormatSentinelEnd + "-" + FormatSentinelStart + FormatSymbolCommonName + FormatSentinelEnd
)
View Source
const (
	EdgeRouterEnrollmentCommonNameInvalidCode    = "EDGE_ROUTER_ENROLL_COMMON_NAME_INVALID"
	EdgeRouterEnrollmentCommonNameInvalidMessage = "The edge router CSR enrollment must have a common name that matches the edge router's id"
	MethodEnrollEdgeRouterOtt                    = "erott"
)
View Source
const (
	ConfigTypeAll = "all"
)
View Source
const (
	IdentityTypeUser = "User"
)
View Source
const (
	MethodEnrollTransitRouterOtt = "trott"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvisorEdgeRouter added in v0.13.0

type AdvisorEdgeRouter struct {
	Router   *EdgeRouter
	IsOnline bool
}
type AdvisorIdentityEdgeRouterLinks struct {
	Identity   *Identity
	EdgeRouter *EdgeRouter
	Policies   []*EdgeRouterPolicy
}
type AdvisorIdentityServiceLinks struct {
	Identity *Identity
	Service  *Service
	Policies []*ServicePolicy
}
type AdvisorServiceEdgeRouterLinks struct {
	Service    *Service
	EdgeRouter *EdgeRouter
	Policies   []*ServiceEdgeRouterPolicy
}

type AdvisorServiceReachability added in v0.13.0

type AdvisorServiceReachability struct {
	Identity            *Identity
	Service             *Service
	IsBindAllowed       bool
	IsDialAllowed       bool
	IdentityRouterCount int
	ServiceRouterCount  int
	CommonRouters       []*AdvisorEdgeRouter
}

type AndFieldChecker

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

func (*AndFieldChecker) IsUpdated

func (checker *AndFieldChecker) IsUpdated(field string) bool

type ApiSession

type ApiSession struct {
	models.BaseEntity
	Token       string
	IdentityId  string
	Identity    *Identity
	ConfigTypes map[string]struct{}
}

type ApiSessionHandler

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

func NewApiSessionHandler

func NewApiSessionHandler(env Env) *ApiSessionHandler

func (*ApiSessionHandler) BaseList

func (handler *ApiSessionHandler) BaseList(query string) (*models.EntityListResult, error)

func (*ApiSessionHandler) BaseLoad

func (handler *ApiSessionHandler) BaseLoad(id string) (models.Entity, error)

func (*ApiSessionHandler) BaseLoadInTx added in v0.12.0

func (handler *ApiSessionHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*ApiSessionHandler) BasePreparedList added in v0.12.0

func (handler *ApiSessionHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*ApiSessionHandler) BasePreparedListAssociated added in v0.12.0

func (handler *ApiSessionHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*ApiSessionHandler) BasePreparedListIndexed added in v0.12.17

func (handler *ApiSessionHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*ApiSessionHandler) Create

func (handler *ApiSessionHandler) Create(ApiSessionModel *ApiSession) (string, error)

func (*ApiSessionHandler) Delete

func (handler *ApiSessionHandler) Delete(id string) error

func (*ApiSessionHandler) GetDb

func (handler *ApiSessionHandler) GetDb() boltz.Db

func (*ApiSessionHandler) GetEnv

func (handler *ApiSessionHandler) GetEnv() Env

func (*ApiSessionHandler) GetStore

func (handler *ApiSessionHandler) GetStore() boltz.CrudStore

func (*ApiSessionHandler) IsUpdated

func (handler *ApiSessionHandler) IsUpdated(_ string) bool

func (*ApiSessionHandler) MarkActivity

func (handler *ApiSessionHandler) MarkActivity(tokens []string) error

func (*ApiSessionHandler) Query

func (handler *ApiSessionHandler) Query(query string) (*ApiSessionListResult, error)

func (*ApiSessionHandler) Read

func (handler *ApiSessionHandler) Read(id string) (*ApiSession, error)

func (*ApiSessionHandler) ReadByToken

func (handler *ApiSessionHandler) ReadByToken(token string) (*ApiSession, error)

func (*ApiSessionHandler) Update

func (handler *ApiSessionHandler) Update(apiSession *ApiSession) error

type ApiSessionListResult

type ApiSessionListResult struct {
	ApiSessions []*ApiSession
	models.QueryMetaData
	// contains filtered or unexported fields
}

type AuthContext

type AuthContext interface {
	GetMethod() string
	GetParameters() map[string]interface{}
	GetData() interface{}
	GetDataAsMap() map[string]interface{}
	GetCerts() []*x509.Certificate
	GetHeaders() map[string]interface{}
}

type AuthContextHttp

type AuthContextHttp struct {
	Method     string
	Headers    map[string]interface{}
	Parameters map[string]interface{}
	Data       interface{}
	Certs      []*x509.Certificate
}

func (*AuthContextHttp) FillFromHttpRequest

func (context *AuthContextHttp) FillFromHttpRequest(request *http.Request) error

func (*AuthContextHttp) GetCerts

func (context *AuthContextHttp) GetCerts() []*x509.Certificate

func (*AuthContextHttp) GetData

func (context *AuthContextHttp) GetData() interface{}

func (*AuthContextHttp) GetDataAsMap

func (context *AuthContextHttp) GetDataAsMap() map[string]interface{}

func (*AuthContextHttp) GetDataStringSlice

func (context *AuthContextHttp) GetDataStringSlice(name string) []string

func (*AuthContextHttp) GetHeaders

func (context *AuthContextHttp) GetHeaders() map[string]interface{}

func (*AuthContextHttp) GetMethod

func (context *AuthContextHttp) GetMethod() string

func (*AuthContextHttp) GetParameters

func (context *AuthContextHttp) GetParameters() map[string]interface{}

type AuthModuleCert

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

func NewAuthModuleCert

func NewAuthModuleCert(env Env) *AuthModuleCert

func (*AuthModuleCert) CanHandle

func (module *AuthModuleCert) CanHandle(method string) bool

func (*AuthModuleCert) GetFingerprints

func (module *AuthModuleCert) GetFingerprints(ctx AuthContext) (cert.Fingerprints, error)

func (*AuthModuleCert) Process

func (module *AuthModuleCert) Process(context AuthContext) (string, error)

type AuthModuleUpdb

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

func NewAuthModuleUpdb

func NewAuthModuleUpdb(env Env) *AuthModuleUpdb

func (*AuthModuleUpdb) CanHandle

func (handler *AuthModuleUpdb) CanHandle(method string) bool

func (*AuthModuleUpdb) Process

func (handler *AuthModuleUpdb) Process(context AuthContext) (string, error)

type AuthProcessor

type AuthProcessor interface {
	CanHandle(method string) bool
	Process(context AuthContext) (string, error)
}

type AuthProcessorRegistryImpl

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

func (*AuthProcessorRegistryImpl) Add

func (registry *AuthProcessorRegistryImpl) Add(processor AuthProcessor)

func (*AuthProcessorRegistryImpl) GetByMethod

func (registry *AuthProcessorRegistryImpl) GetByMethod(method string) AuthProcessor

type AuthRegistry

type AuthRegistry interface {
	Add(method AuthProcessor)
	GetByMethod(method string) AuthProcessor
}

type Authenticator

type Authenticator struct {
	models.BaseEntity
	Method     string
	IdentityId string
	SubType    interface{}
}

func (*Authenticator) Fingerprints

func (entity *Authenticator) Fingerprints() []string

func (*Authenticator) ToCert

func (entity *Authenticator) ToCert() *AuthenticatorCert

func (*Authenticator) ToUpdb

func (entity *Authenticator) ToUpdb() *AuthenticatorUpdb

type AuthenticatorCert

type AuthenticatorCert struct {
	*Authenticator
	Fingerprint string
	Pem         string
}

type AuthenticatorHandler

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

func NewAuthenticatorHandler

func NewAuthenticatorHandler(env Env) *AuthenticatorHandler

func (*AuthenticatorHandler) BaseList

func (handler *AuthenticatorHandler) BaseList(query string) (*models.EntityListResult, error)

func (*AuthenticatorHandler) BaseLoad

func (handler *AuthenticatorHandler) BaseLoad(id string) (models.Entity, error)

func (*AuthenticatorHandler) BaseLoadInTx added in v0.12.0

func (handler *AuthenticatorHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*AuthenticatorHandler) BasePreparedList added in v0.12.0

func (handler *AuthenticatorHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*AuthenticatorHandler) BasePreparedListAssociated added in v0.12.0

func (handler *AuthenticatorHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*AuthenticatorHandler) BasePreparedListIndexed added in v0.12.17

func (handler *AuthenticatorHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*AuthenticatorHandler) Create

func (handler *AuthenticatorHandler) Create(authenticator *Authenticator) (string, error)

func (AuthenticatorHandler) Delete added in v0.9.6

func (handler AuthenticatorHandler) Delete(id string) error

func (*AuthenticatorHandler) GetDb

func (handler *AuthenticatorHandler) GetDb() boltz.Db

func (*AuthenticatorHandler) GetEnv

func (handler *AuthenticatorHandler) GetEnv() Env

func (*AuthenticatorHandler) GetStore

func (handler *AuthenticatorHandler) GetStore() boltz.CrudStore

func (AuthenticatorHandler) HashPassword added in v0.9.6

func (handler AuthenticatorHandler) HashPassword(password string) *HashedPassword

func (AuthenticatorHandler) IsAuthorized

func (handler AuthenticatorHandler) IsAuthorized(authContext AuthContext) (*Identity, error)

func (AuthenticatorHandler) IsUpdated

func (handler AuthenticatorHandler) IsUpdated(field string) bool

func (AuthenticatorHandler) ListForIdentity added in v0.9.6

func (handler AuthenticatorHandler) ListForIdentity(identityId string, query ast.Query) (*AuthenticatorListQueryResult, error)

func (AuthenticatorHandler) Patch added in v0.9.6

func (handler AuthenticatorHandler) Patch(authenticator *Authenticator, checker boltz.FieldChecker) error

func (AuthenticatorHandler) PatchSelf added in v0.10.0

func (handler AuthenticatorHandler) PatchSelf(authenticatorSelf *AuthenticatorSelf, checker boltz.FieldChecker) error

func (AuthenticatorHandler) ReHashPassword added in v0.10.0

func (handler AuthenticatorHandler) ReHashPassword(password string, salt []byte) *HashedPassword

func (*AuthenticatorHandler) Read

func (handler *AuthenticatorHandler) Read(id string) (*Authenticator, error)

func (AuthenticatorHandler) ReadByFingerprint

func (handler AuthenticatorHandler) ReadByFingerprint(fingerprint string) (*Authenticator, error)

func (AuthenticatorHandler) ReadByUsername

func (handler AuthenticatorHandler) ReadByUsername(username string) (*Authenticator, error)

func (AuthenticatorHandler) ReadFingerprints

func (handler AuthenticatorHandler) ReadFingerprints(authenticatorId string) ([]string, error)

func (AuthenticatorHandler) ReadForIdentity added in v0.9.6

func (handler AuthenticatorHandler) ReadForIdentity(identityId string, authenticatorId string) (*Authenticator, error)

func (AuthenticatorHandler) Update

func (handler AuthenticatorHandler) Update(authenticator *Authenticator) error

func (AuthenticatorHandler) UpdateSelf added in v0.10.0

func (handler AuthenticatorHandler) UpdateSelf(authenticatorSelf *AuthenticatorSelf) error

type AuthenticatorListQueryResult added in v0.9.6

type AuthenticatorListQueryResult struct {
	*models.EntityListResult
	Authenticators []*Authenticator
}

type AuthenticatorSelf added in v0.10.0

type AuthenticatorSelf struct {
	models.BaseEntity
	CurrentPassword string
	NewPassword     string
	IdentityId      string
	Username        string
}

type AuthenticatorUpdb

type AuthenticatorUpdb struct {
	*Authenticator
	Username string
	Password string
	Salt     string
}

func (*AuthenticatorUpdb) DecodedSalt added in v0.10.0

func (au *AuthenticatorUpdb) DecodedSalt() []byte

type Ca

type Ca struct {
	models.BaseEntity
	Name                      string
	Fingerprint               string
	CertPem                   string
	IsVerified                bool
	VerificationToken         string
	IsAutoCaEnrollmentEnabled bool
	IsOttCaEnrollmentEnabled  bool
	IsAuthEnabled             bool
	IdentityRoles             []string
	IdentityNameFormat        string
}

type CaHandler

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

func NewCaHandler

func NewCaHandler(env Env) *CaHandler

func (*CaHandler) BaseList

func (handler *CaHandler) BaseList(query string) (*models.EntityListResult, error)

func (*CaHandler) BaseLoad

func (handler *CaHandler) BaseLoad(id string) (models.Entity, error)

func (*CaHandler) BaseLoadInTx added in v0.12.0

func (handler *CaHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*CaHandler) BasePreparedList added in v0.12.0

func (handler *CaHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*CaHandler) BasePreparedListAssociated added in v0.12.0

func (handler *CaHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*CaHandler) BasePreparedListIndexed added in v0.12.17

func (handler *CaHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*CaHandler) Create

func (handler *CaHandler) Create(caModel *Ca) (string, error)

func (*CaHandler) Delete

func (handler *CaHandler) Delete(id string) error

func (*CaHandler) GetDb

func (handler *CaHandler) GetDb() boltz.Db

func (*CaHandler) GetEnv

func (handler *CaHandler) GetEnv() Env

func (*CaHandler) GetStore

func (handler *CaHandler) GetStore() boltz.CrudStore

func (*CaHandler) IsUpdated

func (handler *CaHandler) IsUpdated(field string) bool

func (*CaHandler) Patch

func (handler *CaHandler) Patch(ca *Ca, checker boltz.FieldChecker) error

func (*CaHandler) Query

func (handler *CaHandler) Query(query string) (*CaListResult, error)

func (*CaHandler) Read

func (handler *CaHandler) Read(id string) (*Ca, error)

func (*CaHandler) Update

func (handler *CaHandler) Update(ca *Ca) error

func (*CaHandler) Verified

func (handler *CaHandler) Verified(ca *Ca) error

type CaListResult

type CaListResult struct {
	Cas []*Ca
	models.QueryMetaData
	// contains filtered or unexported fields
}

type Config

type Config struct {
	models.BaseEntity
	Name string
	Type string
	Data map[string]interface{}
}

type ConfigHandler

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

func NewConfigHandler

func NewConfigHandler(env Env) *ConfigHandler

func (*ConfigHandler) BaseList

func (handler *ConfigHandler) BaseList(query string) (*models.EntityListResult, error)

func (*ConfigHandler) BaseLoad

func (handler *ConfigHandler) BaseLoad(id string) (models.Entity, error)

func (*ConfigHandler) BaseLoadInTx added in v0.12.0

func (handler *ConfigHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*ConfigHandler) BasePreparedList added in v0.12.0

func (handler *ConfigHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*ConfigHandler) BasePreparedListAssociated added in v0.12.0

func (handler *ConfigHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*ConfigHandler) BasePreparedListIndexed added in v0.12.17

func (handler *ConfigHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*ConfigHandler) Create

func (handler *ConfigHandler) Create(config *Config) (string, error)

func (*ConfigHandler) Delete

func (handler *ConfigHandler) Delete(id string) error

func (*ConfigHandler) GetDb

func (handler *ConfigHandler) GetDb() boltz.Db

func (*ConfigHandler) GetEnv

func (handler *ConfigHandler) GetEnv() Env

func (*ConfigHandler) GetStore

func (handler *ConfigHandler) GetStore() boltz.CrudStore

func (*ConfigHandler) IsUpdated

func (handler *ConfigHandler) IsUpdated(field string) bool

func (*ConfigHandler) Patch

func (handler *ConfigHandler) Patch(config *Config, checker boltz.FieldChecker) error

func (*ConfigHandler) Read

func (handler *ConfigHandler) Read(id string) (*Config, error)

func (*ConfigHandler) Update

func (handler *ConfigHandler) Update(config *Config) error

type ConfigListResult

type ConfigListResult struct {
	Configs []*Config
	models.QueryMetaData
	// contains filtered or unexported fields
}

type ConfigType

type ConfigType struct {
	models.BaseEntity
	Name   string
	Schema map[string]interface{}
}

func (*ConfigType) GetCompiledSchema

func (entity *ConfigType) GetCompiledSchema() (*gojsonschema.Schema, error)

type ConfigTypeHandler

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

func NewConfigTypeHandler

func NewConfigTypeHandler(env Env) *ConfigTypeHandler

func (*ConfigTypeHandler) BaseList

func (handler *ConfigTypeHandler) BaseList(query string) (*models.EntityListResult, error)

func (*ConfigTypeHandler) BaseLoad

func (handler *ConfigTypeHandler) BaseLoad(id string) (models.Entity, error)

func (*ConfigTypeHandler) BaseLoadInTx added in v0.12.0

func (handler *ConfigTypeHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*ConfigTypeHandler) BasePreparedList added in v0.12.0

func (handler *ConfigTypeHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*ConfigTypeHandler) BasePreparedListAssociated added in v0.12.0

func (handler *ConfigTypeHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*ConfigTypeHandler) BasePreparedListIndexed added in v0.12.17

func (handler *ConfigTypeHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*ConfigTypeHandler) Create

func (handler *ConfigTypeHandler) Create(configType *ConfigType) (string, error)

func (*ConfigTypeHandler) Delete

func (handler *ConfigTypeHandler) Delete(id string) error

func (*ConfigTypeHandler) GetDb

func (handler *ConfigTypeHandler) GetDb() boltz.Db

func (*ConfigTypeHandler) GetEnv

func (handler *ConfigTypeHandler) GetEnv() Env

func (*ConfigTypeHandler) GetStore

func (handler *ConfigTypeHandler) GetStore() boltz.CrudStore

func (*ConfigTypeHandler) Patch

func (handler *ConfigTypeHandler) Patch(configType *ConfigType, checker boltz.FieldChecker) error

func (*ConfigTypeHandler) Read

func (handler *ConfigTypeHandler) Read(id string) (*ConfigType, error)

func (*ConfigTypeHandler) ReadByName

func (handler *ConfigTypeHandler) ReadByName(name string) (*ConfigType, error)

func (*ConfigTypeHandler) Update

func (handler *ConfigTypeHandler) Update(configType *ConfigType) error

type EdgeRouter

type EdgeRouter struct {
	models.BaseEntity
	Name                string
	RoleAttributes      []string
	IsVerified          bool
	Fingerprint         *string
	CertPem             *string
	Hostname            *string
	EdgeRouterProtocols map[string]string
}

type EdgeRouterHandler

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

func NewEdgeRouterHandler

func NewEdgeRouterHandler(env Env) *EdgeRouterHandler

func (*EdgeRouterHandler) BaseList

func (handler *EdgeRouterHandler) BaseList(query string) (*models.EntityListResult, error)

func (*EdgeRouterHandler) BaseLoad

func (handler *EdgeRouterHandler) BaseLoad(id string) (models.Entity, error)

func (*EdgeRouterHandler) BaseLoadInTx added in v0.12.0

func (handler *EdgeRouterHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*EdgeRouterHandler) BasePreparedList added in v0.12.0

func (handler *EdgeRouterHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*EdgeRouterHandler) BasePreparedListAssociated added in v0.12.0

func (handler *EdgeRouterHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*EdgeRouterHandler) BasePreparedListIndexed added in v0.12.17

func (handler *EdgeRouterHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*EdgeRouterHandler) CollectEnrollments added in v0.12.25

func (handler *EdgeRouterHandler) CollectEnrollments(id string, collector func(entity *Enrollment) error) error

func (*EdgeRouterHandler) Create

func (handler *EdgeRouterHandler) Create(modelEntity *EdgeRouter) (string, error)

func (*EdgeRouterHandler) CreateWithEnrollment added in v0.12.25

func (handler *EdgeRouterHandler) CreateWithEnrollment(edgeRouter *EdgeRouter, enrollment *Enrollment) (string, string, error)

func (*EdgeRouterHandler) Delete

func (handler *EdgeRouterHandler) Delete(id string) error

func (*EdgeRouterHandler) GetDb

func (handler *EdgeRouterHandler) GetDb() boltz.Db

func (*EdgeRouterHandler) GetEnv

func (handler *EdgeRouterHandler) GetEnv() Env

func (*EdgeRouterHandler) GetStore

func (handler *EdgeRouterHandler) GetStore() boltz.CrudStore

func (*EdgeRouterHandler) ListForIdentityAndServiceWithTx

func (handler *EdgeRouterHandler) ListForIdentityAndServiceWithTx(tx *bbolt.Tx, identityId, serviceId string, limit *int) (*EdgeRouterListResult, error)

func (*EdgeRouterHandler) ListForSession

func (handler *EdgeRouterHandler) ListForSession(sessionId string) (*EdgeRouterListResult, error)

func (*EdgeRouterHandler) Patch

func (handler *EdgeRouterHandler) Patch(modelEntity *EdgeRouter, checker boltz.FieldChecker) error

func (*EdgeRouterHandler) Query

func (handler *EdgeRouterHandler) Query(query string) (*EdgeRouterListResult, error)

func (*EdgeRouterHandler) QueryRoleAttributes added in v0.12.7

func (handler *EdgeRouterHandler) QueryRoleAttributes(queryString string) ([]string, *models.QueryMetaData, error)

func (*EdgeRouterHandler) Read

func (handler *EdgeRouterHandler) Read(id string) (*EdgeRouter, error)

func (*EdgeRouterHandler) ReadOneByFingerprint

func (handler *EdgeRouterHandler) ReadOneByFingerprint(fingerprint string) (*EdgeRouter, error)

func (*EdgeRouterHandler) ReadOneByQuery

func (handler *EdgeRouterHandler) ReadOneByQuery(query string) (*EdgeRouter, error)

func (*EdgeRouterHandler) Update

func (handler *EdgeRouterHandler) Update(modelEntity *EdgeRouter, restrictFields bool) error

type EdgeRouterListResult

type EdgeRouterListResult struct {
	EdgeRouters []*EdgeRouter
	models.QueryMetaData
	// contains filtered or unexported fields
}

type EdgeRouterPolicy

type EdgeRouterPolicy struct {
	models.BaseEntity
	Name            string
	Semantic        string
	IdentityRoles   []string
	EdgeRouterRoles []string
}

type EdgeRouterPolicyHandler

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

func NewEdgeRouterPolicyHandler

func NewEdgeRouterPolicyHandler(env Env) *EdgeRouterPolicyHandler

func (*EdgeRouterPolicyHandler) BaseList

func (handler *EdgeRouterPolicyHandler) BaseList(query string) (*models.EntityListResult, error)

func (*EdgeRouterPolicyHandler) BaseLoad

func (handler *EdgeRouterPolicyHandler) BaseLoad(id string) (models.Entity, error)

func (*EdgeRouterPolicyHandler) BaseLoadInTx added in v0.12.0

func (handler *EdgeRouterPolicyHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*EdgeRouterPolicyHandler) BasePreparedList added in v0.12.0

func (handler *EdgeRouterPolicyHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*EdgeRouterPolicyHandler) BasePreparedListAssociated added in v0.12.0

func (handler *EdgeRouterPolicyHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*EdgeRouterPolicyHandler) BasePreparedListIndexed added in v0.12.17

func (handler *EdgeRouterPolicyHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*EdgeRouterPolicyHandler) Create

func (handler *EdgeRouterPolicyHandler) Create(edgeRouterPolicy *EdgeRouterPolicy) (string, error)

func (*EdgeRouterPolicyHandler) Delete

func (handler *EdgeRouterPolicyHandler) Delete(id string) error

func (*EdgeRouterPolicyHandler) GetDb

func (handler *EdgeRouterPolicyHandler) GetDb() boltz.Db

func (*EdgeRouterPolicyHandler) GetEnv

func (handler *EdgeRouterPolicyHandler) GetEnv() Env

func (*EdgeRouterPolicyHandler) GetStore

func (handler *EdgeRouterPolicyHandler) GetStore() boltz.CrudStore

func (*EdgeRouterPolicyHandler) Patch

func (handler *EdgeRouterPolicyHandler) Patch(edgeRouterPolicy *EdgeRouterPolicy, checker boltz.FieldChecker) error

func (*EdgeRouterPolicyHandler) Read

func (handler *EdgeRouterPolicyHandler) Read(id string) (*EdgeRouterPolicy, error)

func (*EdgeRouterPolicyHandler) Update

func (handler *EdgeRouterPolicyHandler) Update(edgeRouterPolicy *EdgeRouterPolicy) error

type EdgeRouterPolicyListResult

type EdgeRouterPolicyListResult struct {
	EdgeRouterPolicies []*EdgeRouterPolicy
	models.QueryMetaData
	// contains filtered or unexported fields
}

type EdgeServiceHandler added in v0.12.0

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

func NewEdgeServiceHandler added in v0.12.0

func NewEdgeServiceHandler(env Env) *EdgeServiceHandler

func (*EdgeServiceHandler) BaseList added in v0.12.0

func (handler *EdgeServiceHandler) BaseList(query string) (*models.EntityListResult, error)

func (*EdgeServiceHandler) BaseLoad added in v0.12.0

func (handler *EdgeServiceHandler) BaseLoad(id string) (models.Entity, error)

func (*EdgeServiceHandler) BaseLoadInTx added in v0.12.0

func (handler *EdgeServiceHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*EdgeServiceHandler) BasePreparedList added in v0.12.0

func (handler *EdgeServiceHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*EdgeServiceHandler) BasePreparedListAssociated added in v0.12.0

func (handler *EdgeServiceHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*EdgeServiceHandler) BasePreparedListIndexed added in v0.12.17

func (handler *EdgeServiceHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*EdgeServiceHandler) Create added in v0.12.0

func (handler *EdgeServiceHandler) Create(service *Service) (string, error)

func (*EdgeServiceHandler) Delete added in v0.12.0

func (handler *EdgeServiceHandler) Delete(id string) error

func (*EdgeServiceHandler) GetDb added in v0.12.0

func (handler *EdgeServiceHandler) GetDb() boltz.Db

func (*EdgeServiceHandler) GetEnv added in v0.12.0

func (handler *EdgeServiceHandler) GetEnv() Env

func (*EdgeServiceHandler) GetStore added in v0.12.0

func (handler *EdgeServiceHandler) GetStore() boltz.CrudStore

func (*EdgeServiceHandler) Patch added in v0.12.0

func (handler *EdgeServiceHandler) Patch(service *Service, checker boltz.FieldChecker) error

func (*EdgeServiceHandler) PublicQueryForIdentity added in v0.12.0

func (handler *EdgeServiceHandler) PublicQueryForIdentity(sessionIdentity *Identity, configTypes map[string]struct{}, query ast.Query) (*ServiceListResult, error)

func (*EdgeServiceHandler) QueryForIdentity added in v0.12.9

func (handler *EdgeServiceHandler) QueryForIdentity(identityId string, configTypes map[string]struct{}, query ast.Query) (*ServiceListResult, error)

func (*EdgeServiceHandler) QueryRoleAttributes added in v0.12.7

func (handler *EdgeServiceHandler) QueryRoleAttributes(queryString string) ([]string, *models.QueryMetaData, error)

func (*EdgeServiceHandler) Read added in v0.12.0

func (handler *EdgeServiceHandler) Read(id string) (*Service, error)

func (*EdgeServiceHandler) ReadForIdentity added in v0.12.0

func (handler *EdgeServiceHandler) ReadForIdentity(id string, identityId string, configTypes map[string]struct{}) (*ServiceDetail, error)

func (*EdgeServiceHandler) ReadForIdentityInTx added in v0.12.0

func (handler *EdgeServiceHandler) ReadForIdentityInTx(tx *bbolt.Tx, id string, identityId string) (*ServiceDetail, error)

func (*EdgeServiceHandler) Update added in v0.12.0

func (handler *EdgeServiceHandler) Update(service *Service) error

type EnrollModuleCa

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

func NewEnrollModuleCa

func NewEnrollModuleCa(env Env) *EnrollModuleCa

func (*EnrollModuleCa) CanHandle

func (module *EnrollModuleCa) CanHandle(method string) bool

func (*EnrollModuleCa) Process

func (module *EnrollModuleCa) Process(context EnrollmentContext) (*EnrollmentResult, error)

type EnrollModuleEr

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

func NewEnrollModuleEdgeRouterOtt added in v0.12.25

func NewEnrollModuleEdgeRouterOtt(env Env) *EnrollModuleEr

func (*EnrollModuleEr) CanHandle

func (module *EnrollModuleEr) CanHandle(method string) bool

func (*EnrollModuleEr) Process

func (module *EnrollModuleEr) Process(context EnrollmentContext) (*EnrollmentResult, error)

type EnrollModuleOtt

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

func NewEnrollModuleOtt

func NewEnrollModuleOtt(env Env) *EnrollModuleOtt

func (*EnrollModuleOtt) CanHandle

func (module *EnrollModuleOtt) CanHandle(method string) bool

func (*EnrollModuleOtt) Process

func (module *EnrollModuleOtt) Process(ctx EnrollmentContext) (*EnrollmentResult, error)

type EnrollModuleOttCa

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

func NewEnrollModuleOttCa

func NewEnrollModuleOttCa(env Env) *EnrollModuleOttCa

func (*EnrollModuleOttCa) CanHandle

func (module *EnrollModuleOttCa) CanHandle(method string) bool

func (*EnrollModuleOttCa) Process

func (module *EnrollModuleOttCa) Process(ctx EnrollmentContext) (*EnrollmentResult, error)

type EnrollModuleRouterOtt added in v0.12.25

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

func NewEnrollModuleTransitRouterOtt added in v0.12.25

func NewEnrollModuleTransitRouterOtt(env Env) *EnrollModuleRouterOtt

func (*EnrollModuleRouterOtt) CanHandle added in v0.12.25

func (module *EnrollModuleRouterOtt) CanHandle(method string) bool

func (*EnrollModuleRouterOtt) Process added in v0.12.25

func (module *EnrollModuleRouterOtt) Process(context EnrollmentContext) (*EnrollmentResult, error)

type EnrollModuleUpdb

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

func NewEnrollModuleUpdb

func NewEnrollModuleUpdb(env Env) *EnrollModuleUpdb

func (*EnrollModuleUpdb) CanHandle

func (module *EnrollModuleUpdb) CanHandle(method string) bool

func (*EnrollModuleUpdb) Process

func (module *EnrollModuleUpdb) Process(ctx EnrollmentContext) (*EnrollmentResult, error)

type Enrollment

type Enrollment struct {
	models.BaseEntity
	Method          string
	IdentityId      *string
	TransitRouterId *string
	EdgeRouterId    *string
	Token           string
	IssuedAt        *time.Time
	ExpiresAt       *time.Time
	Jwt             string
	CaId            *string
	Username        *string
}

func (*Enrollment) FillJwtInfo

func (entity *Enrollment) FillJwtInfo(env Env, subject string) error

type EnrollmentContext

type EnrollmentContext interface {
	GetParameters() map[string]interface{}
	GetToken() string
	GetData() interface{}
	GetDataAsMap() map[string]interface{}
	GetDataAsByteArray() []byte
	GetCerts() []*x509.Certificate
	GetHeaders() map[string]interface{}
	GetMethod() string
}

type EnrollmentContextHttp

type EnrollmentContextHttp struct {
	Headers    map[string]interface{}
	Parameters map[string]interface{}
	Data       interface{}
	Certs      []*x509.Certificate
	Token      string
	Method     string
}

func (*EnrollmentContextHttp) FillFromHttpRequest

func (context *EnrollmentContextHttp) FillFromHttpRequest(request *http.Request) error

func (*EnrollmentContextHttp) GetCerts

func (context *EnrollmentContextHttp) GetCerts() []*x509.Certificate

func (*EnrollmentContextHttp) GetData

func (context *EnrollmentContextHttp) GetData() interface{}

func (*EnrollmentContextHttp) GetDataAsByteArray

func (context *EnrollmentContextHttp) GetDataAsByteArray() []byte

func (*EnrollmentContextHttp) GetDataAsMap

func (context *EnrollmentContextHttp) GetDataAsMap() map[string]interface{}

func (*EnrollmentContextHttp) GetHeaders

func (context *EnrollmentContextHttp) GetHeaders() map[string]interface{}

func (*EnrollmentContextHttp) GetMethod added in v0.12.11

func (context *EnrollmentContextHttp) GetMethod() string

func (*EnrollmentContextHttp) GetParameters

func (context *EnrollmentContextHttp) GetParameters() map[string]interface{}

func (*EnrollmentContextHttp) GetToken

func (context *EnrollmentContextHttp) GetToken() string

type EnrollmentHandler

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

func NewEnrollmentHandler

func NewEnrollmentHandler(env Env) *EnrollmentHandler

func (*EnrollmentHandler) BaseList

func (handler *EnrollmentHandler) BaseList(query string) (*models.EntityListResult, error)

func (*EnrollmentHandler) BaseLoad

func (handler *EnrollmentHandler) BaseLoad(id string) (models.Entity, error)

func (*EnrollmentHandler) BaseLoadInTx added in v0.12.0

func (handler *EnrollmentHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*EnrollmentHandler) BasePreparedList added in v0.12.0

func (handler *EnrollmentHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*EnrollmentHandler) BasePreparedListAssociated added in v0.12.0

func (handler *EnrollmentHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*EnrollmentHandler) BasePreparedListIndexed added in v0.12.17

func (handler *EnrollmentHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*EnrollmentHandler) Delete

func (handler *EnrollmentHandler) Delete(id string) error

func (*EnrollmentHandler) Enroll

func (handler *EnrollmentHandler) Enroll(ctx EnrollmentContext) (*EnrollmentResult, error)

func (*EnrollmentHandler) GetDb

func (handler *EnrollmentHandler) GetDb() boltz.Db

func (*EnrollmentHandler) GetEnv

func (handler *EnrollmentHandler) GetEnv() Env

func (*EnrollmentHandler) GetStore

func (handler *EnrollmentHandler) GetStore() boltz.CrudStore

func (*EnrollmentHandler) Read added in v0.12.25

func (handler *EnrollmentHandler) Read(id string) (*Enrollment, error)

func (*EnrollmentHandler) ReadByToken

func (handler *EnrollmentHandler) ReadByToken(token string) (*Enrollment, error)

func (*EnrollmentHandler) ReplaceWithAuthenticator

func (handler *EnrollmentHandler) ReplaceWithAuthenticator(enrollmentId string, authenticator *Authenticator) error

type EnrollmentProcessor

type EnrollmentProcessor interface {
	CanHandle(method string) bool
	Process(context EnrollmentContext) (*EnrollmentResult, error)
}

type EnrollmentRegistry

type EnrollmentRegistry interface {
	Add(method EnrollmentProcessor)
	GetByMethod(method string) EnrollmentProcessor
}

type EnrollmentRegistryImpl

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

func (*EnrollmentRegistryImpl) Add

func (registry *EnrollmentRegistryImpl) Add(processor EnrollmentProcessor)

func (*EnrollmentRegistryImpl) GetByMethod

func (registry *EnrollmentRegistryImpl) GetByMethod(method string) EnrollmentProcessor

type EnrollmentResult

type EnrollmentResult struct {
	Identity      *Identity
	Authenticator *Authenticator
	Content       []byte
	ContentType   string
	Status        int
}

type Env

type Env interface {
	GetHandlers() *Handlers
	GetConfig() *config.Config
	GetEnrollmentJwtGenerator() jwt.EnrollmentGenerator
	GetDbProvider() persistence.DbProvider
	GetStores() *persistence.Stores
	GetAuthRegistry() AuthRegistry
	GetEnrollRegistry() EnrollmentRegistry
	GetApiClientCsrSigner() cert.Signer
	GetApiServerCsrSigner() cert.Signer
	GetControlClientCsrSigner() cert.Signer
	GetHostController() HostController
	GetSchemas() Schemas
	IsEdgeRouterOnline(id string) bool
}

type EnvInfo added in v0.14.13

type EnvInfo struct {
	Arch      string
	Os        string
	OsRelease string
	OsVersion string
}

type EventLog

type EventLog struct {
	models.BaseEntity
	Type             string
	ActorType        string
	ActorId          string
	EntityType       string
	EntityId         string
	FormattedMessage string
	FormatString     string
	FormatData       string
	Data             map[string]interface{}
}

type EventLogHandler

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

func NewEventLogHandler

func NewEventLogHandler(env Env) *EventLogHandler

func (*EventLogHandler) BaseList

func (handler *EventLogHandler) BaseList(query string) (*models.EntityListResult, error)

func (*EventLogHandler) BaseLoad

func (handler *EventLogHandler) BaseLoad(id string) (models.Entity, error)

func (*EventLogHandler) BaseLoadInTx added in v0.12.0

func (handler *EventLogHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*EventLogHandler) BasePreparedList added in v0.12.0

func (handler *EventLogHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*EventLogHandler) BasePreparedListAssociated added in v0.12.0

func (handler *EventLogHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*EventLogHandler) BasePreparedListIndexed added in v0.12.17

func (handler *EventLogHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*EventLogHandler) Create

func (handler *EventLogHandler) Create(entity *EventLog) (string, error)

func (*EventLogHandler) GetDb

func (handler *EventLogHandler) GetDb() boltz.Db

func (*EventLogHandler) GetEnv

func (handler *EventLogHandler) GetEnv() Env

func (*EventLogHandler) GetStore

func (handler *EventLogHandler) GetStore() boltz.CrudStore

type FieldChecker added in v0.10.0

type FieldChecker map[string]struct{}

func NewFieldChecker added in v0.10.0

func NewFieldChecker(fields ...string) *FieldChecker

func (*FieldChecker) IsUpdated added in v0.10.0

func (fc *FieldChecker) IsUpdated(field string) bool

type Formatter added in v0.14.24

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

func NewFormatter added in v0.14.24

func NewFormatter(symbols map[string]string) *Formatter

func NewIdentityNameFormatter added in v0.14.24

func NewIdentityNameFormatter(ca *Ca, clientCert *x509.Certificate, identityName, identityId string) *Formatter

func (*Formatter) Format added in v0.14.24

func (formatter *Formatter) Format(name string) string

type GeoRegion

type GeoRegion struct {
	models.BaseEntity
	Name string `json:"name"`
}

type GeoRegionHandler

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

func NewGeoRegionHandler

func NewGeoRegionHandler(env Env) *GeoRegionHandler

func (*GeoRegionHandler) BaseList

func (handler *GeoRegionHandler) BaseList(query string) (*models.EntityListResult, error)

func (*GeoRegionHandler) BaseLoad

func (handler *GeoRegionHandler) BaseLoad(id string) (models.Entity, error)

func (*GeoRegionHandler) BaseLoadInTx added in v0.12.0

func (handler *GeoRegionHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*GeoRegionHandler) BasePreparedList added in v0.12.0

func (handler *GeoRegionHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*GeoRegionHandler) BasePreparedListAssociated added in v0.12.0

func (handler *GeoRegionHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*GeoRegionHandler) BasePreparedListIndexed added in v0.12.17

func (handler *GeoRegionHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*GeoRegionHandler) Create

func (handler *GeoRegionHandler) Create(geoRegionModel *GeoRegion) (string, error)

func (*GeoRegionHandler) Delete

func (handler *GeoRegionHandler) Delete(id string) error

func (*GeoRegionHandler) GetDb

func (handler *GeoRegionHandler) GetDb() boltz.Db

func (*GeoRegionHandler) GetEnv

func (handler *GeoRegionHandler) GetEnv() Env

func (*GeoRegionHandler) GetStore

func (handler *GeoRegionHandler) GetStore() boltz.CrudStore

type Handler

type Handler interface {
	models.EntityRetriever

	GetEnv() Env
	// contains filtered or unexported methods
}

type Handlers

type Handlers struct {
	// fabric
	Router     *network.RouterController
	Service    *network.ServiceController
	Terminator *network.TerminatorController

	// edge
	ApiSession              *ApiSessionHandler
	Ca                      *CaHandler
	Config                  *ConfigHandler
	ConfigType              *ConfigTypeHandler
	EdgeRouter              *EdgeRouterHandler
	EdgeRouterPolicy        *EdgeRouterPolicyHandler
	EdgeService             *EdgeServiceHandler
	EventLog                *EventLogHandler
	GeoRegion               *GeoRegionHandler
	Identity                *IdentityHandler
	IdentityType            *IdentityTypeHandler
	PolicyAdvisor           *PolicyAdvisor
	ServiceEdgeRouterPolicy *ServiceEdgeRouterPolicyHandler
	ServicePolicy           *ServicePolicyHandler
	TransitRouter           *TransitRouterHandler
	Session                 *SessionHandler

	Authenticator *AuthenticatorHandler
	Enrollment    *EnrollmentHandler
}

func InitHandlers

func InitHandlers(env Env) *Handlers

type HashedPassword added in v0.9.6

type HashedPassword struct {
	RawResult *crypto.HashResult //raw byte hash results
	Salt      string             //base64 encoded hash
	Password  string             //base64 encoded hash
}

type HostController

type HostController interface {
	GetNetwork() *network.Network
}

type Identity

type Identity struct {
	models.BaseEntity
	Name           string
	IdentityTypeId string
	IsDefaultAdmin bool
	IsAdmin        bool
	RoleAttributes []string
	EnvInfo        *EnvInfo
	SdkInfo        *SdkInfo
}

type IdentityHandler

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

func NewIdentityHandler

func NewIdentityHandler(env Env) *IdentityHandler

func (*IdentityHandler) AssignServiceConfigs

func (handler *IdentityHandler) AssignServiceConfigs(id string, serviceConfigs []ServiceConfig) error

func (*IdentityHandler) BaseList

func (handler *IdentityHandler) BaseList(query string) (*models.EntityListResult, error)

func (*IdentityHandler) BaseLoad

func (handler *IdentityHandler) BaseLoad(id string) (models.Entity, error)

func (*IdentityHandler) BaseLoadInTx added in v0.12.0

func (handler *IdentityHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*IdentityHandler) BasePreparedList added in v0.12.0

func (handler *IdentityHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*IdentityHandler) BasePreparedListAssociated added in v0.12.0

func (handler *IdentityHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*IdentityHandler) BasePreparedListIndexed added in v0.12.17

func (handler *IdentityHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*IdentityHandler) CollectAuthenticators

func (handler *IdentityHandler) CollectAuthenticators(id string, collector func(entity *Authenticator) error) error

func (*IdentityHandler) CollectEnrollments

func (handler *IdentityHandler) CollectEnrollments(id string, collector func(entity *Enrollment) error) error

func (*IdentityHandler) Create

func (handler *IdentityHandler) Create(identityModel *Identity) (string, error)

func (*IdentityHandler) CreateWithAuthenticator

func (handler *IdentityHandler) CreateWithAuthenticator(identity *Identity, authenticator *Authenticator) (string, string, error)

func (*IdentityHandler) CreateWithEnrollments

func (handler *IdentityHandler) CreateWithEnrollments(identityModel *Identity, enrollmentsModels []*Enrollment) (string, []string, error)

func (*IdentityHandler) Delete

func (handler *IdentityHandler) Delete(id string) error

func (*IdentityHandler) GetDb

func (handler *IdentityHandler) GetDb() boltz.Db

func (*IdentityHandler) GetEnv

func (handler *IdentityHandler) GetEnv() Env

func (*IdentityHandler) GetServiceConfigs

func (handler *IdentityHandler) GetServiceConfigs(id string) ([]ServiceConfig, error)

func (*IdentityHandler) GetStore

func (handler *IdentityHandler) GetStore() boltz.CrudStore

func (*IdentityHandler) InitializeDefaultAdmin

func (handler *IdentityHandler) InitializeDefaultAdmin(username, password, name string) error

func (IdentityHandler) IsUpdated

func (handler IdentityHandler) IsUpdated(field string) bool

func (*IdentityHandler) Patch

func (handler *IdentityHandler) Patch(identity *Identity, checker boltz.FieldChecker) error

func (IdentityHandler) PatchInfo added in v0.14.13

func (handler IdentityHandler) PatchInfo(identity *Identity) error

func (*IdentityHandler) QueryRoleAttributes added in v0.12.7

func (handler *IdentityHandler) QueryRoleAttributes(queryString string) ([]string, *models.QueryMetaData, error)

func (*IdentityHandler) Read

func (handler *IdentityHandler) Read(id string) (*Identity, error)

func (*IdentityHandler) ReadDefaultAdmin

func (handler *IdentityHandler) ReadDefaultAdmin() (*Identity, error)

func (*IdentityHandler) ReadOneByQuery

func (handler *IdentityHandler) ReadOneByQuery(query string) (*Identity, error)

func (*IdentityHandler) RemoveServiceConfigs

func (handler *IdentityHandler) RemoveServiceConfigs(id string, serviceConfigs []ServiceConfig) error

func (*IdentityHandler) Update

func (handler *IdentityHandler) Update(identity *Identity) error

type IdentityType

type IdentityType struct {
	models.BaseEntity
	Name string `json:"name"`
}

type IdentityTypeHandler

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

func NewIdentityTypeHandler

func NewIdentityTypeHandler(env Env) *IdentityTypeHandler

func (*IdentityTypeHandler) BaseList

func (handler *IdentityTypeHandler) BaseList(query string) (*models.EntityListResult, error)

func (*IdentityTypeHandler) BaseLoad

func (handler *IdentityTypeHandler) BaseLoad(id string) (models.Entity, error)

func (*IdentityTypeHandler) BaseLoadInTx added in v0.12.0

func (handler *IdentityTypeHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*IdentityTypeHandler) BasePreparedList added in v0.12.0

func (handler *IdentityTypeHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*IdentityTypeHandler) BasePreparedListAssociated added in v0.12.0

func (handler *IdentityTypeHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*IdentityTypeHandler) BasePreparedListIndexed added in v0.12.17

func (handler *IdentityTypeHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*IdentityTypeHandler) Create

func (handler *IdentityTypeHandler) Create(IdentityTypeModel *IdentityType) (string, error)

func (*IdentityTypeHandler) Delete

func (handler *IdentityTypeHandler) Delete(id string) error

func (*IdentityTypeHandler) GetDb

func (handler *IdentityTypeHandler) GetDb() boltz.Db

func (*IdentityTypeHandler) GetEnv

func (handler *IdentityTypeHandler) GetEnv() Env

func (*IdentityTypeHandler) GetStore

func (handler *IdentityTypeHandler) GetStore() boltz.CrudStore

func (*IdentityTypeHandler) Read

func (handler *IdentityTypeHandler) Read(id string) (*IdentityType, error)

func (*IdentityTypeHandler) ReadByIdOrName

func (handler *IdentityTypeHandler) ReadByIdOrName(idOrName string) (*IdentityType, error)

func (*IdentityTypeHandler) ReadByName

func (handler *IdentityTypeHandler) ReadByName(name string) (*IdentityType, error)

type OrFieldChecker added in v0.10.0

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

func NewOrFieldChecker added in v0.10.0

func NewOrFieldChecker(checker boltz.FieldChecker, fields ...string) *OrFieldChecker

func (*OrFieldChecker) IsUpdated added in v0.10.0

func (checker *OrFieldChecker) IsUpdated(field string) bool

type PolicyAdvisor added in v0.13.0

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

func NewPolicyAdvisor added in v0.13.0

func NewPolicyAdvisor(env Env) *PolicyAdvisor

func (*PolicyAdvisor) AnalyzeServiceReachability added in v0.13.0

func (advisor *PolicyAdvisor) AnalyzeServiceReachability(identityId, serviceId string) (*AdvisorServiceReachability, error)
func (advisor *PolicyAdvisor) InspectIdentityEdgeRouterLinks(identityId, edgeRouterId string) (*AdvisorIdentityEdgeRouterLinks, error)
func (advisor *PolicyAdvisor) InspectIdentityServiceLinks(identityId, serviceId string) (*AdvisorIdentityServiceLinks, error)
func (advisor *PolicyAdvisor) InspectServiceEdgeRouterLinks(serviceId, edgeRouterId string) (*AdvisorServiceEdgeRouterLinks, error)

type Schemas

type Schemas interface {
	GetEnrollErPost() *gojsonschema.Schema
	GetEnrollUpdbPost() *gojsonschema.Schema
}

type SdkInfo added in v0.14.13

type SdkInfo struct {
	Branch   string
	Revision string
	Type     string
	Version  string
}

type Service

type Service struct {
	models.BaseEntity
	Name               string   `json:"name"`
	TerminatorStrategy string   `json:"terminatorStrategy"`
	RoleAttributes     []string `json:"roleAttributes"`
	Configs            []string `json:"configs"`
}

type ServiceConfig

type ServiceConfig struct {
	Service string
	Config  string
}

type ServiceDetail

type ServiceDetail struct {
	models.BaseEntity
	Name               string                            `json:"name"`
	TerminatorStrategy string                            `json:"terminatorStrategy"`
	RoleAttributes     []string                          `json:"roleAttributes"`
	Permissions        []string                          `json:"permissions"`
	Configs            []string                          `json:"configs"`
	Config             map[string]map[string]interface{} `json:"config"`
}

type ServiceEdgeRouterPolicy

type ServiceEdgeRouterPolicy struct {
	models.BaseEntity
	Name            string
	Semantic        string
	ServiceRoles    []string
	EdgeRouterRoles []string
}

type ServiceEdgeRouterPolicyHandler

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

func NewServiceEdgeRouterPolicyHandler

func NewServiceEdgeRouterPolicyHandler(env Env) *ServiceEdgeRouterPolicyHandler

func (*ServiceEdgeRouterPolicyHandler) BaseList

func (handler *ServiceEdgeRouterPolicyHandler) BaseList(query string) (*models.EntityListResult, error)

func (*ServiceEdgeRouterPolicyHandler) BaseLoad

func (handler *ServiceEdgeRouterPolicyHandler) BaseLoad(id string) (models.Entity, error)

func (*ServiceEdgeRouterPolicyHandler) BaseLoadInTx added in v0.12.0

func (handler *ServiceEdgeRouterPolicyHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*ServiceEdgeRouterPolicyHandler) BasePreparedList added in v0.12.0

func (handler *ServiceEdgeRouterPolicyHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*ServiceEdgeRouterPolicyHandler) BasePreparedListAssociated added in v0.12.0

func (handler *ServiceEdgeRouterPolicyHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*ServiceEdgeRouterPolicyHandler) BasePreparedListIndexed added in v0.12.17

func (handler *ServiceEdgeRouterPolicyHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*ServiceEdgeRouterPolicyHandler) Create

func (handler *ServiceEdgeRouterPolicyHandler) Create(edgeRouterPolicy *ServiceEdgeRouterPolicy) (string, error)

func (*ServiceEdgeRouterPolicyHandler) Delete

func (handler *ServiceEdgeRouterPolicyHandler) Delete(id string) error

func (*ServiceEdgeRouterPolicyHandler) GetDb

func (handler *ServiceEdgeRouterPolicyHandler) GetDb() boltz.Db

func (*ServiceEdgeRouterPolicyHandler) GetEnv

func (handler *ServiceEdgeRouterPolicyHandler) GetEnv() Env

func (*ServiceEdgeRouterPolicyHandler) GetStore

func (handler *ServiceEdgeRouterPolicyHandler) GetStore() boltz.CrudStore

func (*ServiceEdgeRouterPolicyHandler) Patch

func (handler *ServiceEdgeRouterPolicyHandler) Patch(edgeRouterPolicy *ServiceEdgeRouterPolicy, checker boltz.FieldChecker) error

func (*ServiceEdgeRouterPolicyHandler) Read

func (*ServiceEdgeRouterPolicyHandler) Update

func (handler *ServiceEdgeRouterPolicyHandler) Update(edgeRouterPolicy *ServiceEdgeRouterPolicy) error

type ServiceEdgeRouterPolicyListResult

type ServiceEdgeRouterPolicyListResult struct {
	ServiceEdgeRouterPolicies []*ServiceEdgeRouterPolicy
	models.QueryMetaData
	// contains filtered or unexported fields
}

type ServiceListResult

type ServiceListResult struct {
	Services []*ServiceDetail

	models.QueryMetaData
	// contains filtered or unexported fields
}

type ServicePolicy

type ServicePolicy struct {
	models.BaseEntity
	Name          string
	PolicyType    string
	Semantic      string
	IdentityRoles []string
	ServiceRoles  []string
}

type ServicePolicyHandler

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

func NewServicePolicyHandler

func NewServicePolicyHandler(env Env) *ServicePolicyHandler

func (*ServicePolicyHandler) BaseList

func (handler *ServicePolicyHandler) BaseList(query string) (*models.EntityListResult, error)

func (*ServicePolicyHandler) BaseLoad

func (handler *ServicePolicyHandler) BaseLoad(id string) (models.Entity, error)

func (*ServicePolicyHandler) BaseLoadInTx added in v0.12.0

func (handler *ServicePolicyHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*ServicePolicyHandler) BasePreparedList added in v0.12.0

func (handler *ServicePolicyHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*ServicePolicyHandler) BasePreparedListAssociated added in v0.12.0

func (handler *ServicePolicyHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*ServicePolicyHandler) BasePreparedListIndexed added in v0.12.17

func (handler *ServicePolicyHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*ServicePolicyHandler) Create

func (handler *ServicePolicyHandler) Create(servicePolicy *ServicePolicy) (string, error)

func (*ServicePolicyHandler) Delete

func (handler *ServicePolicyHandler) Delete(id string) error

func (*ServicePolicyHandler) GetDb

func (handler *ServicePolicyHandler) GetDb() boltz.Db

func (*ServicePolicyHandler) GetEnv

func (handler *ServicePolicyHandler) GetEnv() Env

func (*ServicePolicyHandler) GetStore

func (handler *ServicePolicyHandler) GetStore() boltz.CrudStore

func (*ServicePolicyHandler) Patch

func (handler *ServicePolicyHandler) Patch(servicePolicy *ServicePolicy, checker boltz.FieldChecker) error

func (*ServicePolicyHandler) Read

func (handler *ServicePolicyHandler) Read(id string) (*ServicePolicy, error)

func (*ServicePolicyHandler) Update

func (handler *ServicePolicyHandler) Update(servicePolicy *ServicePolicy) error

type Session

type Session struct {
	models.BaseEntity
	Token        string
	ApiSessionId string
	ServiceId    string
	Type         string
	SessionCerts []*SessionCert
}

type SessionCert

type SessionCert struct {
	Cert        string
	Fingerprint string
	ValidFrom   time.Time
	ValidTo     time.Time
}

func (*SessionCert) FillFrom

func (entity *SessionCert) FillFrom(_ Handler, _ *bbolt.Tx, boltEntity boltz.Entity) error

type SessionHandler

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

func NewSessionHandler

func NewSessionHandler(env Env) *SessionHandler

func (*SessionHandler) BaseList

func (handler *SessionHandler) BaseList(query string) (*models.EntityListResult, error)

func (*SessionHandler) BaseLoad

func (handler *SessionHandler) BaseLoad(id string) (models.Entity, error)

func (*SessionHandler) BaseLoadInTx added in v0.12.0

func (handler *SessionHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*SessionHandler) BasePreparedList added in v0.12.0

func (handler *SessionHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*SessionHandler) BasePreparedListAssociated added in v0.12.0

func (handler *SessionHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*SessionHandler) BasePreparedListIndexed added in v0.12.17

func (handler *SessionHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*SessionHandler) Create

func (handler *SessionHandler) Create(entity *Session) (string, error)

func (*SessionHandler) Delete

func (handler *SessionHandler) Delete(id string) error

func (*SessionHandler) DeleteForIdentity

func (handler *SessionHandler) DeleteForIdentity(id, identityId string) error

func (*SessionHandler) GetDb

func (handler *SessionHandler) GetDb() boltz.Db

func (*SessionHandler) GetEnv

func (handler *SessionHandler) GetEnv() Env

func (*SessionHandler) GetStore

func (handler *SessionHandler) GetStore() boltz.CrudStore

func (*SessionHandler) ListSessionsForEdgeRouter

func (handler *SessionHandler) ListSessionsForEdgeRouter(edgeRouterId string) (*SessionListResult, error)

func (*SessionHandler) PublicQueryForIdentity

func (handler *SessionHandler) PublicQueryForIdentity(sessionIdentity *Identity, query ast.Query) (*SessionListResult, error)

func (*SessionHandler) Query

func (handler *SessionHandler) Query(query string) (*SessionListResult, error)

func (*SessionHandler) Read

func (handler *SessionHandler) Read(id string) (*Session, error)

func (*SessionHandler) ReadForIdentity

func (handler *SessionHandler) ReadForIdentity(id string, identityId string) (*Session, error)

func (*SessionHandler) ReadSessionCerts

func (handler *SessionHandler) ReadSessionCerts(sessionId string) ([]*SessionCert, error)

type SessionListResult

type SessionListResult struct {
	Sessions []*Session
	models.QueryMetaData
	// contains filtered or unexported fields
}

type TestContext

type TestContext struct {
	*persistence.TestContext
	// contains filtered or unexported fields
}

func (*TestContext) Cleanup

func (ctx *TestContext) Cleanup()

func (*TestContext) Generate

func (ctx *TestContext) Generate(string, string, jwt2.MapClaims) (string, error)

func (*TestContext) GetApiClientCsrSigner

func (ctx *TestContext) GetApiClientCsrSigner() cert.Signer

func (*TestContext) GetApiServerCsrSigner

func (ctx *TestContext) GetApiServerCsrSigner() cert.Signer

func (*TestContext) GetAuthRegistry

func (ctx *TestContext) GetAuthRegistry() AuthRegistry

func (*TestContext) GetConfig

func (ctx *TestContext) GetConfig() *config.Config

func (*TestContext) GetControlClientCsrSigner

func (ctx *TestContext) GetControlClientCsrSigner() cert.Signer

func (*TestContext) GetEnrollRegistry

func (ctx *TestContext) GetEnrollRegistry() EnrollmentRegistry

func (*TestContext) GetEnrollmentJwtGenerator

func (ctx *TestContext) GetEnrollmentJwtGenerator() jwt.EnrollmentGenerator

func (*TestContext) GetHandlers

func (ctx *TestContext) GetHandlers() *Handlers

func (*TestContext) GetHostController

func (ctx *TestContext) GetHostController() HostController

func (*TestContext) GetSchemas

func (ctx *TestContext) GetSchemas() Schemas

func (*TestContext) Init

func (ctx *TestContext) Init()

func (*TestContext) IsEdgeRouterOnline

func (ctx *TestContext) IsEdgeRouterOnline(string) bool

type TransitRouter added in v0.12.25

type TransitRouter struct {
	models.BaseEntity
	Name        string
	Fingerprint string
	IsVerified  bool
	IsBase      bool
}

type TransitRouterHandler added in v0.12.25

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

func NewTransitRouterHandler added in v0.12.25

func NewTransitRouterHandler(env Env) *TransitRouterHandler

func (*TransitRouterHandler) BaseList added in v0.12.25

func (handler *TransitRouterHandler) BaseList(query string) (*models.EntityListResult, error)

func (*TransitRouterHandler) BaseLoad added in v0.12.25

func (handler *TransitRouterHandler) BaseLoad(id string) (models.Entity, error)

func (*TransitRouterHandler) BaseLoadInTx added in v0.12.25

func (handler *TransitRouterHandler) BaseLoadInTx(tx *bbolt.Tx, id string) (models.Entity, error)

func (*TransitRouterHandler) BasePreparedList added in v0.12.25

func (handler *TransitRouterHandler) BasePreparedList(query ast.Query) (*models.EntityListResult, error)

func (*TransitRouterHandler) BasePreparedListAssociated added in v0.12.25

func (handler *TransitRouterHandler) BasePreparedListAssociated(id string, typeLoader models.EntityRetriever, query ast.Query) (*models.EntityListResult, error)

func (*TransitRouterHandler) BasePreparedListIndexed added in v0.12.25

func (handler *TransitRouterHandler) BasePreparedListIndexed(cursorProvider ast.SetCursorProvider, query ast.Query) (*models.EntityListResult, error)

func (*TransitRouterHandler) CollectEnrollments added in v0.12.25

func (handler *TransitRouterHandler) CollectEnrollments(id string, collector func(entity *Enrollment) error) error

func (*TransitRouterHandler) Create added in v0.12.25

func (handler *TransitRouterHandler) Create(entity *TransitRouter) (string, error)

func (*TransitRouterHandler) CreateWithEnrollment added in v0.12.25

func (handler *TransitRouterHandler) CreateWithEnrollment(txRouter *TransitRouter, enrollment *Enrollment) (string, string, error)

func (*TransitRouterHandler) Delete added in v0.12.25

func (handler *TransitRouterHandler) Delete(id string) error

func (*TransitRouterHandler) GetDb added in v0.12.25

func (handler *TransitRouterHandler) GetDb() boltz.Db

func (*TransitRouterHandler) GetEnv added in v0.12.25

func (handler *TransitRouterHandler) GetEnv() Env

func (*TransitRouterHandler) GetStore added in v0.12.25

func (handler *TransitRouterHandler) GetStore() boltz.CrudStore

func (*TransitRouterHandler) Patch added in v0.12.25

func (handler *TransitRouterHandler) Patch(entity *TransitRouter, checker boltz.FieldChecker, allowAllFields bool) error

func (*TransitRouterHandler) Read added in v0.12.25

func (handler *TransitRouterHandler) Read(id string) (*TransitRouter, error)

func (*TransitRouterHandler) ReadOneByQuery added in v0.12.25

func (handler *TransitRouterHandler) ReadOneByQuery(query string) (*TransitRouter, error)

func (*TransitRouterHandler) Update added in v0.12.25

func (handler *TransitRouterHandler) Update(entity *TransitRouter, allowAllFields bool) error

Jump to

Keyboard shortcuts

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