Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
ErrUnauthorized is returned when a request can't be authorized
Functions ¶
This section is empty.
Types ¶
type AuthRequest ¶
AuthRequest is an authorization request
type AuthenticationConfig ¶
type AuthenticationConfig struct {
Condition string
}
AuthenticationConfig
type Config ¶
type Config struct { Server ServerConfig `yaml:"server"` Token TokenConfig `yaml:"token"` Providers []ProviderConfig `yaml:"providers"` }
Config configures the auth server
func LoadConfig ¶
LoadConfig loads configuration from an io.Reader
func LoadConfigFromFile ¶
LoadConfigFromFile loads configuration from a file
type Provider ¶
type Provider interface { // Authorize a request and return the subset of requested actions it is permitted to // perform Authorize(ctx context.Context, req AuthRequest) ([]auth.Access, error) }
Provider authorizes tokens
func NewProvider ¶
func NewProvider(ctx context.Context, cfg ProviderConfig) (Provider, error)
NewProvider returns a new provider
type ProviderConfig ¶
type ProviderConfig struct { Name string `yaml:"name"` OIDCDiscoveryURL string `yaml:"oidcDiscoveryURL"` StaticKeys []StaticKeyConfig `yaml:"staticKeys"` Authentication AuthenticationConfig `yaml:"authn"` Authorization AuthorizationConfig `yaml:"authz"` }
ProviderConfig configures an authentication provider
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server handles authentication and authorization for registry requests
func (*Server) ListenAndServe ¶
ListenAndServe runs the http server
type ServerConfig ¶
type ServerConfig struct { ListenAddress string `yaml:"listenAddress"` TokenPath string `yaml:"tokenPath"` }
ServerConfig configures the server
Click to show internal directories.
Click to hide internal directories.