- Implements: IIdentitySource
import { IdentitySource } from '@cdklabs/cdk-verified-permissions'
new IdentitySource(scope: Construct, id: string, props: IdentitySourceProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
IdentitySourceProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: IdentitySourceProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
addAudience |
Add an audience to the list. |
addClientId |
Add a clientId to the list The method can be called only when the Identity Source is configured with one of these configs: - Cognito auth provider - OIDC auth provider and ID Token Selection mode. |
addUserPoolClient |
Add a User Pool Client The method can be called only when the Identity Source is configured with Cognito auth provider. |
public toString(): string
Returns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
- Type: aws-cdk-lib.RemovalPolicy
public addAudience(audience: string): void
Add an audience to the list.
The method can be called only when the Identity Source is configured with OIDC auth provider and Access Token Selection mode
- Type: string
the audience to be added.
public addClientId(clientId: string): void
Add a clientId to the list The method can be called only when the Identity Source is configured with one of these configs: - Cognito auth provider - OIDC auth provider and ID Token Selection mode.
- Type: string
The clientId to be added.
public addUserPoolClient(userPoolClient: IUserPoolClient): void
Add a User Pool Client The method can be called only when the Identity Source is configured with Cognito auth provider.
- Type: aws-cdk-lib.aws_cognito.IUserPoolClient
The User Pool Client Construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
fromIdentitySourceAttributes |
Creates Identity Source from its attributes. |
fromIdentitySourceId |
Create an Identity Source from its identifier. |
import { IdentitySource } from '@cdklabs/cdk-verified-permissions'
IdentitySource.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
import { IdentitySource } from '@cdklabs/cdk-verified-permissions'
IdentitySource.isOwnedResource(construct: IConstruct)
Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { IdentitySource } from '@cdklabs/cdk-verified-permissions'
IdentitySource.isResource(construct: IConstruct)
Check whether the given construct is a Resource.
- Type: constructs.IConstruct
import { IdentitySource } from '@cdklabs/cdk-verified-permissions'
IdentitySource.fromIdentitySourceAttributes(scope: Construct, id: string, attrs: IdentitySourceAttributes)
Creates Identity Source from its attributes.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: IdentitySourceAttributes
An IdentitySourceAttributes
object.
import { IdentitySource } from '@cdklabs/cdk-verified-permissions'
IdentitySource.fromIdentitySourceId(scope: Construct, id: string, identitySourceId: string)
Create an Identity Source from its identifier.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: string
The Identity Source identifier.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
audiencesOIDC |
string[] |
No description. |
clientIds |
string[] |
No description. |
identitySourceId |
string |
Identity Source identifier. |
issuer |
string |
No description. |
policyStore |
IPolicyStore |
No description. |
cognitoGroupEntityType |
string |
No description. |
groupConfigGroupClaimOIDC |
string |
No description. |
groupConfigGroupEntityTypeOIDC |
string |
No description. |
principalIdClaimOIDC |
string |
No description. |
userPoolArn |
string |
No description. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly audiencesOIDC: string[];
- Type: string[]
public readonly clientIds: string[];
- Type: string[]
public readonly identitySourceId: string;
- Type: string
Identity Source identifier.
public readonly issuer: string;
- Type: string
public readonly policyStore: IPolicyStore;
- Type: IPolicyStore
public readonly cognitoGroupEntityType: string;
- Type: string
public readonly groupConfigGroupClaimOIDC: string;
- Type: string
public readonly groupConfigGroupEntityTypeOIDC: string;
- Type: string
public readonly principalIdClaimOIDC: string;
- Type: string
public readonly userPoolArn: string;
- Type: string
- Implements: IPolicy
import { Policy } from '@cdklabs/cdk-verified-permissions'
new Policy(scope: Construct, id: string, props: PolicyProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
PolicyProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: PolicyProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
public toString(): string
Returns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
- Type: aws-cdk-lib.RemovalPolicy
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
fromFile |
Create a policy based on a file containing a cedar policy. |
fromPolicyAttributes |
Import a Policy construct from attributes. |
fromPolicyId |
Import a policy into the CDK using its id. |
import { Policy } from '@cdklabs/cdk-verified-permissions'
Policy.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
import { Policy } from '@cdklabs/cdk-verified-permissions'
Policy.isOwnedResource(construct: IConstruct)
Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { Policy } from '@cdklabs/cdk-verified-permissions'
Policy.isResource(construct: IConstruct)
Check whether the given construct is a Resource.
- Type: constructs.IConstruct
import { Policy } from '@cdklabs/cdk-verified-permissions'
Policy.fromFile(scope: Construct, id: string, props: StaticPolicyFromFileProps)
Create a policy based on a file containing a cedar policy.
Best practice would be
for the file name to end in .cedar
but this is not required. Policy is parsed for valid
syntax but not validated against schema. In order to validate against schema, use
PolicyStore.addPoliciesFromPath()
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct id.
A StaticPolicyFromFileProps
object.
import { Policy } from '@cdklabs/cdk-verified-permissions'
Policy.fromPolicyAttributes(scope: Construct, id: string, attrs: PolicyAttributes)
Import a Policy construct from attributes.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct id.
- Type: PolicyAttributes
A PolicyAttributes
object.
import { Policy } from '@cdklabs/cdk-verified-permissions'
Policy.fromPolicyId(scope: Construct, id: string, policyId: string)
Import a policy into the CDK using its id.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct id.
- Type: string
The policy id.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
definition |
PolicyDefinitionProperty |
No description. |
policyId |
string |
The unique ID of the new or updated policy. |
policyStoreId |
string |
No description. |
policyType |
PolicyType |
The type of the policy. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly definition: PolicyDefinitionProperty;
- Type: PolicyDefinitionProperty
public readonly policyId: string;
- Type: string
The unique ID of the new or updated policy.
public readonly policyStoreId: string;
- Type: string
public readonly policyType: PolicyType;
- Type: PolicyType
The type of the policy.
This is one of the following values: Static or TemplateLinked.
- Implements: IPolicyStore
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
new PolicyStore(scope: Construct, id: string, props?: PolicyStoreProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
PolicyStoreProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: PolicyStoreProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
addPolicies |
Add multiple policies to the policy store. |
addPoliciesFromPath |
Takes in an absolute path to a directory containing .cedar files and adds the contents of each .cedar file as policies to this policy store. Parses the policies with cedar-wasm and, if the policy store has a schema, performs semantic validation of the policies as well. |
grant |
Adds an IAM policy statement associated with this policy store to an IAM principal's policy. |
grantAuth |
Permits an IAM principal all auth operations on the policy store: IsAuthorized, IsAuthorizedWithToken. |
grantRead |
Permits an IAM principal all read operations on the policy store: GetIdentitySource, GetPolicy, GetPolicyStore, GetPolicyTemplate, GetSchema, ListIdentitySources, ListPolicies, ListPolicyTemplates. |
grantWrite |
Permits an IAM principal all write & read operations on the policy store: CreateIdentitySource, CreatePolicy,CreatePolicyTemplate, DeleteIdentitySource, DeletePolicy, DeletePolicyTemplate, PutSchema, UpdateIdentitySource, UpdatePolicy, UpdatePolicyTemplate. |
public toString(): string
Returns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
- Type: aws-cdk-lib.RemovalPolicy
public addPolicies(policyDefinitions: AddPolicyOptions[]): Policy[]
Add multiple policies to the policy store.
- Type: AddPolicyOptions[]
An array of policy options for the policy stores policies.
public addPoliciesFromPath(absolutePath: string): Policy[]
Takes in an absolute path to a directory containing .cedar files and adds the contents of each .cedar file as policies to this policy store. Parses the policies with cedar-wasm and, if the policy store has a schema, performs semantic validation of the policies as well.
- Type: string
a string representing an absolute path to the directory containing your policies.
public grant(grantee: IGrantable, actions: ...string[]): Grant
Adds an IAM policy statement associated with this policy store to an IAM principal's policy.
- Type: aws-cdk-lib.aws_iam.IGrantable
- Type: ...string[]
public grantAuth(grantee: IGrantable): Grant
Permits an IAM principal all auth operations on the policy store: IsAuthorized, IsAuthorizedWithToken.
- Type: aws-cdk-lib.aws_iam.IGrantable
public grantRead(grantee: IGrantable): Grant
Permits an IAM principal all read operations on the policy store: GetIdentitySource, GetPolicy, GetPolicyStore, GetPolicyTemplate, GetSchema, ListIdentitySources, ListPolicies, ListPolicyTemplates.
- Type: aws-cdk-lib.aws_iam.IGrantable
public grantWrite(grantee: IGrantable): Grant
Permits an IAM principal all write & read operations on the policy store: CreateIdentitySource, CreatePolicy,CreatePolicyTemplate, DeleteIdentitySource, DeletePolicy, DeletePolicyTemplate, PutSchema, UpdateIdentitySource, UpdatePolicy, UpdatePolicyTemplate.
- Type: aws-cdk-lib.aws_iam.IGrantable
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
fromPolicyStoreArn |
Create a PolicyStore construct that represents an external PolicyStore via policy store arn. |
fromPolicyStoreAttributes |
Creates a PolicyStore construct that represents an external Policy Store. |
fromPolicyStoreId |
Create a PolicyStore construct that represents an external policy store via policy store id. |
schemaFromOpenApiSpec |
This method generates a schema based on an swagger file. |
schemaFromRestApi |
This method generates a schema based on an AWS CDK RestApi construct. |
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
PolicyStore.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
PolicyStore.isOwnedResource(construct: IConstruct)
Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
PolicyStore.isResource(construct: IConstruct)
Check whether the given construct is a Resource.
- Type: constructs.IConstruct
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
PolicyStore.fromPolicyStoreArn(scope: Construct, id: string, policyStoreArn: string)
Create a PolicyStore construct that represents an external PolicyStore via policy store arn.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: string
The PolicyStore's ARN.
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
PolicyStore.fromPolicyStoreAttributes(scope: Construct, id: string, attrs: PolicyStoreAttributes)
Creates a PolicyStore construct that represents an external Policy Store.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: PolicyStoreAttributes
A PolicyStoreAttributes
object.
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
PolicyStore.fromPolicyStoreId(scope: Construct, id: string, policyStoreId: string)
Create a PolicyStore construct that represents an external policy store via policy store id.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: string
The PolicyStore's id.
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
PolicyStore.schemaFromOpenApiSpec(swaggerFilePath: string, groupEntityTypeName?: string)
This method generates a schema based on an swagger file.
It makes the same assumptions and decisions made in the Amazon Verified Permissions console. This feature is built for swagger files generated from an Amazon API Gateway export. It's possible that some swagger files generated by other tools will not work. In that case, please file an issue.
- Type: string
absolute path to a swagger file in the local directory structure, in json format.
- Type: string
optional parameter to specify the group entity type name.
If passed, the schema's User type will have a parent of this type.
import { PolicyStore } from '@cdklabs/cdk-verified-permissions'
PolicyStore.schemaFromRestApi(restApi: RestApi, groupEntityTypeName?: string)
This method generates a schema based on an AWS CDK RestApi construct.
It makes the same assumptions and decisions made in the Amazon Verified Permissions console.
- Type: aws-cdk-lib.aws_apigateway.RestApi
The RestApi construct instance from which to generate the schema.
- Type: string
Specifies a group entity type name.
If passed, the schema's User type will have a parent of this type.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
policyStoreArn |
string |
ARN of the Policy Store. |
policyStoreId |
string |
ID of the Policy Store. |
policyStoreName |
string |
Name of the Policy Store. |
validationSettings |
ValidationSettings |
Validation Settings of the Policy Store. |
description |
string |
Description of the Policy Store. |
schema |
Schema |
Schema definition of the Policy Store. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly policyStoreArn: string;
- Type: string
ARN of the Policy Store.
public readonly policyStoreId: string;
- Type: string
ID of the Policy Store.
public readonly policyStoreName: string;
- Type: string
Name of the Policy Store.
public readonly validationSettings: ValidationSettings;
- Type: ValidationSettings
Validation Settings of the Policy Store.
public readonly description: string;
- Type: string
Description of the Policy Store.
public readonly schema: Schema;
- Type: Schema
Schema definition of the Policy Store.
- Implements: IPolicyTemplate
import { PolicyTemplate } from '@cdklabs/cdk-verified-permissions'
new PolicyTemplate(scope: Construct, id: string, props: PolicyTemplateProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
PolicyTemplateProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: PolicyTemplateProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
public toString(): string
Returns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
- Type: aws-cdk-lib.RemovalPolicy
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
fromFile |
No description. |
fromPolicyTemplateAttributes |
Creates a PolicyTemplate construct that represents an external Policy Template. |
fromPolicyTemplateId |
Create a PolicyTemplate construct that represents an external policy template via policy template id. |
import { PolicyTemplate } from '@cdklabs/cdk-verified-permissions'
PolicyTemplate.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
import { PolicyTemplate } from '@cdklabs/cdk-verified-permissions'
PolicyTemplate.isOwnedResource(construct: IConstruct)
Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { PolicyTemplate } from '@cdklabs/cdk-verified-permissions'
PolicyTemplate.isResource(construct: IConstruct)
Check whether the given construct is a Resource.
- Type: constructs.IConstruct
import { PolicyTemplate } from '@cdklabs/cdk-verified-permissions'
PolicyTemplate.fromFile(scope: Construct, id: string, props: TemplateFromFileProps)
- Type: constructs.Construct
- Type: string
- Type: TemplateFromFileProps
import { PolicyTemplate } from '@cdklabs/cdk-verified-permissions'
PolicyTemplate.fromPolicyTemplateAttributes(scope: Construct, id: string, attrs: PolicyTemplateAttributes)
Creates a PolicyTemplate construct that represents an external Policy Template.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: PolicyTemplateAttributes
A PolicyTemplateAttributes
object.
import { PolicyTemplate } from '@cdklabs/cdk-verified-permissions'
PolicyTemplate.fromPolicyTemplateId(scope: Construct, id: string, policyTemplateId: string)
Create a PolicyTemplate construct that represents an external policy template via policy template id.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: string
The PolicyTemplate's id.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
policyStore |
IPolicyStore |
The Policy store that contains the template. |
policyTemplateId |
string |
The ID of the policy template. |
statement |
string |
The statement of the policy template. |
description |
string |
Description of the policy template. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly policyStore: IPolicyStore;
- Type: IPolicyStore
The Policy store that contains the template.
public readonly policyTemplateId: string;
- Type: string
The ID of the policy template.
public readonly statement: string;
- Type: string
The statement of the policy template.
public readonly description: string;
- Type: string
Description of the policy template.
import { AddPolicyOptions } from '@cdklabs/cdk-verified-permissions'
const addPolicyOptions: AddPolicyOptions = { ... }
Name | Type | Description |
---|---|---|
policyConfiguration |
PolicyDefinitionProperty |
The configuration of the Policy. |
policyId |
string |
The id of the Policy. |
public readonly policyConfiguration: PolicyDefinitionProperty;
- Type: PolicyDefinitionProperty
The configuration of the Policy.
public readonly policyId: string;
- Type: string
The id of the Policy.
import { CognitoGroupConfiguration } from '@cdklabs/cdk-verified-permissions'
const cognitoGroupConfiguration: CognitoGroupConfiguration = { ... }
Name | Type | Description |
---|---|---|
groupEntityType |
string |
The name of the schema entity type that's mapped to the user pool group. |
public readonly groupEntityType: string;
- Type: string
The name of the schema entity type that's mapped to the user pool group.
import { CognitoUserPoolConfiguration } from '@cdklabs/cdk-verified-permissions'
const cognitoUserPoolConfiguration: CognitoUserPoolConfiguration = { ... }
Name | Type | Description |
---|---|---|
userPool |
aws-cdk-lib.aws_cognito.IUserPool |
Cognito User Pool. |
clientIds |
string[] |
Client identifiers. |
groupConfiguration |
CognitoGroupConfiguration |
Cognito Group Configuration. |
public readonly userPool: IUserPool;
- Type: aws-cdk-lib.aws_cognito.IUserPool
- Default: no Cognito User Pool
Cognito User Pool.
public readonly clientIds: string[];
- Type: string[]
- Default: empty list.
Client identifiers.
public readonly groupConfiguration: CognitoGroupConfiguration;
- Type: CognitoGroupConfiguration
- Default: no Cognito Group configuration provided
Cognito Group Configuration.
import { EntityIdentifierProperty } from '@cdklabs/cdk-verified-permissions'
const entityIdentifierProperty: EntityIdentifierProperty = { ... }
Name | Type | Description |
---|---|---|
entityId |
string |
The identifier of an entity. |
entityType |
string |
The type of an entity. |
public readonly entityId: string;
- Type: string
The identifier of an entity.
public readonly entityType: string;
- Type: string
The type of an entity.
import { IdentitySourceAttributes } from '@cdklabs/cdk-verified-permissions'
const identitySourceAttributes: IdentitySourceAttributes = { ... }
Name | Type | Description |
---|---|---|
identitySourceId |
string |
No description. |
public readonly identitySourceId: string;
- Type: string
import { IdentitySourceConfiguration } from '@cdklabs/cdk-verified-permissions'
const identitySourceConfiguration: IdentitySourceConfiguration = { ... }
Name | Type | Description |
---|---|---|
cognitoUserPoolConfiguration |
CognitoUserPoolConfiguration |
Cognito User Pool Configuration. |
openIdConnectConfiguration |
OpenIdConnectConfiguration |
OpenID Connect Idp configuration. |
public readonly cognitoUserPoolConfiguration: CognitoUserPoolConfiguration;
- Type: CognitoUserPoolConfiguration
- Default: no Cognito User Pool Config
Cognito User Pool Configuration.
public readonly openIdConnectConfiguration: OpenIdConnectConfiguration;
- Type: OpenIdConnectConfiguration
- Default: no OpenID Provider config
OpenID Connect Idp configuration.
import { IdentitySourceProps } from '@cdklabs/cdk-verified-permissions'
const identitySourceProps: IdentitySourceProps = { ... }
Name | Type | Description |
---|---|---|
configuration |
IdentitySourceConfiguration |
Identity Source configuration. |
policyStore |
IPolicyStore |
Policy Store in which you want to store this identity source. |
principalEntityType |
string |
Principal entity type. |
public readonly configuration: IdentitySourceConfiguration;
Identity Source configuration.
public readonly policyStore: IPolicyStore;
- Type: IPolicyStore
Policy Store in which you want to store this identity source.
public readonly principalEntityType: string;
- Type: string
- Default: No principal entity type for the identity source.
Principal entity type.
import { OpenIdConnectAccessTokenConfiguration } from '@cdklabs/cdk-verified-permissions'
const openIdConnectAccessTokenConfiguration: OpenIdConnectAccessTokenConfiguration = { ... }
Name | Type | Description |
---|---|---|
audiences |
string[] |
The access token aud claim values that you want to accept in your policy store. |
principalIdClaim |
string |
The claim that determines the principal in OIDC access tokens. |
public readonly audiences: string[];
- Type: string[]
- Default: no audiences
The access token aud claim values that you want to accept in your policy store.
public readonly principalIdClaim: string;
- Type: string
- Default: no principal claim
The claim that determines the principal in OIDC access tokens.
import { OpenIdConnectConfiguration } from '@cdklabs/cdk-verified-permissions'
const openIdConnectConfiguration: OpenIdConnectConfiguration = { ... }
Name | Type | Description |
---|---|---|
issuer |
string |
The issuer URL of an OIDC identity provider. |
accessTokenOnly |
OpenIdConnectAccessTokenConfiguration |
The configuration for processing access tokens from your OIDC identity provider Exactly one between accessTokenOnly and identityTokenOnly must be defined. |
entityIdPrefix |
string |
A descriptive string that you want to prefix to user entities from your OIDC identity provider. |
groupConfiguration |
OpenIdConnectGroupConfiguration |
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. |
identityTokenOnly |
OpenIdConnectIdentityTokenConfiguration |
The configuration for processing identity (ID) tokens from your OIDC identity provider Exactly one between accessTokenOnly and identityTokenOnly must be defined. |
public readonly issuer: string;
- Type: string
The issuer URL of an OIDC identity provider.
This URL must have an OIDC discovery endpoint at the path .well-known/openid-configuration
public readonly accessTokenOnly: OpenIdConnectAccessTokenConfiguration;
- Type: OpenIdConnectAccessTokenConfiguration
- Default: no Access Token Config
The configuration for processing access tokens from your OIDC identity provider Exactly one between accessTokenOnly and identityTokenOnly must be defined.
public readonly entityIdPrefix: string;
- Type: string
- Default: no Entity ID Prefix
A descriptive string that you want to prefix to user entities from your OIDC identity provider.
public readonly groupConfiguration: OpenIdConnectGroupConfiguration;
- Type: OpenIdConnectGroupConfiguration
- Default: no Group Config
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.
public readonly identityTokenOnly: OpenIdConnectIdentityTokenConfiguration;
- Type: OpenIdConnectIdentityTokenConfiguration
- Default: no ID Token Config
The configuration for processing identity (ID) tokens from your OIDC identity provider Exactly one between accessTokenOnly and identityTokenOnly must be defined.
import { OpenIdConnectGroupConfiguration } from '@cdklabs/cdk-verified-permissions'
const openIdConnectGroupConfiguration: OpenIdConnectGroupConfiguration = { ... }
Name | Type | Description |
---|---|---|
groupClaim |
string |
The token claim that you want Verified Permissions to interpret as group membership. |
groupEntityType |
string |
The policy store entity type that you want to map your users' group claim to. |
public readonly groupClaim: string;
- Type: string
The token claim that you want Verified Permissions to interpret as group membership.
public readonly groupEntityType: string;
- Type: string
The policy store entity type that you want to map your users' group claim to.
import { OpenIdConnectIdentityTokenConfiguration } from '@cdklabs/cdk-verified-permissions'
const openIdConnectIdentityTokenConfiguration: OpenIdConnectIdentityTokenConfiguration = { ... }
Name | Type | Description |
---|---|---|
clientIds |
string[] |
The ID token audience, or client ID, claim values that you want to accept in your policy store from an OIDC identity provider. |
principalIdClaim |
string |
The claim that determines the principal in OIDC access tokens. |
public readonly clientIds: string[];
- Type: string[]
- Default: no client IDs
The ID token audience, or client ID, claim values that you want to accept in your policy store from an OIDC identity provider.
public readonly principalIdClaim: string;
- Type: string
- Default: no principal claim
The claim that determines the principal in OIDC access tokens.
import { PolicyAttributes } from '@cdklabs/cdk-verified-permissions'
const policyAttributes: PolicyAttributes = { ... }
Name | Type | Description |
---|---|---|
policyId |
string |
The unique ID of the new or updated policy. |
policyType |
PolicyType |
The type of the policy. |
public readonly policyId: string;
- Type: string
The unique ID of the new or updated policy.
public readonly policyType: PolicyType;
- Type: PolicyType
- Default: Static
The type of the policy.
This is one of the following values: Static or TemplateLinked
import { PolicyDefinitionProperty } from '@cdklabs/cdk-verified-permissions'
const policyDefinitionProperty: PolicyDefinitionProperty = { ... }
Name | Type | Description |
---|---|---|
static |
StaticPolicyDefinitionProperty |
A structure that describes a static policy. |
templateLinked |
TemplateLinkedPolicyDefinitionProperty |
A structure that describes a policy that was instantiated from a template. |
public readonly static: StaticPolicyDefinitionProperty;
- Type: StaticPolicyDefinitionProperty
- Default: Static must be set for policies created from a static definition. Otherwise, use template linked definitions.
A structure that describes a static policy.
public readonly templateLinked: TemplateLinkedPolicyDefinitionProperty;
- Type: TemplateLinkedPolicyDefinitionProperty
- Default: Template linked must be set for policies created from a static definition. Otherwise, use static definitions.
A structure that describes a policy that was instantiated from a template.
import { PolicyProps } from '@cdklabs/cdk-verified-permissions'
const policyProps: PolicyProps = { ... }
Name | Type | Description |
---|---|---|
definition |
PolicyDefinitionProperty |
Specifies the policy type and content to use for the new or updated policy. |
policyStore |
IPolicyStore |
The policy store that contains the policy. |
public readonly definition: PolicyDefinitionProperty;
- Type: PolicyDefinitionProperty
Specifies the policy type and content to use for the new or updated policy.
The definition structure must include either a Static or a TemplateLinked element.
public readonly policyStore: IPolicyStore;
- Type: IPolicyStore
The policy store that contains the policy.
import { PolicyStoreAttributes } from '@cdklabs/cdk-verified-permissions'
const policyStoreAttributes: PolicyStoreAttributes = { ... }
Name | Type | Description |
---|---|---|
policyStoreArn |
string |
The ARN of the Amazon Verified Permissions Policy Store. |
policyStoreId |
string |
The id of the Amazon Verified Permissions PolicyStore. |
public readonly policyStoreArn: string;
- Type: string
- Default: no PolicyStore arn
The ARN of the Amazon Verified Permissions Policy Store.
One of this, or policyStoreId
, is required.
public readonly policyStoreId: string;
- Type: string
- Default: no PolicyStore id
The id of the Amazon Verified Permissions PolicyStore.
One of this, or policyStoreArn
, is required.
import { PolicyStoreProps } from '@cdklabs/cdk-verified-permissions'
const policyStoreProps: PolicyStoreProps = { ... }
Name | Type | Description |
---|---|---|
validationSettings |
ValidationSettings |
The policy store's validation settings. |
description |
string |
The policy store's description. |
schema |
Schema |
This attribute is not required from an API point of view. |
public readonly validationSettings: ValidationSettings;
- Type: ValidationSettings
- Default: If not provided, the Policy store will be created with ValidationSettingsMode = "OFF"
The policy store's validation settings.
public readonly description: string;
- Type: string
- Default: No description.
The policy store's description.
public readonly schema: Schema;
- Type: Schema
- Default: No schema.
This attribute is not required from an API point of view.
It represents the schema (in Cedar) to be applied to the PolicyStore.
import { PolicyTemplateAttributes } from '@cdklabs/cdk-verified-permissions'
const policyTemplateAttributes: PolicyTemplateAttributes = { ... }
Name | Type | Description |
---|---|---|
policyTemplateId |
string |
The id of the Amazon Verified Permissions PolicyTemplate. |
public readonly policyTemplateId: string;
- Type: string
The id of the Amazon Verified Permissions PolicyTemplate.
import { PolicyTemplateProps } from '@cdklabs/cdk-verified-permissions'
const policyTemplateProps: PolicyTemplateProps = { ... }
Name | Type | Description |
---|---|---|
policyStore |
IPolicyStore |
The policy store that contains the template. |
statement |
string |
Specifies the content that you want to use for the new policy template, written in the Cedar policy language. |
description |
string |
The description to attach to the new or updated policy template. |
public readonly policyStore: IPolicyStore;
- Type: IPolicyStore
- Default: The policy store to attach the new or updated policy template.
The policy store that contains the template.
public readonly statement: string;
- Type: string
- Default: The statement to attach to the new or updated policy template.
Specifies the content that you want to use for the new policy template, written in the Cedar policy language.
public readonly description: string;
- Type: string
- Default: No description.
The description to attach to the new or updated policy template.
import { Schema } from '@cdklabs/cdk-verified-permissions'
const schema: Schema = { ... }
Name | Type | Description |
---|---|---|
cedarJson |
string |
No description. |
public readonly cedarJson: string;
- Type: string
import { StaticPolicyDefinitionProperty } from '@cdklabs/cdk-verified-permissions'
const staticPolicyDefinitionProperty: StaticPolicyDefinitionProperty = { ... }
Name | Type | Description |
---|---|---|
statement |
string |
The policy content of the static policy, written in the Cedar policy language. |
description |
string |
The description of the static policy. |
public readonly statement: string;
- Type: string
The policy content of the static policy, written in the Cedar policy language.
You can specify a description of the policy directly inside the policy statement, using the Cedar annotation '@cdkDescription'
public readonly description: string;
- Type: string
- Default: Empty description.
The description of the static policy.
If this is set, it has always precedence over description defined in policy statement through '@cdkDescription' annotation
import { StaticPolicyFromFileProps } from '@cdklabs/cdk-verified-permissions'
const staticPolicyFromFileProps: StaticPolicyFromFileProps = { ... }
Name | Type | Description |
---|---|---|
path |
string |
The path to the file to be read which contains a single cedar statement representing a policy. |
policyStore |
IPolicyStore |
The policy store that the policy will be created under. |
description |
string |
The description of the static policy. |
public readonly path: string;
- Type: string
The path to the file to be read which contains a single cedar statement representing a policy.
public readonly policyStore: IPolicyStore;
- Type: IPolicyStore
The policy store that the policy will be created under.
public readonly description: string;
- Type: string
The description of the static policy.
import { TemplateFromFileProps } from '@cdklabs/cdk-verified-permissions'
const templateFromFileProps: TemplateFromFileProps = { ... }
Name | Type | Description |
---|---|---|
path |
string |
The path to the file to be read which contains a single cedar statement representing a policy template. |
policyStore |
IPolicyStore |
The policy store that the policy template will be created under. |
description |
string |
The description of the plicy template. |
public readonly path: string;
- Type: string
The path to the file to be read which contains a single cedar statement representing a policy template.
public readonly policyStore: IPolicyStore;
- Type: IPolicyStore
The policy store that the policy template will be created under.
public readonly description: string;
- Type: string
The description of the plicy template.
import { TemplateLinkedPolicyDefinitionProperty } from '@cdklabs/cdk-verified-permissions'
const templateLinkedPolicyDefinitionProperty: TemplateLinkedPolicyDefinitionProperty = { ... }
Name | Type | Description |
---|---|---|
policyTemplate |
IPolicyTemplate |
The unique identifier of the policy template used to create this policy. |
principal |
EntityIdentifierProperty |
The principal associated with this template-linked policy. |
resource |
EntityIdentifierProperty |
The resource associated with this template-linked policy. |
public readonly policyTemplate: IPolicyTemplate;
- Type: IPolicyTemplate
The unique identifier of the policy template used to create this policy.
public readonly principal: EntityIdentifierProperty;
- Type: EntityIdentifierProperty
- Default: No Principal. It is set to unspecified.
The principal associated with this template-linked policy.
public readonly resource: EntityIdentifierProperty;
- Type: EntityIdentifierProperty
- Default: No Resource. It is set to unspecified.
The resource associated with this template-linked policy.
import { ValidationSettings } from '@cdklabs/cdk-verified-permissions'
const validationSettings: ValidationSettings = { ... }
Name | Type | Description |
---|---|---|
mode |
ValidationSettingsMode |
No description. |
public readonly mode: ValidationSettingsMode;
- Type: ValidationSettingsMode
-
Extends: aws-cdk-lib.IResource
-
Implemented By: IdentitySource, IIdentitySource
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
identitySourceId |
string |
Identity Source identifier. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly identitySourceId: string;
- Type: string
Identity Source identifier.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
policyId |
string |
The unique ID of the new or updated policy. |
policyType |
PolicyType |
The type of the policy. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly policyId: string;
- Type: string
The unique ID of the new or updated policy.
public readonly policyType: PolicyType;
- Type: PolicyType
The type of the policy.
This is one of the following values: Static or TemplateLinked.
-
Extends: aws-cdk-lib.IResource
-
Implemented By: PolicyStore, IPolicyStore
Name | Description |
---|---|
grant |
Adds an IAM policy statement associated with this policy store to an IAM principal's policy. |
grantAuth |
Permits an IAM principal all auth operations on the policy store: IsAuthorized, IsAuthorizedWithToken. |
grantRead |
Permits an IAM principal all read operations on the policy store: GetIdentitySource, GetPolicy, GetPolicyStore, GetPolicyTemplate, GetSchema, ListIdentitySources, ListPolicies, ListPolicyTemplates. |
grantWrite |
Permits an IAM principal all write & read operations on the policy store: CreateIdentitySource, CreatePolicy,CreatePolicyTemplate, DeleteIdentitySource, DeletePolicy, DeletePolicyTemplate, PutSchema, UpdateIdentitySource, UpdatePolicy, UpdatePolicyTemplate. |
public grant(grantee: IGrantable, actions: ...string[]): Grant
Adds an IAM policy statement associated with this policy store to an IAM principal's policy.
- Type: aws-cdk-lib.aws_iam.IGrantable
The principal (no-op if undefined).
- Type: ...string[]
The set of actions to allow (i.e. "verifiedpermissions:IsAuthorized", "verifiedpermissions:ListPolicies", ...).
public grantAuth(grantee: IGrantable): Grant
Permits an IAM principal all auth operations on the policy store: IsAuthorized, IsAuthorizedWithToken.
- Type: aws-cdk-lib.aws_iam.IGrantable
public grantRead(grantee: IGrantable): Grant
Permits an IAM principal all read operations on the policy store: GetIdentitySource, GetPolicy, GetPolicyStore, GetPolicyTemplate, GetSchema, ListIdentitySources, ListPolicies, ListPolicyTemplates.
- Type: aws-cdk-lib.aws_iam.IGrantable
public grantWrite(grantee: IGrantable): Grant
Permits an IAM principal all write & read operations on the policy store: CreateIdentitySource, CreatePolicy,CreatePolicyTemplate, DeleteIdentitySource, DeletePolicy, DeletePolicyTemplate, PutSchema, UpdateIdentitySource, UpdatePolicy, UpdatePolicyTemplate.
- Type: aws-cdk-lib.aws_iam.IGrantable
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
policyStoreArn |
string |
ARN of the Policy Store. |
policyStoreId |
string |
ID of the Policy Store. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly policyStoreArn: string;
- Type: string
ARN of the Policy Store.
public readonly policyStoreId: string;
- Type: string
ID of the Policy Store.
-
Extends: aws-cdk-lib.IResource
-
Implemented By: PolicyTemplate, IPolicyTemplate
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
policyTemplateId |
string |
The ID of the policy template. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly policyTemplateId: string;
- Type: string
The ID of the policy template.
PolicyType options.
Name | Description |
---|---|
STATIC |
No description. |
TEMPLATELINKED |
No description. |
Validation Settings mode, according to the Cloudformation PolicyStore resource.
Name | Description |
---|---|
OFF |
No description. |
STRICT |
No description. |