IdP Opts in OMG are objects of configuration options primarily for auth, session, and header management. They define parameters for OMG to interact with the admin’s identity provider, as well as to store the identity and access information and what information to pass to the backend resources.
Create IdP options groups to organize different types of IdP Options.
Configure a required optsName for each IdP Options set to use as a key to reference the IdP Options configuration in the optsName of custom policies.
IdP Options configurations can be configured to be extensions of existing IdP Options configurations.
Specify a parentName in an IdP Options configuration. Evaluation of key / value pairs will go in the order of child > parent, meaning you can extend a parent and override as many existing values as you wish.
Key value pairs to configure parameters for the authorization code flow and jwt validation.
discovery - Discovery URL for the OpenID Connect provider (e.g. https://example.com/.well-known/openid-configuration)
client_id - Client ID to be used in the authorization request
client_secret - Environment variable name for the client secret to be used in the authorization request. os.getenv("CLIENT_SECRET") to use an environment variable for your client secrets rather than hardcoding strings in the configuration.
redirect_uri - Redirect URI to be used in the authorization request
scope - Scopes to request from the IdP (i.e. openid profile email)
session_contents - Contents to be stored in the session storage: id_token, enc_id_token, user, access_token (includes refresh_token)
logout_path - Logout URI to clear the OMG session. Requests to this URI will be handled by OMG and will NOT reach your backend.
post_logout_redirect_uri - Redirect URL after clearing IdP session (and OMG session)
redirect_after_logout_uri - Redirect URL after clearing OMG session (IdP session NOT cleared)
redirect_after_logout_with_id_token_hint - Whether the redirect after logout should include the id_token_hint
revoke_tokens_on_logout - Whether to revoke the tokens on logout (true or false)
refresh_session_interval - Interval in seconds to refresh the tokens
renew_access_token_on_expiry - Whether to renew access token on expiry. Redirect to authorization endpoint if renewal fails.
access_token_expires_leeway - Leeway in seconds for access token renewal
authorization_params - Additional parameters to be sent to the authorization endpoint
iat_slack - Leeway in seconds for the issued at (iat) claim in the ID token
ssl_verify - Enforcement of SSL certificate check to the IdP ("yes") or not ("no").
redirect_uri_scheme - Scheme to use in redirect_uri ("http" or "https").
keepalive - Connection keepalive with the IdP can be enabled ("yes") or disabled ("no")
use_pkce - Whether to use PKCE in authorization request
use_nonce - Whether to use nonce in authorization request
force_reauthorize - Force reauthorization with the IdP even if tokens are already cached
cache_segment - To segment jwt_verification and introspection caches if you are using locations with different opts configurations
introspection_interval - Interval in seconds to refresh the introspection cache for an access token
introspection_expiry_claim - Claim name in the introspection response that indicates the expiry time of the access token (default is exp)
introspection_cache_ignore - Whether to ignore the introspection cache and always call the introspection endpoint
jwt_verification_cache_ignore - Whether to ignore the jwt verification cache and always verify the jwt
Key value pairs to configure parameters to manage the session for token storage.
idling_timeout - Number of seconds a session can remain idle before it’s invalid. Set to 0 to disable.
absolute_timeout - Number of seconds a session can remain valid before requiring re-authentication. Set to 0 to disable.
storage - Session storage type (e.g. cookie, shm, etc.)
secret - Environment variable name for the secret hashed with SHA-256 used for key derivation
cookie_path - Path for the cookie to be set. Default is /.
cookie_domain - Domain for the cookie to be set. Default is the domain of the request.
cookie_http_only - Whether the cookie should be HTTP only. Default is true.
cookie_secure - Whether the cookie should be secure (true or false)
Configure the injection of request headers between the gateway and your applications.
include_regex - Regular expression matching all claims from the token to pass as request headers to the backend (e.g. .* to inject all claims in the id_token as request headers)
exclude_regex - Regular expression matching all claims from the token to NOT pass as request headers to the backend
set_header_{HEADER} - Set static request header. The header name is the string prefixed with 'set_header_' (e.g. set_header_NAME)
header_prefix - Prefix for the request headers from claims (e.g. OMG-HEADER-)
id_token_header_name - Name of the request header to pass the id token to the backend (session_contents auth opt must include enc_id_token)
access_token_header_name - Name of the request header to pass the access token to the backend (session_contents auth opt must include access_token)
refresh_token_header_name - Name of the request header to pass the refresh token to the backend (session_contents auth opt must include access_token)
headerToOptsMapping - Used to define dynamic opts. Mapping of the opts names to the request header values. (e.g. { "key":"X-Forwarded-Host", "mapping":{ "www.oauthlink.com":"Main Options", "app1.oauthlink.com":"App 1 Options" } })
headerToBackendMapping - Used to define dynamic backendValues. Mapping of the backendValues to the request header values. (e.g. { "key":"X-Forwarded-Host", "mapping":{ "www.oauthlink.com":"https://internal-vip", "app1.oauthlink.com":"App 1 Backend" } })
disable_ootb_auth_error_response - Disable the default error response for auth policy errors. This will allow you to handle auth errors in your own way.
disable_ootb_jwt_error_response - Disable the default error response for jwt verification errors. This will allow you to handle jwt errors in your own way.
disable_ootb_introspect_error_response - Disable the default error response for introspection errors. This will allow you to handle introspection errors in your own way.
By default, cookie storage is configured. Session option configuration is not required if you want to use cookie storage for tokens. We do NOT recommend using cookie storage for tokens that contain sensitive data or for refresh tokens.
You can find lua_shared_dict sessions 10m; in the custom NGINX config at the http level. If you use shm storage type, you will likely need to adjust the size of the sessions cache to meet your needs for token storage.