Documentation ¶
Index ¶
- func ContainsString(slice []string, s string) bool
- func ConvertConfigMapToToken(cm *corev1.ConfigMap) string
- func RemoveString(slice []string, s string) (result []string)
- func ToStorageConnector(c Connector) (storage.Connector, error)
- func UpdateDexDeployment(deployment *appsv1.Deployment, token string) bool
- type Config
- type Connector
- type Expiry
- type GRPC
- type Logger
- type OAuth2
- type Storage
- type StorageConfig
- type Telemetry
- type Web
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
Helper functions to check and remove string from a slice of strings.
ContainsString check if string exists in slice
func ConvertConfigMapToToken ¶
ConvertConfigMapToToken converts the ConfigMap into a unique token based on the data values
func RemoveString ¶
RemoveString removes string from slice
func ToStorageConnector ¶
ToStorageConnector converts an object to storage connector type.
func UpdateDexDeployment ¶
func UpdateDexDeployment(deployment *appsv1.Deployment, token string) bool
UpdateDexDeployment checks if checksum matches the one in the Deployment annotation
Types ¶
type Config ¶
type Config struct { Issuer string `json:"issuer"` Storage Storage `json:"storage"` Web Web `json:"web"` Telemetry Telemetry `json:"telemetry"` OAuth2 OAuth2 `json:"oauth2"` GRPC GRPC `json:"grpc"` Expiry Expiry `json:"expiry"` Logger Logger `json:"logger"` Frontend server.WebConfig `json:"frontend"` // StaticConnectors are user defined connectors specified in the ConfigMap // Write operations, like updating a connector, will fail. StaticConnectors []Connector `json:"connectors"` // StaticClients cause the server to use this list of clients rather than // querying the storage. Write operations, like creating a client, will fail. StaticClients []storage.Client `json:"staticClients"` // If enabled, the server will maintain a list of passwords which can be used // to identify a user. EnablePasswordDB bool `json:"enablePasswordDB"` // StaticPasswords cause the server use this list of passwords rather than // querying the storage. Cannot be specified without enabling a passwords // database. StaticPasswords []password `json:"staticPasswords"` }
Config is the config format for the main application.
type Connector ¶
type Connector struct { Type string `json:"type"` Name string `json:"name"` ID string `json:"id"` Config server.ConnectorConfig `json:"config"` }
Connector is a magical type that can unmarshal YAML dynamically. The Type field determines the connector type, which is then customized for Config.
func (*Connector) UnmarshalJSON ¶
UnmarshalJSON allows Connector to implement the unmarshaler interface to dynamically determine the type of the connector config.
type Expiry ¶
type Expiry struct { // SigningKeys defines the duration of time after which the SigningKeys will be rotated. SigningKeys string `json:"signingKeys"` // IdTokens defines the duration of time for which the IdTokens will be valid. IDTokens string `json:"idTokens"` // AuthRequests defines the duration of time for which the AuthRequests will be valid. AuthRequests string `json:"authRequests"` }
Expiry holds configuration for the validity period of components.
type GRPC ¶
type GRPC struct { // The port to listen on. Addr string `json:"addr"` TLSCert string `json:"tlsCert"` TLSKey string `json:"tlsKey"` TLSClientCA string `json:"tlsClientCA"` Reflection bool `json:"reflection"` }
GRPC is the config for the gRPC API.
type Logger ¶
type Logger struct { // Level sets logging level severity. Level string `json:"level"` // Format specifies the format to be used for logging. Format string `json:"format"` }
Logger holds configuration required to customize logging for dex.
type OAuth2 ¶
type OAuth2 struct { ResponseTypes []string `json:"responseTypes"` // If specified, do not prompt the user to approve client authorization. The // act of logging in implies authorization. SkipApprovalScreen bool `json:"skipApprovalScreen"` // If specified, show the connector selection screen even if there's only one AlwaysShowLoginScreen bool `json:"alwaysShowLoginScreen"` }
OAuth2 describes enabled OAuth2 extensions.
type Storage ¶
type Storage struct { Type string `json:"type"` Config StorageConfig `json:"config"` }
Storage holds app's storage configuration.
func (*Storage) UnmarshalJSON ¶
UnmarshalJSON allows Storage to implement the unmarshaler interface to dynamically determine the type of the storage config.
type StorageConfig ¶
StorageConfig is a configuration that can create a storage.