Skip to content
v2.273.0

AuthenticateOidcOptions Struct ​

Options for ListenerAction.authenciateOidc().

Example ​

ts
declare const listener: elbv2.ApplicationListener;
declare const myTargetGroup: elbv2.ApplicationTargetGroup;

listener.addAction('DefaultAction', {
  action: elbv2.ListenerAction.authenticateOidc({
    authorizationEndpoint: 'https://example.com/openid',
    // Other OIDC properties here
    clientId: '...',
    clientSecret: SecretValue.secretsManager('...'),
    issuer: '...',
    tokenEndpoint: '...',
    userInfoEndpoint: '...',

    // Next
    next: elbv2.ListenerAction.forward([myTargetGroup]),
  }),
});

Properties ​

allowHttpsOutboundbooleanallow_https_outboundboolallowHttpsOutboundBooleanAllowHttpsOutboundboolAllowHttpsOutbound*bool= true#
Allow HTTPS outbound traffic to communicate with the IdP.

Set this property to false if the IP address used for the IdP endpoint is identifiable and you want to control outbound traffic. Then allow HTTPS outbound traffic to the IdP's IP address using the listener's connections property.

authenticationRequestExtraParams{ [key: string]: string }authentication_request_extra_paramstyping.Mapping[str, str]authenticationRequestExtraParamsMap<String, String>AuthenticationRequestExtraParamsIDictionary<string, string>AuthenticationRequestExtraParams*map[string]*string= No extra parameters#
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
authorizationEndpointstringauthorization_endpointstrauthorizationEndpointStringAuthorizationEndpointstringAuthorizationEndpoint*stringrequired#
The authorization endpoint of the IdP.

This must be a full URL, including the HTTPS protocol, the domain, and the path.

clientIdstringclient_idstrclientIdStringClientIdstringClientId*stringrequired#
The OAuth 2.0 client identifier.
clientSecretSecretValueclient_secretSecretValueclientSecretSecretValueClientSecretSecretValueClientSecretSecretValuerequired#
The OAuth 2.0 client secret.
issuerstringissuerstrissuerStringIssuerstringIssuer*stringrequired#
The OIDC issuer identifier of the IdP.

This must be a full URL, including the HTTPS protocol, the domain, and the path.

onUnauthenticatedRequestUnauthenticatedActionon_unauthenticated_requestUnauthenticatedActiononUnauthenticatedRequestUnauthenticatedActionOnUnauthenticatedRequestUnauthenticatedActionOnUnauthenticatedRequestUnauthenticatedAction= UnauthenticatedAction.AUTHENTICA…#
The behavior if the user is not authenticated.
default

Default: UnauthenticatedAction.AUTHENTICATE

scopestringscopestrscopeStringScopestringScope*string= "openid"#
The set of user claims to be requested from the IdP.

To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.

sessionCookieNamestringsession_cookie_namestrsessionCookieNameStringSessionCookieNamestringSessionCookieName*string= "AWSELBAuthSessionCookie"#
The name of the cookie used to maintain session information.
sessionTimeoutDurationsession_timeoutDurationsessionTimeoutDurationSessionTimeoutDurationSessionTimeoutDuration= Duration.days(7)#
The maximum duration of the authentication session.
tokenEndpointstringtoken_endpointstrtokenEndpointStringTokenEndpointstringTokenEndpoint*stringrequired#
The token endpoint of the IdP.

This must be a full URL, including the HTTPS protocol, the domain, and the path.

userInfoEndpointstringuser_info_endpointstruserInfoEndpointStringUserInfoEndpointstringUserInfoEndpoint*stringrequired#
The user info endpoint of the IdP.

This must be a full URL, including the HTTPS protocol, the domain, and the path.