Skip to content

Cache invalidation authorization in API gateway stage through CloudFormation #788

@sensriza

Description

@sensriza

Hi ,

So I used the template attached below testapiauth.json for testing.
Whenever, the "CacheClusterEnabled" property of AWS::ApiGateway::Stage is set to "true", the cache is enabled in Stage as seen from the API G/w console,
but none of the properties defined under MethodSettings get reflected in the API gateway console, but the Stage resource is marked as completed successfully by CFN. Could anyone confirm if this is a bug.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-stage-methodsetting.html

Moreover, the resource marked in the screenshot attached can also not be directly specified by CFN as of now. Therefore,Cx has to manually go and uncheck the Require Authorization from the api g/w console.

With the test template, that was used, I performed a couple of tests on PostMan to see if the same warning was received in the response headers. Indeed warnings were received because by default if Require Authorization is set to enabled in Per Key Cache Invalidation, then the handling of unauthorized requests is set as "Ignore and set warning".

I have also tested for Serverless using the doc https://github.com/awslabs/serverless-application-model/blob/master/version... , but there too, did not find way to enable/disable require authorization on cache invalidation. I have attached the test template by the name of serverlesstestapiauth.yml

testapiauth.json.pdf
serverlesstestapiauth.yml.pdf
screen shot 2019-01-28 at 2 32 02 pm

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