class CfnIdentitySourcePropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.VerifiedPermissions.Mixins.CfnIdentitySourcePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsverifiedpermissions/mixins#CfnIdentitySourcePropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.verifiedpermissions.mixins.CfnIdentitySourcePropsMixin |
Python | aws_cdk.mixins_preview.aws_verifiedpermissions.mixins.CfnIdentitySourcePropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_verifiedpermissions » mixins » CfnIdentitySourcePropsMixin |
Implements
IMixin
Extends
Mixin
Creates 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 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
IdentityTypeis the string that you provide to thePrincipalEntityTypeparameter for this operation. TheCognitoUserPoolIdandCognitoClientIdare defined by the Amazon Cognito user pool.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as verifiedpermissions_mixins } from '@aws-cdk/mixins-preview/aws-verifiedpermissions';
const cfnIdentitySourcePropsMixin = new verifiedpermissions_mixins.CfnIdentitySourcePropsMixin({
configuration: {
cognitoUserPoolConfiguration: {
clientIds: ['clientIds'],
groupConfiguration: {
groupEntityType: 'groupEntityType',
},
userPoolArn: 'userPoolArn',
},
openIdConnectConfiguration: {
entityIdPrefix: 'entityIdPrefix',
groupConfiguration: {
groupClaim: 'groupClaim',
groupEntityType: 'groupEntityType',
},
issuer: 'issuer',
tokenSelection: {
accessTokenOnly: {
audiences: ['audiences'],
principalIdClaim: 'principalIdClaim',
},
identityTokenOnly: {
clientIds: ['clientIds'],
principalIdClaim: 'principalIdClaim',
},
},
},
},
policyStoreId: 'policyStoreId',
principalEntityType: 'principalEntityType',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnIdentitySourcePropsMixin(props: CfnIdentitySourceMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Identity Source Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::VerifiedPermissions::IdentitySource.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript