Documentation ¶
Index ¶
- Variables
- func AuthRequestTimeout() time.Duration
- func AuthorizationEndpoint() string
- func CorsAllowOrigin() string
- func DropoffEndpointUrl() string
- func ErrorUrl() string
- func IsCorsDisabled() bool
- func LoadConfiguration(filename string) error
- func LoggingSeverity() string
- func OidcAccessTokenCookieName() string
- func OidcAllowedAudience() string
- func OidcAllowedIssuer() string
- func OidcIdTokenCookieName() string
- func OidcKeySet() []*rsa.PublicKey
- func OidcTokenIntrospectionURL() string
- func OidcUserInfoCacheEnabled() bool
- func OidcUserInfoCacheRetentionTime() time.Duration
- func OidcUserInfoURL() string
- func ParseAndOverwriteConfig(yamlFile []byte) error
- func ParseCommandLineFlags()
- func RelevantGroups() map[string][]string
- func SendInsecureCookies() bool
- func SendNonHttpOnlyCookies() bool
- func ServerAddr() string
- func ServerIdleTimeout() time.Duration
- func ServerReadTimeout() time.Duration
- func ServerWriteTimeout() time.Duration
- func StartupLoadConfiguration() error
- func TokenEndpoint() string
- func TokenRequestTimeout() time.Duration
- func UseEcsLogging() bool
- type Application
- type ApplicationConfig
- type CorsConfig
- type IdentityProviderConfig
- type LoggingConfig
- type OpenIdConnectConfig
- type SecurityConfig
- type ServerConfig
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorConfigArgumentMissing = errors.New("configuration file argument missing. Please specify using -config argument. Aborting") ErrorConfigFile = errors.New("failed to read or parse configuration file. Aborting") )
Functions ¶
func AuthRequestTimeout ¶
func AuthorizationEndpoint ¶
func AuthorizationEndpoint() string
func CorsAllowOrigin ¶
func CorsAllowOrigin() string
func DropoffEndpointUrl ¶
func DropoffEndpointUrl() string
func IsCorsDisabled ¶
func IsCorsDisabled() bool
func LoadConfiguration ¶
func LoggingSeverity ¶
func LoggingSeverity() string
func OidcAccessTokenCookieName ¶
func OidcAccessTokenCookieName() string
func OidcAllowedAudience ¶
func OidcAllowedAudience() string
func OidcAllowedIssuer ¶
func OidcAllowedIssuer() string
func OidcIdTokenCookieName ¶
func OidcIdTokenCookieName() string
func OidcKeySet ¶
func OidcTokenIntrospectionURL ¶
func OidcTokenIntrospectionURL() string
func OidcUserInfoCacheEnabled ¶
func OidcUserInfoCacheEnabled() bool
func OidcUserInfoURL ¶
func OidcUserInfoURL() string
func ParseAndOverwriteConfig ¶
func ParseCommandLineFlags ¶
func ParseCommandLineFlags()
ParseCommandLineFlags is exposed separately so you can skip it for tests
func RelevantGroups ¶
func SendInsecureCookies ¶
func SendInsecureCookies() bool
func SendNonHttpOnlyCookies ¶
func SendNonHttpOnlyCookies() bool
func ServerAddr ¶
func ServerAddr() string
func ServerIdleTimeout ¶
func ServerReadTimeout ¶
func ServerWriteTimeout ¶
func StartupLoadConfiguration ¶
func StartupLoadConfiguration() error
func TokenEndpoint ¶
func TokenEndpoint() string
func TokenRequestTimeout ¶
func UseEcsLogging ¶
func UseEcsLogging() bool
Types ¶
type Application ¶
type Application struct { Service ServiceConfig `yaml:"service"` Server ServerConfig `yaml:"server"` Security SecurityConfig `yaml:"security"` Logging LoggingConfig `yaml:"logging"` IdentityProvider IdentityProviderConfig `yaml:"identity_provider"` ApplicationConfigs map[string]ApplicationConfig `yaml:"application_configs"` }
Application is the root configuration type
type ApplicationConfig ¶
type ApplicationConfig struct { DisplayName string `yaml:"display_name"` Scope string `yaml:"scope"` // the list of scopes, separated by spaces (?) ClientId string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` DefaultDropoffUrl string `yaml:"default_dropoff_url"` DropoffUrlPattern string `yaml:"dropoff_url_pattern"` CookieName string `yaml:"cookie_name"` CookieDomain string `yaml:"cookie_domain"` CookiePath string `yaml:"cookie_path"` CookieExpiry time.Duration `yaml:"cookie_expiry"` }
ApplicationConfig configures an OpenID Connect client.
func GetApplicationConfig ¶
func GetApplicationConfig(applicationName string) (ApplicationConfig, error)
type CorsConfig ¶
type IdentityProviderConfig ¶
type IdentityProviderConfig struct { AuthorizationEndpoint string `yaml:"authorization_endpoint"` TokenEndpoint string `yaml:"token_endpoint"` EndSessionEndpoint string `yaml:"end_session_endpoint"` UserInfoEndpoint string `yaml:"user_info_endpoint"` KeySetEndpoint string `yaml:"key_set_endpoint"` TokenRequestTimeout time.Duration `yaml:"token_request_timeout"` AuthRequestTimeout time.Duration `yaml:"auth_request_timeout"` }
IdentityProviderConfig provides information about an OpenID Connect identity provider
type LoggingConfig ¶
type LoggingConfig struct {
Severity string `yaml:"severity"`
}
LoggingConfig configures logging
type OpenIdConnectConfig ¶
type OpenIdConnectConfig struct { IdTokenCookieName string `yaml:"id_token_cookie_name"` // optional, if set, the jwt token is also read from this cookie (useful for mixed web application setups, see reg-auth-service) AccessTokenCookieName string `yaml:"access_token_cookie_name"` // optional, if set, we place the auth token in a second cookie (used for userinfo endpoint) RelevantGroups map[string][]string `yaml:"relevant_groups"` // key is IDP group id, value is list of allowed subjects (all allowed if value is empty list) TokenPublicKeysPEM []string `yaml:"token_public_keys_PEM"` // a list of public RSA keys in PEM format, see https://github.com/Jumpy-Squirrel/jwks2pem for obtaining PEM from openid keyset endpoint UserInfoURL string `yaml:"user_info_url"` // validation of admin accesses uses this endpoint to verify the token is still current and access has not been recently revoked TokenIntrospectionURL string `yaml:"token_introspection_url"` // validation of tokens uses this endpoint to obtain scopes and audiences UserInfoCacheSeconds int `yaml:"user_info_cache_seconds"` // leave at 0 to disable caching Audience string `yaml:"audience"` Issuer string `yaml:"issuer"` }
type SecurityConfig ¶
type SecurityConfig struct { Cors CorsConfig `yaml:"cors"` Oidc OpenIdConnectConfig `yaml:"oidc"` }
SecurityConfig configures everything related to security
type ServerConfig ¶
type ServerConfig struct { Address string `yaml:"address"` Port string `yaml:"port"` ReadTimeout int `yaml:"read_timeout_seconds"` WriteTimeout int `yaml:"write_timeout_seconds"` IdleTimeout int `yaml:"idle_timeout_seconds"` }
ServerConfig contains all values for http configuration
type ServiceConfig ¶
type ServiceConfig struct { Name string `yaml:"name"` DropoffEndpointUrl string `yaml:"dropoff_endpoint_url"` // externally visible url to my "dropoff" endpoint ErrorUrl string `yaml:"error_url"` // externally visible default error url }
ServiceConfig contains configuration values for service related tasks. E.g. URLs to downstream services
Click to show internal directories.
Click to hide internal directories.