Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamodb: Table.grantStreamRead doesn't grant ListStreams #4996

Closed
chillitom opened this issue Nov 13, 2019 · 0 comments · Fixed by #5074
Closed

dynamodb: Table.grantStreamRead doesn't grant ListStreams #4996

chillitom opened this issue Nov 13, 2019 · 0 comments · Fixed by #5074
Assignees
Labels
@aws-cdk/aws-dynamodb Related to Amazon DynamoDB bug This issue is a bug. in-progress This issue is being actively worked on.

Comments

@chillitom
Copy link
Contributor

chillitom commented Nov 13, 2019

grantStreamRead documentation says that it will grant ListStreams but in practice it only grants dynamodb:GetShardIterator, dynamodb:DescribeStream,dynamodb:GetRecords.

Not sure whether it's the documentation or implementation at fault but they seem inconsistent.

Reproduction Steps

        const authenticatedRole = new iam.Role(this, 'CognitoDefaultAuthenticatedRole', {
            assumedBy: new iam.FederatedPrincipal('cognito-identity.amazonaws.com', {
                'StringEquals': { 'cognito-identity.amazonaws.com:aud': identityPool.ref },
                'ForAnyValue:StringLike': { 'cognito-identity.amazonaws.com:amr': 'authenticated' },
            }, 'sts:AssumeRoleWithWebIdentity'),
        })

        const table = new dynamodb.Table(this, 'table', {
            partitionKey: {
                name: 'id',
                type: dynamodb.AttributeType.STRING,
            },
            tableName: 'table',
            stream: dynamodb.StreamViewType.NEW_IMAGE,
        })
        table .grantReadData(authenticatedRole)
        table .grantStreamRead(authenticatedRole)

Environment

  • CDK 1.15.0
  • Typescript
@chillitom chillitom added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 13, 2019
@skinny85 skinny85 self-assigned this Nov 13, 2019
@skinny85 skinny85 added @aws-cdk/aws-dynamodb Related to Amazon DynamoDB and removed needs-triage This issue or PR still needs to be triaged. labels Nov 13, 2019
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Nov 18, 2019
@mergify mergify bot closed this as completed in #5074 Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-dynamodb Related to Amazon DynamoDB bug This issue is a bug. in-progress This issue is being actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants