Documentation ¶
Overview ¶
Copyright 2023-2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Copyright 2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ManagerRole = "manager"
View Source
var NoRole = ""
View Source
var ProvisionerRole = "provisioner"
Functions ¶
Types ¶
type BasicAuthorizer ¶
type BasicAuthorizer struct {
// contains filtered or unexported fields
}
func (*BasicAuthorizer) Close ¶
func (o *BasicAuthorizer) Close() error
func (*BasicAuthorizer) GetGinHandler ¶
func (o *BasicAuthorizer) GetGinHandler(role string) gin.HandlerFunc
func (*BasicAuthorizer) Init ¶
func (o *BasicAuthorizer) Init(v *viper.Viper, logger *zap.SugaredLogger) error
type IAuthorizer ¶
type IAuthorizer interface { // Init initializes the backend based on the configuration inside the // provided Viper object and using the provided logger. Init(v *viper.Viper, logger *zap.SugaredLogger) error // Close terminates the backend. The exact nature of this method is // backend-specific. Close() error // GetGinHandler returns a gin.HandlerFunc that performs authorization // based on the specified role. This function can be set as gin // middleware by passing it to gin.Engine.Use(). GetGinHandler(role string) gin.HandlerFunc }
IAuthorizer defines the interface that must be implemented by the veraison auth backends.
func NewAuthorizer ¶
func NewAuthorizer(v *viper.Viper, logger *zap.SugaredLogger) (IAuthorizer, error)
func NewPassthroughAuthorizer ¶
func NewPassthroughAuthorizer(logger *zap.SugaredLogger) IAuthorizer
type KeycloakAuthorizer ¶
type KeycloakAuthorizer struct {
// contains filtered or unexported fields
}
func (*KeycloakAuthorizer) Close ¶
func (o *KeycloakAuthorizer) Close() error
func (*KeycloakAuthorizer) GetGinHandler ¶
func (o *KeycloakAuthorizer) GetGinHandler(role string) gin.HandlerFunc
func (*KeycloakAuthorizer) Init ¶
func (o *KeycloakAuthorizer) Init(v *viper.Viper, logger *zap.SugaredLogger) error
type PassthroughAuthorizer ¶
type PassthroughAuthorizer struct {
// contains filtered or unexported fields
}
func (*PassthroughAuthorizer) Close ¶
func (o *PassthroughAuthorizer) Close() error
func (*PassthroughAuthorizer) GetGinHandler ¶
func (o *PassthroughAuthorizer) GetGinHandler(role string) gin.HandlerFunc
func (*PassthroughAuthorizer) Init ¶
func (o *PassthroughAuthorizer) Init(v *viper.Viper, logger *zap.SugaredLogger) error
Click to show internal directories.
Click to hide internal directories.