# OpenIdConnectConfigurationProperty

Contains configuration details of an OpenID Connect (OIDC) identity provider, or identity source, that Verified Permissions can use to generate entities from authenticated identities.

It specifies the issuer URL, token type that you want to use, and policy store entity details.

This data type is part of a [Configuration](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_Configuration.html) structure, which is a parameter to [CreateIdentitySource](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreateIdentitySource.html) .

- Source: Generated at build time
- Type last changed: v2.148.0 · 5 Jul 2024

## Example

TypeScript:

```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 openIdConnectConfigurationProperty: verifiedpermissions.CfnIdentitySource.OpenIdConnectConfigurationProperty = {
  issuer: 'issuer',
  tokenSelection: {
    accessTokenOnly: {
      audiences: ['audiences'],
      principalIdClaim: 'principalIdClaim',
    },
    identityTokenOnly: {
      clientIds: ['clientIds'],
      principalIdClaim: 'principalIdClaim',
    },
  },

  // the properties below are optional
  entityIdPrefix: 'entityIdPrefix',
  groupConfiguration: {
    groupClaim: 'groupClaim',
    groupEntityType: 'groupEntityType',
  },
};
```

Python:

```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_configuration_property = verifiedpermissions.CfnIdentitySource.OpenIdConnectConfigurationProperty(
    issuer="issuer",
    token_selection=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"
        )
    ),

    # the properties below are optional
    entity_id_prefix="entityIdPrefix",
    group_configuration=verifiedpermissions.CfnIdentitySource.OpenIdConnectGroupConfigurationProperty(
        group_claim="groupClaim",
        group_entity_type="groupEntityType"
    )
)
```

Java:

```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.*;

OpenIdConnectConfigurationProperty openIdConnectConfigurationProperty = OpenIdConnectConfigurationProperty.builder()
        .issuer("issuer")
        .tokenSelection(OpenIdConnectTokenSelectionProperty.builder()
                .accessTokenOnly(OpenIdConnectAccessTokenConfigurationProperty.builder()
                        .audiences(List.of("audiences"))
                        .principalIdClaim("principalIdClaim")
                        .build())
                .identityTokenOnly(OpenIdConnectIdentityTokenConfigurationProperty.builder()
                        .clientIds(List.of("clientIds"))
                        .principalIdClaim("principalIdClaim")
                        .build())
                .build())

        // the properties below are optional
        .entityIdPrefix("entityIdPrefix")
        .groupConfiguration(OpenIdConnectGroupConfigurationProperty.builder()
                .groupClaim("groupClaim")
                .groupEntityType("groupEntityType")
                .build())
        .build();
```

C# / .NET:

```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 openIdConnectConfigurationProperty = new OpenIdConnectConfigurationProperty {
    Issuer = "issuer",
    TokenSelection = new OpenIdConnectTokenSelectionProperty {
        AccessTokenOnly = new OpenIdConnectAccessTokenConfigurationProperty {
            Audiences = new [] { "audiences" },
            PrincipalIdClaim = "principalIdClaim"
        },
        IdentityTokenOnly = new OpenIdConnectIdentityTokenConfigurationProperty {
            ClientIds = new [] { "clientIds" },
            PrincipalIdClaim = "principalIdClaim"
        }
    },

    // the properties below are optional
    EntityIdPrefix = "entityIdPrefix",
    GroupConfiguration = new OpenIdConnectGroupConfigurationProperty {
        GroupClaim = "groupClaim",
        GroupEntityType = "groupEntityType"
    }
};
```

Golang:

```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"

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

	// the properties below are optional
	EntityIdPrefix: jsii.String("entityIdPrefix"),
	GroupConfiguration: &OpenIdConnectGroupConfigurationProperty{
		GroupClaim: jsii.String("groupClaim"),
		GroupEntityType: jsii.String("groupEntityType"),
	},
}
```

## Properties

- `entityIdPrefix`: string — A descriptive string that you want to prefix to user entities from your OIDC identity provider.

  For example, if you set an `entityIdPrefix` of `MyOIDCProvider` , you can reference principals in your policies in the format `MyCorp::User::MyOIDCProvider|Carlos` .

- `groupConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnIdentitySource.OpenIdConnectGroupConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnIdentitySource.OpenIdConnectGroupConfigurationProperty.html) — The claim in OIDC identity provider tokens that indicates a user's group membership, and the entity type that you want to map it to.

  For example, this object can map the contents of a `groups` claim to `MyCorp::UserGroup` .

- `issuer`: string (required) — The issuer URL of an OIDC identity provider.

  This URL must have an OIDC discovery endpoint at the path `.well-known/openid-configuration` .

- `tokenSelection`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnIdentitySource.OpenIdConnectTokenSelectionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_verifiedpermissions.CfnIdentitySource.OpenIdConnectTokenSelectionProperty.html) (required) — 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.
