AWS::VerifiedPermissions::IdentitySourceCreates or updates a reference to Amazon Cognito as an external identity provider. If you are creating a new identity source, then you must specify a `Configuration` . If you are updating an existing identity source, then you must specify an `UpdateConfiguration` . After you create an identity source, you can use the identities provided by the IdP as proxies for the principal in authorization queries that use the [IsAuthorizedWithToken](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorizedWithToken.html) operation. These identities take the form of tokens that contain claims about the user, such as IDs, attributes and group memberships. Amazon Cognito provides both identity tokens and access tokens, and Verified Permissions can use either or both. Any combination of identity and access tokens results in the same Cedar principal. Verified Permissions automatically translates the information about the identities into the standard Cedar attributes that can be evaluated by your policies. Because the Amazon Cognito identity and access tokens can contain different information, the tokens you choose to use determine the attributes that are available to access in the Cedar principal from your policies. Amazon Cognito Identity is not available in all of the same AWS Regions as . Because of this, the `AWS::VerifiedPermissions::IdentitySource` type is not available to create from CloudFormation in Regions where Amazon Cognito Identity is not currently available. Users can still create `AWS::VerifiedPermissions::IdentitySource` in those Regions, but only from the AWS CLI , SDK, or from the AWS console. > To reference a user from this identity source in your Cedar policies, use the following syntax. > > *IdentityType::"<CognitoUserPoolIdentifier>|<CognitoClientId>* > > Where `IdentityType` is the string that you provide to the `PrincipalEntityType` parameter for this operation. The `CognitoUserPoolId` and `CognitoClientId` are defined by the Amazon Cognito user pool.
import { CfnIdentitySource } from 'aws-cdk-lib/aws-verifiedpermissions';Or use the module namespace:
import * as verifiedpermissions from 'aws-cdk-lib/aws-verifiedpermissions';
// verifiedpermissions.CfnIdentitySourceConfiguration passed to the constructor as CfnIdentitySourceProps.
configurationRequiredIResolvable | IdentitySourceConfigurationPropertyContains configuration information used when creating a new identity source.
policyStoreIdRequiredstringSpecifies the ID of the policy store in which you want to store this identity source. Only policies and requests made using this policy store can reference identities from the identity provider configured in the new identity source.
principalEntityTypeOptionalstringSpecifies the namespace and data type of the principals generated for identities authenticated by the new identity source.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-verifiedpermissionsAWS::VerifiedPermissions::IdentitySource