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

[aws-appsync] HttpDataSource should extends BackedDataSource instead of BaseDataSource #11183

Closed
cm-wada-yusuke opened this issue Oct 29, 2020 · 1 comment · Fixed by #11185
Closed
Assignees
Labels
@aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p2

Comments

@cm-wada-yusuke
Copy link
Contributor

HttpDataSource should extends BackedDataSource instead of BaseDataSource to grant.

Reproduction Steps

Document code reproduce "access denied" when call step functions api via HttpDataSource.

    const helloMachine = sfn.StateMachine.fromStateMachineArn(
        stack,
        'HelloMachine',
        'arn:aws:states:ap-northeast-1:1233445556:stateMachine:Helloworld',
    );

    const stepFunctionsDatasource = graphApi.addHttpDataSource(
        'StepFunctions',
        'https://states.ap-northeast-1.amazonaws.com',
        {
            name: 'StepFunctionsDataSource',
            authorizationConfig: {
                signingRegion: 'ap-northeast-1',
                signingServiceName: 'states',
            },
        },
    );

    // can't grant so access denied.
    // helloMachine.grantRead(stepFunctionsDatasource);

image

Solution

HttpDataSource extends BackedDataSource solved this problem on my machine.

Environment

  • CLI Version :1.70.0
  • Framework Version:1.70.0
  • Node.js Version:v12.18.2
  • OS :macOS Catalina 10.15.7
  • Language (Version):TypeScript

This is 🐛 Bug Report

@cm-wada-yusuke cm-wada-yusuke added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 29, 2020
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label Oct 29, 2020
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Nov 2, 2020
@MrArnoldPalmer MrArnoldPalmer added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Nov 10, 2020
@mergify mergify bot closed this as completed in #11185 Nov 10, 2020
mergify bot pushed a commit that referenced this issue Nov 10, 2020
…DataSource (#11185)

BackedDataSource make Grantable HttpDataSource.  I think this pr allows better use of the iam config: #10171

fixes #11183
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p2
Projects
None yet
3 participants