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

RestApi: support modifying api key source to ApiKeySourceType.AUTHORIZER #29309

Closed
2 tasks
mbenita-Cyberark opened this issue Feb 29, 2024 · 4 comments
Closed
2 tasks
Labels
@aws-cdk/aws-lambda Related to AWS Lambda effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@mbenita-Cyberark
Copy link

mbenita-Cyberark commented Feb 29, 2024

Describe the feature

Currently RestApi construct does not support adjusting the ApiKeySourceType property.
This is supported via the RestApiProps in other RestApi constructs such as LambdaRestApi via the props settings.
In the console this feature is available inside API Settings -> API key source.

Please add this functionality in some way.
Thanks

image

Use Case

We work with api gateway usage-plan. the api-key is extracted by the lambda authorizer.
Currently we had to build a custom resource to implement this.

Thanks very much

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.129.0

Environment details (OS name and version, etc.)

Python cdk

@mbenita-Cyberark mbenita-Cyberark added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 29, 2024
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Feb 29, 2024
@pahud
Copy link
Contributor

pahud commented Feb 29, 2024

Thank you for the feat request and we welcome the pull requests from the community.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 29, 2024
@nmussy
Copy link
Contributor

nmussy commented Mar 6, 2024

I'm not sure I understand the issue, RestApiProps does have the apiKeySourceType property, and it is deployed properly:

import { ApiKeySourceType, RestApi } from "aws-cdk-lib/aws-apigateway";

const restApi = new RestApi(this, 'RestApi', {
  apiKeySourceType: ApiKeySourceType.AUTHORIZER,
});
restApi.root.addMethod("ANY");

image
image

@mbenita-Cyberark
Copy link
Author

mbenita-Cyberark commented Mar 18, 2024

Sorry for not seeing this earlier. and thanks for the help

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-lambda Related to AWS Lambda effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants