Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

apigateway managment apis failing due to no resourceMethods #44

Open
lorienpatt opened this issue Jul 12, 2022 · 0 comments
Open

apigateway managment apis failing due to no resourceMethods #44

lorienpatt opened this issue Jul 12, 2022 · 0 comments

Comments

@lorienpatt
Copy link

lorienpatt commented Jul 12, 2022

When using a policy to access apigateway managment apis, we recieve an error when we are accessing resources that are outside of a specific api (apikeys, usageplan). These resources have no resourceMethods in them, because they are not associated with any specific api that contains resourceMethods.
https://github.com/Skyscanner/LambdaGuard/blob/master/lambdaguard/security/Public.py
The above class is posting an error when we are trying to use these resources, when it should really just return if self.item.resources is empty, unless you have some other reason it should fail?
https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonapigatewaymanagement.html#amazonapigatewaymanagement
Using these resources the lambda is failing, as these resources are outside of a specific api in apigateway service.

  • arn:${Partition}:apigateway:${Region}::/usageplans/${UsagePlanId}/keys
  • arn:${Partition}:apigateway:${Region}::/apikeys
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant