common

package
v0.0.0-...-ac02f16 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: Apache-2.0 Imports: 29 Imported by: 509

Documentation

Index

Constants

View Source
const SecretsNamespace = namespace.GlobalNamespace

Variables

This section is empty.

Functions

func AddCommonActions

func AddCommonActions(apiContext *types.APIContext, resource *types.RawResource)

func CreateOrUpdateSecrets

func CreateOrUpdateSecrets(secrets corev1.SecretInterface, secretInfo string, field string, authType string) error

func GetName

func GetName(configType string, field string) string

func HandleCommonAction

func HandleCommonAction(actionName string, action *types.Action, request *types.APIContext, authConfigName string, authConfigs v3.AuthConfigInterface) (bool, error)

func NewUserManager

func NewUserManager(scaledContext *config.ScaledContext) (user.Manager, error)

func NewUserManagerNoBindings

func NewUserManagerNoBindings(scaledContext *config.ScaledContext) (user.Manager, error)

func ReadFromSecret

func ReadFromSecret(secrets corev1.SecretInterface, secretInfo string, field string) (string, error)

func ReadFromSecretData

func ReadFromSecretData(secrets corev1.SecretInterface, secretInfo string) (map[string][]byte, error)

func TransformToAuthProvider

func TransformToAuthProvider(authConfig map[string]interface{}) map[string]interface{}

Types

type AuthProvider

type AuthProvider interface {
	GetName() string
	AuthenticateUser(ctx context.Context, input interface{}) (v3.Principal, []v3.Principal, string, error)
	SearchPrincipals(name, principalType string, myToken v3.Token) ([]v3.Principal, error)
	GetPrincipal(principalID string, token v3.Token) (v3.Principal, error)
	CustomizeSchema(schema *types.Schema)
	TransformToAuthProvider(authConfig map[string]interface{}) (map[string]interface{}, error)
	RefetchGroupPrincipals(principalID string, secret string) ([]v3.Principal, error)
	CanAccessWithGroupProviders(userPrincipalID string, groups []v3.Principal) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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