Skip to content
v2.276.0

AuthenticateOidcConfigProperty Struct ​

Specifies information required using an identity provide (IdP) that is compliant with OpenID Connect (OIDC) to authenticate users.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
const authenticateOidcConfigProperty: elbv2.CfnListenerRule.AuthenticateOidcConfigProperty = {
  authorizationEndpoint: 'authorizationEndpoint',
  clientId: 'clientId',
  issuer: 'issuer',
  tokenEndpoint: 'tokenEndpoint',
  userInfoEndpoint: 'userInfoEndpoint',

  // the properties below are optional
  authenticationRequestExtraParams: {
    authenticationRequestExtraParamsKey: 'authenticationRequestExtraParams',
  },
  clientSecret: 'clientSecret',
  onUnauthenticatedRequest: 'onUnauthenticatedRequest',
  scope: 'scope',
  sessionCookieName: 'sessionCookieName',
  sessionTimeout: 123,
  useExistingClientSecret: false,
};

Properties ​

authenticationRequestExtraParamsoptionalIResolvable | { [key: string]: string }authentication_request_extra_paramsoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]authenticationRequestExtraParamsoptionalIResolvableAuthenticationRequestExtraParamsoptionalIResolvableAuthenticationRequestExtraParamsoptionalinterface{}#
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.
clientSecretoptionalstringclient_secretoptionalstrclientSecretoptionalStringClientSecretoptionalstringClientSecretoptional*string#
The OAuth 2.0 client secret. This parameter is required if you are creating a rule. If you are modifying a rule, you can omit this parameter if you set `UseExistingClientSecret` to true.
issuerstringissuerstrissuerStringIssuerstringIssuer*stringrequired#
The OIDC issuer identifier of the IdP.

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

onUnauthenticatedRequestoptionalstringon_unauthenticated_requestoptionalstronUnauthenticatedRequestoptionalStringOnUnauthenticatedRequestoptionalstringOnUnauthenticatedRequestoptional*string#
The behavior if the user is not authenticated. The following are possible values:.
  • deny `` - Return an HTTP 401 Unauthorized error.
  • allow `` - Allow the request to be forwarded to the target.
  • authenticate `` - Redirect the request to the IdP authorization endpoint. This is the default value.
scopeoptionalstringscopeoptionalstrscopeoptionalStringScopeoptionalstringScopeoptional*string#
The set of user claims to be requested from the IdP. The default is `openid` .

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

sessionCookieNameoptionalstringsession_cookie_nameoptionalstrsessionCookieNameoptionalStringSessionCookieNameoptionalstringSessionCookieNameoptional*string#
The name of the cookie used to maintain session information.

The default is AWSELBAuthSessionCookie.

sessionTimeoutoptionalnumbersession_timeoutoptionalint | floatsessionTimeoutoptionalNumberSessionTimeoutoptionaldoubleSessionTimeoutoptional*float64#
The maximum duration of the authentication session, in seconds.

The default is 604800 seconds (7 days).

tokenEndpointstringtoken_endpointstrtokenEndpointStringTokenEndpointstringTokenEndpoint*stringrequired#
The token endpoint of the IdP.

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

useExistingClientSecretoptionalboolean | IResolvableuse_existing_client_secretoptionaltyping.Union[bool, IResolvable]useExistingClientSecretoptionalBooleanUseExistingClientSecretoptionalboolUseExistingClientSecretoptionalinterface{}#
Indicates whether to use the existing client secret when modifying a rule.

If you are creating a rule, you can omit this parameter or set it to false.

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.