Documentation
¶
Index ¶
- func Authenticate(h http.Header, cfg config.Config) bool
- func AuthenticateAdmin(h http.Header, cfg config.Config) bool
- func AuthenticateAdminName(h http.Header, cfg config.Config) (bool, string, string)
- func AuthenticateAdminTenant(h http.Header, cfg config.Config) (config.MongoConfig, string, error)
- func AuthenticateNode(h http.Header, cfg config.Config, nodeName string, isAdmin bool) (config.MongoConfig, string, error)
- func AuthenticateTenant(h http.Header, cfg config.Config) (config.MongoConfig, string, error)
- func GetComponentRole(h http.Header, cfg config.Config) string
- func IsAdminRestricted(h http.Header, cfg config.Config) bool
- func IsSuperAdminUI(h http.Header, cfg config.Config) bool
- type Auth
- type DbConfItem
- type DbInfoUsers
- type Info
- type InfoStruct
- type Tenant
- type UserItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateAdmin ¶
AuthenticateAdmin is used to authenticate and administrator of ARGO and allow further CRUD ops wrt the argo_core database (i.e. add a new tenant, modify another tenant's configuration etc)
func AuthenticateAdminName ¶ added in v1.14.3
func AuthenticateAdminTenant ¶ added in v1.14.3
AuthenticateAdminTenant is used to authenticate access to a super admin trying to access a tenant's user route
func AuthenticateNode ¶ added in v1.14.3
func AuthenticateTenant ¶
AuthenticateTenant is used to find which tenant the user making the requests belongs to and return the database configuration for that specific tenant. If the api-key in the request is not found in any tenant an empty configuration is returned along with an error
func GetComponentRole ¶ added in v1.14.3
GetComponentRole returns a component role if exists
func IsAdminRestricted ¶
IsAdminRestricted resturns a boolean value if an admin user is in restricted mode or not. Admin user in restricted mode has read only access to certain calls
Types ¶
type DbConfItem ¶
type DbInfoUsers ¶
type DbInfoUsers struct {
Info Info `bson:"info"`
DbConf []DbConfItem `bson:"db_conf"`
Users []UserItem `bson:"users"`
}
type InfoStruct ¶
type InfoStruct struct {
Name string `bson:"name"`
}
type Tenant ¶
type Tenant struct {
Info InfoStruct `bson:"info"`
}