Documentation ¶
Index ¶
- Constants
- Variables
- type AuthenticatorConfig
- type Config
- type Server
- func (s *Server) Authenticate(ctx context.Context, _ *api.AuthenticateRequest) (*api.AuthenticateResponse, error)
- func (s *Server) NewGRPCServer(policiesClient authz.PoliciesServiceClient, pv tokens.ProjectValidator) *grpc.Server
- func (s *Server) Serve(grpcEndpoint, http1Endpoint string) error
- func (s *Server) ServeHTTP1(pbmux *runtime.ServeMux, http1Endpoint string) error
Constants ¶
View Source
const (
IngestPolicyID = "ingest-access"
)
Variables ¶
View Source
var AuthenticatorsConfig = map[string]func() AuthenticatorConfig{ "mock-oidc": func() AuthenticatorConfig { return new(mock.OidcConfig) }, "mock-static": func() AuthenticatorConfig { return new(mock.StaticConfig) }, "mock-header-token": func() AuthenticatorConfig { return new(mock.HeaderTokenConfig) }, "oidc": func() AuthenticatorConfig { return new(oidc.Config) }, "header-token": func() AuthenticatorConfig { return new(tokens.HeaderTokenConfig) }, }
AuthenticatorsConfig variable provides an easy way to return a config struct depending on the authenticator type.
Functions ¶
This section is empty.
Types ¶
type AuthenticatorConfig ¶
type AuthenticatorConfig interface {
Open(*url.URL, *certs.ServiceCerts, *zap.Logger, id_token.ValidateIdTokenServiceClient) (authenticator.Authenticator, error)
}
AuthenticatorConfig is a configuration that can open an authenticator.
type Config ¶
type Config struct { // These are the configs of the specified Authenticators, which will be // Open()ed when this config is passed to NewServer Authenticators map[string]AuthenticatorConfig Upstream *url.URL Logger *zap.Logger Token tokens.TokenConfig ServiceCerts *certs.ServiceCerts TeamsAddress string // "ip:port" AuthzAddress string LegacyDataCollectorToken string SessionAddress string }
Config holds the server's configuration options.
type Server ¶
type Server struct { // Map of authenticator IDs to authenticators. // Note: dex wraps this with a ResourceVersion, but that is due to storing // connectors in the database -- we don't do this TokenStorage tokens.Storage // contains filtered or unexported fields }
Server is the top level object.
func (*Server) Authenticate ¶
func (s *Server) Authenticate(ctx context.Context, _ *api.AuthenticateRequest) (*api.AuthenticateResponse, error)
Authenticate provides a quick and dirty api.AuthenticationServer implementation for *Server
func (*Server) NewGRPCServer ¶
func (s *Server) NewGRPCServer(policiesClient authz.PoliciesServiceClient, pv tokens.ProjectValidator) *grpc.Server
NewGRPCServer returns a server that provides our services: token and authentication requests.
Click to show internal directories.
Click to hide internal directories.