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

(apigateway.RequestAuthorizer): (Removing Cache TTL does not reset to default value of 300s) #27826

Closed
bpauwels opened this issue Nov 3, 2023 · 2 comments · Fixed by #27873
Closed
Labels
@aws-cdk/aws-apigateway Related to Amazon API Gateway bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@bpauwels
Copy link

bpauwels commented Nov 3, 2023

Describe the bug

If you create a custom authorizer and set resultsCacheTtl to any value other then 300s, then later remove the property, I would expect it to reset to the default of 300s. Instead, it remains at the latest set value.

Expected Behavior

TTL is reset to the default value of 300s

Current Behavior

TTL remains at the previously set value

Reproduction Steps

Reproduction Steps:

const authorizer = new RequestAuthorizer(this, "LambdaAuthorizer", {
      handler: authorizerHandler,
      resultsCacheTtl: cdk.Duration.seconds(301),
      identitySources: [
        IdentitySource.header("someheader"),
      ],
    });

Deploy this, then change it to

const authorizer = new RequestAuthorizer(this, "LambdaAuthorizer", {
      handler: authorizerHandler,
      identitySources: [
        IdentitySource.header("someheader"),
      ],
    });

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.96.2

Framework Version

No response

Node.js Version

16.19.1

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

No response

@bpauwels bpauwels added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 3, 2023
@github-actions github-actions bot added the @aws-cdk/aws-apigateway Related to Amazon API Gateway label Nov 3, 2023
lpizzinidev added a commit to lpizzinidev/aws-cdk that referenced this issue Nov 7, 2023
@pahud
Copy link
Contributor

pahud commented Nov 10, 2023

Thank you for the report. I have seen an open PR for this issue. We'll review the PR when it's ready.

@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 Nov 10, 2023
vinayak-kukreja added a commit to lpizzinidev/aws-cdk that referenced this issue Nov 20, 2023
sumupitchayan added a commit to lpizzinidev/aws-cdk that referenced this issue Nov 20, 2023
@mergify mergify bot closed this as completed in #27873 Nov 20, 2023
mergify bot pushed a commit that referenced this issue Nov 20, 2023
…#27873)

Adds default `authorizerResultTtlInSeconds` value of 300 seconds to prevent cache TTL value retention when first specified and then removed.

Closes #27826.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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-apigateway Related to Amazon API Gateway bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants