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

apigateway managment apis failing due to no resourceMethods #44

@lorienpatt

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions