-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(aws-lambda): aws lambda service cache by service related fields (#…
…11805) Cache the aws lambda service by composing a cache key using the service related fields, so that service object can be reused between plugins and vault refresh can take effect when key/secret is rotated * fix(aws-lambda): aws lambda service cache by service related fields * tests(aws-lambda): add test for checking service cache refresh when vault rotates * style(*): lint Fix KAG-2832
- Loading branch information
Showing
5 changed files
with
159 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
message: Cache the AWS lambda service by those lambda service related fields | ||
type: bugfix | ||
scope: Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
local utils = require "kong.tools.utils" | ||
|
||
local function get(conf, resource, version) | ||
-- Return a random string every time | ||
kong.log.err("get() called") | ||
return utils.random_string() | ||
end | ||
|
||
|
||
return { | ||
VERSION = "1.0.0", | ||
get = get, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
local typedefs = require "kong.db.schema.typedefs" | ||
|
||
return { | ||
name = "random", | ||
fields = { | ||
{ | ||
config = { | ||
type = "record", | ||
fields = { | ||
{ prefix = { type = "string" } }, | ||
{ suffix = { type = "string" } }, | ||
{ ttl = typedefs.ttl }, | ||
{ neg_ttl = typedefs.ttl }, | ||
{ resurrect_ttl = typedefs.ttl }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |