# Controls the configuration for the http(s) daemon(s).
#
serve:
## admin ##
#
admin:
## host ##
#
# The interface or unix socket ORY Hydra should listen and handle administrative API requests on. Use the prefix "unix:" to specify a path to a unix socket. Leave empty to listen on all interfaces.
#
# Examples:
# - localhost
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_ADMIN_HOST=<value>
# - Windows Command Line (CMD):
# > set SERVE_ADMIN_HOST=<value>
#
host:localhost
## cors ##
#
# Configures Cross Origin Resource Sharing for public endpoints.
#
cors:
## allowed_origins ##
#
# A list of origins a cross-domain request can be executed from. If the special * value is present in the list, all origins will be allowed. An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com). Only one wildcard can be used per origin.
# > set SERVE_ADMIN_TLS_ALLOW_TERMINATION_FROM=<value>
#
allow_termination_from:
- 127.0.0.1/32
## enabled ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_ADMIN_TLS_ENABLED=<value>
# - Windows Command Line (CMD):
# > set SERVE_ADMIN_TLS_ENABLED=<value>
#
enabled:false
## key ##
#
key:
## path ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_ADMIN_TLS_KEY_PATH=<value>
# - Windows Command Line (CMD):
# > set SERVE_ADMIN_TLS_KEY_PATH=<value>
#
path:/etc/ssl/private/ssl-cert-snakeoil.key
## port ##
#
# Default value: 4445
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_ADMIN_PORT=<value>
# - Windows Command Line (CMD):
# > set SERVE_ADMIN_PORT=<value>
#
port:1
## tls ##
#
# Configures HTTPS (HTTP over TLS). If configured, the server automatically supports HTTP/2.
#
tls:
## cert ##
#
# Configures the public certificate (pem encoded).
#
cert:
## path ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_TLS_CERT_PATH=<value>
# - Windows Command Line (CMD):
# > set SERVE_TLS_CERT_PATH=<value>
#
path:/etc/ssl/certs/ssl-cert-snakeoil.pem
## allow_termination_from ##
#
# Whitelist one or multiple CIDR address ranges and allow them to terminate TLS connections. Be aware that the X-Forwarded-Proto header must be set and must never be modifiable by anyone but your proxy / gateway / load balancer. Supports ipv4 and ipv6. Hydra serves http instead of https when this option is set.
# Some older browser versions don’t work with SameSite=None. This option enables the workaround defined in https://web.dev/samesite-cookie-recipes/ which essentially stores a second cookie without SameSite as a fallback.
# > set SERVE_COOKIES_SAME_SITE_LEGACY_WORKAROUND=<value>
#
same_site_legacy_workaround:true
## same_site_mode ##
#
# Specify the SameSite mode that cookies should be sent with.
#
# Default value: None
#
# One of:
# - Strict
# - Lax
# - None
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_COOKIES_SAME_SITE_MODE=<value>
# - Windows Command Line (CMD):
# > set SERVE_COOKIES_SAME_SITE_MODE=<value>
#
same_site_mode:Strict
## public ##
#
# Controls the public daemon serving public API endpoints like /oauth2/auth, /oauth2/token, /.well-known/jwks.json
#
public:
## port ##
#
# Default value: 4444
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_PUBLIC_PORT=<value>
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_PORT=<value>
#
port:4444
## host ##
#
# The interface or unix socket ORY Hydra should listen and handle public API requests on. Use the prefix "unix:" to specify a path to a unix socket. Leave empty to listen on all interfaces.
@ -73,28 +399,13 @@ serve:
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_HOST=<value>
#
host:""
host:localhost
## cors ##
#
# Configures Cross Origin Resource Sharing for public endpoints.
#
cors:
## enabled ##
#
# Sets whether CORS is enabled.
#
# Default value: false
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_PUBLIC_CORS_ENABLED=<value>
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_CORS_ENABLED=<value>
#
enabled:false
## allowed_origins ##
#
# A list of origins a cross-domain request can be executed from. If the special * value is present in the list, all origins will be allowed. An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com). Only one wildcard can be used per origin.
@ -113,7 +424,9 @@ serve:
# > set SERVE_PUBLIC_CORS_ALLOWED_ORIGINS=<value>
#
allowed_origins:
- "*"
- https://example.com
- https://*.example.com
- https://*.foo.example.com
## allowed_methods ##
#
@ -128,11 +441,7 @@ serve:
# > set SERVE_PUBLIC_CORS_ALLOWED_METHODS=<value>
#
allowed_methods:
- TRACE
- GET
- HEAD
- GET
- HEAD
- POST
## allowed_headers ##
#
@ -147,9 +456,7 @@ serve:
# > set SERVE_PUBLIC_CORS_ALLOWED_HEADERS=<value>
#
allowed_headers:
- ea
- exercitation consectetur
- exercitation
- ''
## exposed_headers ##
#
@ -164,7 +471,7 @@ serve:
# > set SERVE_PUBLIC_CORS_EXPOSED_HEADERS=<value>
#
exposed_headers:
- Excepteur adipisicing
- ''
## allow_credentials ##
#
@ -198,13 +505,15 @@ serve:
#
# Sets how long (in seconds) the results of a preflight request can be cached. If set to 0, every request is preceded by a preflight request.
#
# Minimum value: 0
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_PUBLIC_CORS_MAX_AGE=<value>
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_CORS_MAX_AGE=<value>
#
max_age:77402945
max_age:0
## debug ##
#
@ -220,12 +529,72 @@ serve:
#
debug:false
## enabled ##
#
# Sets whether CORS is enabled.
#
# Default value: false
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_PUBLIC_CORS_ENABLED=<value>
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_CORS_ENABLED=<value>
#
enabled:false
## socket ##
#
# Sets the permissions of the unix socket
#
socket:
## group ##
#
# Group of unix socket. If empty, the group will be the primary group of the user running hydra.
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_PUBLIC_SOCKET_GROUP=<value>
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_SOCKET_GROUP=<value>
#
group:''
## mode ##
#
# Mode of unix socket in numeric form
#
# Default value: 493
#
# Minimum value: 0
#
# Maximum value: 511
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_PUBLIC_SOCKET_MODE=<value>
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_SOCKET_MODE=<value>
#
mode:0
## owner ##
#
# Owner of unix socket. If empty, the owner will be the user running hydra.
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_PUBLIC_SOCKET_OWNER=<value>
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_SOCKET_OWNER=<value>
#
owner:''
## access_log ##
#
# Access Log configuration for public server.
#
access_log:
## disable_for_health ##
#
# Disable access log for health endpoints.
@ -238,203 +607,6 @@ serve:
# - Windows Command Line (CMD):
# > set SERVE_PUBLIC_ACCESS_LOG_DISABLE_FOR_HEALTH=<value>
#
disable_for_health:true
## admin ##
#
admin:
## port ##
#
# Default value: 4445
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_ADMIN_PORT=<value>
# - Windows Command Line (CMD):
# > set SERVE_ADMIN_PORT=<value>
#
port:4445
## host ##
#
# The interface or unix socket ORY Hydra should listen and handle administrative API requests on. Use the prefix "unix:" to specify a path to a unix socket. Leave empty to listen on all interfaces.
#
# Examples:
# - localhost
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_ADMIN_HOST=<value>
# - Windows Command Line (CMD):
# > set SERVE_ADMIN_HOST=<value>
#
host:localhost
## cors ##
#
# Configures Cross Origin Resource Sharing for public endpoints.
#
cors:
## enabled ##
#
# Sets whether CORS is enabled.
#
# Default value: false
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_ADMIN_CORS_ENABLED=<value>
# - Windows Command Line (CMD):
# > set SERVE_ADMIN_CORS_ENABLED=<value>
#
enabled:false
## allowed_origins ##
#
# A list of origins a cross-domain request can be executed from. If the special * value is present in the list, all origins will be allowed. An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com). Only one wildcard can be used per origin.
# > set SERVE_PUBLIC_TLS_ALLOW_TERMINATION_FROM=<value>
#
allow_termination_from:
- 127.0.0.1/32
- 127.0.0.1/32
- 127.0.0.1/32
## cookies ##
## key ##
#
cookies:
## same_site_mode ##
# Configures the private key (pem encoded).
#
# Specify the SameSite mode that cookies should be sent with.
#
# Default value: None
key:
## path ##
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SERVE_COOKIES_SAME_SITE_MODE=<value>
# $ export SERVE_PUBLIC_TLS_KEY_PATH=<value>
# - Windows Command Line (CMD):
# > set SERVE_COOKIES_SAME_SITE_MODE=<value>
# > set SERVE_PUBLIC_TLS_KEY_PATH=<value>
#
same_site_mode:None
path:/etc/ssl/private/ssl-cert-snakeoil.key
## same_site_legacy_workaround ##
## port ##
#
# Some older browser versions don’t work with SameSite=None. This option enables the workaround defined in https://web.dev/samesite-cookie-recipes/ which essentially stores a second cookie without SameSite as a fallback.
# > set SERVE_COOKIES_SAME_SITE_LEGACY_WORKAROUND=<value>
# > set SERVE_PUBLIC_PORT=<value>
#
same_site_legacy_workaround:true
port:1
## dsn ##
#
@ -535,46 +679,52 @@ serve:
# - Windows Command Line (CMD):
# > set DSN=<value>
#
dsn:memory
dsn:'memory'
## webfinger ##
#
# Configures ./well-known/ settings.
#
webfinger:
## jwks ##
#
# Configures the /.well-known/jwks.json endpoint.
#
jwks:
## broadcast_keys ##
#
# A list of JSON Web Keys that should be exposed at that endpoint. This is usually the public key for verifying OpenID Connect ID Tokens. However, you might want to add additional keys here as well.
# A list of JSON Web Keys that should be exposed at that endpoint. This is usually the public key for verifying OpenID Connect ID Tokens. However, you might want to add additional keys here as well.
#
# Default value: hydra.openid.id-token
#
# Examples:
# - hydra.jwt.access-token
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export WEBFINGER_JWKS_BROADCAST_KEYS=<value>
# - Windows Command Line (CMD):
# > set WEBFINGER_JWKS_BROADCAST_KEYS=<value>
#
broadcast_keys:
- hydra.jwt.access-token
## oidc ##
#
# Configures OpenID Connect features.
#
oidc:
## subject_identifiers ##
#
# Configures the Subject Identifier algorithm. For more information please head over to the documentation: https://www.ory.sh/docs/hydra/advanced#subject-identifier-algorithms
# The OpenID Connect Dynamic Client Registration specification has no concept of whitelisting OAuth 2.0 Scope. If you want to expose Dynamic Client Registration, you should set the default scope enabled for newly registered clients. Keep in mind that users can overwrite this default by setting the "scope" key in the registration payload, effectively disabling the concept of whitelisted scopes.
@ -714,47 +857,53 @@ oidc:
- offline
- offline_access
## subject_identifiers ##
#
# Configures the Subject Identifier algorithm. For more information please head over to the documentation: https://www.ory.sh/docs/hydra/advanced#subject-identifier-algorithms
# > set OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT=<value>
#
salt:some-random-salt
## urls ##
#
urls:
## self ##
#
self:
## issuer ##
#
# This value will be used as the "issuer" in access and ID tokens. It must be specified and using HTTPS protocol, unless --dangerous-force-http is set. This should typically be equal to the public value.
#
# Examples:
# - https://localhost:4444/
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export URLS_SELF_ISSUER=<value>
# - Windows Command Line (CMD):
# > set URLS_SELF_ISSUER=<value>
#
issuer:https://localhost:4444/
## public ##
#
# This is the base location of the public endpoints of your ORY Hydra installation. This should typically be equal to the issuer value. If left unspecified, it falls back to the issuer value.
#
# Examples:
# - https://localhost:4444/
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export URLS_SELF_PUBLIC=<value>
# - Windows Command Line (CMD):
# > set URLS_SELF_PUBLIC=<value>
#
public:https://localhost:4444/
## login ##
#
# Sets the login endpoint of the User Login & Consent flow. Defaults to an internal fallback URL.
# Sets the login endpoint of the User Login & Consent flow. Defaults to an internal fallback URL showing an error.
#
# Examples:
# - https://my-login.app/login
@ -769,7 +918,7 @@ urls:
## consent ##
#
# Sets the consent endpoint of the User Login & Consent flow. Defaults to an internal fallback URL.
# Sets the consent endpoint of the User Login & Consent flow. Defaults to an internal fallback URL showing an error.
#
# Examples:
# - https://my-consent.app/consent
@ -784,7 +933,7 @@ urls:
## logout ##
#
# Sets the logout endpoint. Defaults to an internal fallback URL.
# Sets the logout endpoint. Defaults to an internal fallback URL showing an error.
#
# Examples:
# - https://my-logout.app/logout
@ -799,7 +948,7 @@ urls:
## error ##
#
# Sets the error endpoint. The error ui will be shown when an OAuth2 error occurs that which can not be sent back to the client. Defaults to an internal fallback URL.
# Sets the error endpoint. The error ui will be shown when an OAuth2 error occurs that which can not be sent back to the client. Defaults to an internal fallback URL showing an error.
# Defines how scopes are matched. For more details have a look at https://github.com/ory/fosite#scopes
self:
## public ##
#
# Default value: wildcard
# This is the base location of the public endpoints of your ORY Hydra installation. This should typically be equal to the issuer value. If left unspecified, it falls back to the issuer value.
#
# Examples:
# - https://localhost:4444/
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export STRATEGIES_SCOPE=<value>
# $ export URLS_SELF_PUBLIC=<value>
# - Windows Command Line (CMD):
# > set STRATEGIES_SCOPE=<value>
# > set URLS_SELF_PUBLIC=<value>
#
scope:exact
public:https://localhost:4444/
## issuer ##
#
# This value will be used as the "issuer" in access and ID tokens. It must be specified and using HTTPS protocol, unless --dangerous-force-http is set. This should typically be equal to the public value.
#
# Examples:
# - https://localhost:4444/
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export URLS_SELF_ISSUER=<value>
# - Windows Command Line (CMD):
# > set URLS_SELF_ISSUER=<value>
#
issuer:https://localhost:4444/
## strategies ##
#
strategies:
## access_token ##
#
# Defines access token type. jwt is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens
#
# Default value: opaque
#
# One of:
# - opaque
# - jwt
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export STRATEGIES_ACCESS_TOKEN=<value>
@ -857,26 +1030,30 @@ strategies:
#
access_token:opaque
## scope ##
#
# Defines how scopes are matched. For more details have a look at https://github.com/ory/fosite#scopes
#
# Default value: wildcard
#
# One of:
# - exact
# - wildcard
# - DEPRECATED_HIERARCHICAL_SCOPE_STRATEGY
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export STRATEGIES_SCOPE=<value>
# - Windows Command Line (CMD):
# > set STRATEGIES_SCOPE=<value>
#
scope:exact
## ttl ##
#
# Configures time to live.
#
ttl:
## login_consent_request ##
#
# Configures how long a user login and consent flow may take.
#
# Default value: 1h
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export TTL_LOGIN_CONSENT_REQUEST=<value>
# - Windows Command Line (CMD):
# > set TTL_LOGIN_CONSENT_REQUEST=<value>
#
login_consent_request:1h
## access_token ##
#
# Configures how long access tokens are valid.
@ -933,9 +1110,172 @@ ttl:
#
auth_code:1h
## login_consent_request ##
#
# Configures how long a user login and consent flow may take.
#
# Default value: 30m
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export TTL_LOGIN_CONSENT_REQUEST=<value>
# - Windows Command Line (CMD):
# > set TTL_LOGIN_CONSENT_REQUEST=<value>
#
login_consent_request:1h
## oauth2 ##
#
oauth2:
## session ##
#
session:
## Encrypt OAuth2 Session ##
#
# If set to true (default) ORY Hydra encrypt OAuth2 and OpenID Connect session data using AES-GCM and the system secret before persisting it in the database.
#
# Default value: true
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export OAUTH2_SESSION_ENCRYPT_AT_REST=<value>
# - Windows Command Line (CMD):
# > set OAUTH2_SESSION_ENCRYPT_AT_REST=<value>
#
encrypt_at_rest:false
## include_legacy_error_fields ##
#
# Set this to true if you want to include the `error_hint` and `error_debug` legacy fields in error responses. We recommend to set this to `false` unless you have clients using these fields.
# > set OAUTH2_CLIENT_CREDENTIALS_DEFAULT_GRANT_ALLOWED_SCOPE=<value>
#
default_grant_allowed_scope:false
## expose_internal_errors ##
#
@ -954,56 +1294,30 @@ oauth2:
#
expose_internal_errors:true
## hashers ##
#
# Configures hashing algorithms. Supports only BCrypt at the moment.
#
hashers:
## bcrypt ##
#
# Configures the BCrypt hashing algorithm used for hashing Client Secrets.
#
bcrypt:
## cost ##
#
# Sets the BCrypt cost. The higher the value, the more CPU time is being used to generate hashes.
#
# Default value: 10
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export OAUTH2_HASHERS_BCRYPT_COST=<value>
# - Windows Command Line (CMD):
# > set OAUTH2_HASHERS_BCRYPT_COST=<value>
#
cost:40935632
## pkce ##
#
pkce:
## enforced ##
#
# Sets whether PKCE should be enforced for all clients.
#
# Examples:
# - true
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export OAUTH2_PKCE_ENFORCED=<value>
# - Windows Command Line (CMD):
# > set OAUTH2_PKCE_ENFORCED=<value>
#
enforced:true
## secrets ##
#
# The secrets section configures secrets used for encryption and signing of several systems. All secrets can be rotated, for more information on this topic go to: https://www.ory.sh/docs/hydra/advanced#rotation-of-hmac-token-signing-and-database-and-cookie-encryption-keys
#
secrets:
## cookie ##
#
# A secret that is used to encrypt cookie sessions. Defaults to secrets.system. It is recommended to use a separate secret in production. The first item in the list is used for signing and encryption. The whole list is used for verifying signatures and decryption.
#
# Examples:
# - - this-is-the-primary-secret
# - this-is-an-old-secret
# - this-is-another-old-secret
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SECRETS_COOKIE=<value>
# - Windows Command Line (CMD):
# > set SECRETS_COOKIE=<value>
#
cookie:
- this-is-the-primary-secret
- this-is-an-old-secret
- this-is-another-old-secret
## system ##
#
@ -1025,30 +1339,14 @@ secrets:
- this-is-an-old-secret
- this-is-another-old-secret
## cookie ##
#
# A secret that is used to encrypt cookie sessions. Defaults to secrets.system. It is recommended to use a separate secret in production. The first item in the list is used for signing and encryption. The whole list is used for verifying signatures and decryption.
#
# Examples:
# - - this-is-the-primary-secret
# - this-is-an-old-secret
# - this-is-another-old-secret
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export SECRETS_COOKIE=<value>
# - Windows Command Line (CMD):
# > set SECRETS_COOKIE=<value>
#
cookie:
- this-is-the-primary-secret
- this-is-an-old-secret
- this-is-another-old-secret
## profiling ##
#
# Enables profiling if set. For more details on profiling, head over to: https://blog.golang.org/profiling-go-programs
#
# One of:
# - cpu
# - mem
#
# Examples:
# - cpu
#
@ -1065,22 +1363,6 @@ profiling: cpu
# ORY Hydra supports distributed tracing.
#
tracing:
## provider ##
#
# Set this to the tracing backend you wish to use. Currently supports jaeger. If omitted or empty, tracing will be disabled.
#
# Examples:
# - jaeger
#
# Set this value using environment variables on
# - Linux/macOS:
# $ export TRACING_PROVIDER=<value>
# - Windows Command Line (CMD):
# > set TRACING_PROVIDER=<value>
#
provider:jaeger
## service_name ##
#
# Specifies the service name to use on the tracer.
# > set TRACING_PROVIDERS_JAEGER_LOCAL_AGENT_ADDRESS=<value>
#
local_agent_address:127.0.0.1:6831
## provider ##
#
# Set this to the tracing backend you wish to use. Supports Jaeger, Zipkin DataDog, Elastic APM and Instana. If omitted or empty, tracing will be disabled. Use environment variables to configure DataDog (see https://docs.datadoghq.com/tracing/setup/go/#configuration).