Skip to content
v2.277.0

OpenIdConnectTokenSelectionProperty Struct ​

The token type that you want to process from your OIDC identity provider.

Your policy store can process either identity (ID) or access tokens from a given OIDC identity source.

This data type is part of a OpenIdConnectConfiguration structure, which is a parameter of CreateIdentitySource .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_verifiedpermissions as verifiedpermissions } from 'aws-cdk-lib';
const openIdConnectTokenSelectionProperty: verifiedpermissions.CfnIdentitySource.OpenIdConnectTokenSelectionProperty = {
  accessTokenOnly: {
    audiences: ['audiences'],
    principalIdClaim: 'principalIdClaim',
  },
  identityTokenOnly: {
    clientIds: ['clientIds'],
    principalIdClaim: 'principalIdClaim',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_verifiedpermissions as verifiedpermissions

open_id_connect_token_selection_property = verifiedpermissions.CfnIdentitySource.OpenIdConnectTokenSelectionProperty(
    access_token_only=verifiedpermissions.CfnIdentitySource.OpenIdConnectAccessTokenConfigurationProperty(
        audiences=["audiences"],
        principal_id_claim="principalIdClaim"
    ),
    identity_token_only=verifiedpermissions.CfnIdentitySource.OpenIdConnectIdentityTokenConfigurationProperty(
        client_ids=["clientIds"],
        principal_id_claim="principalIdClaim"
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.verifiedpermissions.*;

OpenIdConnectTokenSelectionProperty openIdConnectTokenSelectionProperty = OpenIdConnectTokenSelectionProperty.builder()
        .accessTokenOnly(OpenIdConnectAccessTokenConfigurationProperty.builder()
                .audiences(List.of("audiences"))
                .principalIdClaim("principalIdClaim")
                .build())
        .identityTokenOnly(OpenIdConnectIdentityTokenConfigurationProperty.builder()
                .clientIds(List.of("clientIds"))
                .principalIdClaim("principalIdClaim")
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.VerifiedPermissions;

var openIdConnectTokenSelectionProperty = new OpenIdConnectTokenSelectionProperty {
    AccessTokenOnly = new OpenIdConnectAccessTokenConfigurationProperty {
        Audiences = new [] { "audiences" },
        PrincipalIdClaim = "principalIdClaim"
    },
    IdentityTokenOnly = new OpenIdConnectIdentityTokenConfigurationProperty {
        ClientIds = new [] { "clientIds" },
        PrincipalIdClaim = "principalIdClaim"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

openIdConnectTokenSelectionProperty := &OpenIdConnectTokenSelectionProperty{
	AccessTokenOnly: &OpenIdConnectAccessTokenConfigurationProperty{
		Audiences: []*string{
			jsii.String("audiences"),
		},
		PrincipalIdClaim: jsii.String("principalIdClaim"),
	},
	IdentityTokenOnly: &OpenIdConnectIdentityTokenConfigurationProperty{
		ClientIds: []*string{
			jsii.String("clientIds"),
		},
		PrincipalIdClaim: jsii.String("principalIdClaim"),
	},
}

Properties ​

accessTokenOnlyoptionalIResolvable | CfnIdentitySource.OpenIdConnectAccessTokenConfigurationPropertyaccess_token_onlyoptionaltyping.Union[IResolvable, OpenIdConnectAccessTokenConfigurationProperty]accessTokenOnlyoptionalIResolvableAccessTokenOnlyoptionalIResolvableAccessTokenOnlyoptionalinterface{} #
The OIDC configuration for processing access tokens.

Contains allowed audience claims, for example https://auth.example.com , and the claim that you want to map to the principal, for example sub .

identityTokenOnlyoptionalIResolvable | CfnIdentitySource.OpenIdConnectIdentityTokenConfigurationPropertyidentity_token_onlyoptionaltyping.Union[IResolvable, OpenIdConnectIdentityTokenConfigurationProperty]identityTokenOnlyoptionalIResolvableIdentityTokenOnlyoptionalIResolvableIdentityTokenOnlyoptionalinterface{} #
The OIDC configuration for processing identity (ID) tokens.

Contains allowed client ID claims, for example 1example23456789 , and the claim that you want to map to the principal, for example sub .