auth

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EGIGroupsURNPrefix prefix to identify EGI group URNs
	EGIGroupsURNPrefix = "urn:mace:egi.eu:group"
	SecretKeyLength    = 10
)
View Source
const ServiceLabelLength = 8
View Source
const ServicesNamespace = "oscar-svc"

Variables

This section is empty.

Functions

func CustomAuth

func CustomAuth(cfg *types.Config, kubeClientset *kubernetes.Clientset) gin.HandlerFunc

CustomAuth returns a custom auth handler (gin middleware)

func FormatUID

func FormatUID(uid string) string

func GenerateRandomKey

func GenerateRandomKey(length int) (string, error)

func GetAuthMiddleware

func GetAuthMiddleware(cfg *types.Config, kubeClientset *kubernetes.Clientset) gin.HandlerFunc

GetAuthMiddleware returns the appropriate gin auth middleware

func GetUIDFromContext

func GetUIDFromContext(c *gin.Context) (string, error)

func NewOIDCManager

func NewOIDCManager(issuer string, subject string, groups []string) (*oidcManager, error)

newOIDCManager returns a new oidcManager or error if the oidc.Provider can't be created

Types

type MultitenancyConfig

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

func GetMultitenancyConfigFromContext

func GetMultitenancyConfigFromContext(c *gin.Context) (*MultitenancyConfig, error)

func NewMultitenancyConfig

func NewMultitenancyConfig(kubeClientset *kubernetes.Clientset, uid string) *MultitenancyConfig

func (*MultitenancyConfig) CheckUsersInCache

func (mc *MultitenancyConfig) CheckUsersInCache(uids []string) []string

func (*MultitenancyConfig) ClearCache

func (mc *MultitenancyConfig) ClearCache()

func (*MultitenancyConfig) CreateSecretForOIDC

func (mc *MultitenancyConfig) CreateSecretForOIDC(uid string, sk string) error

func (*MultitenancyConfig) GetUserCredentials

func (mc *MultitenancyConfig) GetUserCredentials(uid string) (string, string, error)

func (*MultitenancyConfig) UpdateCache

func (mc *MultitenancyConfig) UpdateCache(uid string)

func (*MultitenancyConfig) UserExists

func (mc *MultitenancyConfig) UserExists(uid string) bool

UserExists checks if a MinIO user has been created and stored on cache.

Jump to

Keyboard shortcuts

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