This file contains hidden or 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
| return { | |
| name = "jwe-decrypt", | |
| fields = { | |
| { consumer = typedefs.no_consumer }, | |
| { config = { | |
| type = "record", | |
| fields = { | |
| { lookup_header_name = { | |
| type = "string", | |
| required = true, |
This file contains hidden or 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
| return { | |
| name = "keys", | |
| dao = "kong.db.dao.keys", | |
| primary_key = { "id" }, | |
| cache_key = { "kid", "set" }, | |
| endpoint_key = "name", | |
| workspaceable = true, | |
| ttl = true, | |
| fields = { | |
| { |
This file contains hidden or 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
| [kong-ee-a64e24952:/kong]# http :8001/jwk-sets name=test jwks:='[{"kid": "123"}, {"kid": "567"}]' | |
| {{ | |
| "consumer": null, | |
| "created_at": 1666961701, | |
| "id": "3d37569b-c4db-410e-a7e3-7fba93c4cba4", | |
| "jwk_ttl": null, | |
| "jwks": [ | |
| { | |
| "alg": null, |
This file contains hidden or 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
| { | |
| name = "jwks", | |
| dao = "kong.plugins.jwks.daos.jwks", | |
| primary_key = { "id" }, | |
| cache_key = { "kid", "set" }, | |
| endpoint_key = "name", | |
| ttl = true, | |
| fields = { | |
| { | |
| id = typedefs.uuid, |
This file contains hidden or 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
| { | |
| name = "jwk_sets", | |
| dao = "kong.plugins.jwks.daos.jwk_sets", | |
| primary_key = { "id" }, | |
| cache_key = { "name" }, | |
| endpoint_key = "name", | |
| admin_api_name = "jwk-sets", | |
| ttl = true, | |
| fields = { | |
| { |
This file contains hidden or 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
| -- in a it/describe block you can do this to simulate a side-effect | |
| -- similar to python-unittest's side_effect https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.side_effect | |
| local called = false | |
| local side_effect = function() | |
| -- adding a side_effect that causes to fail the `request_uri` the first time | |
| -- but succeed the second time. | |
| if not called then | |
| called = true | |
| return false, "err" |
This file contains hidden or 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
| # add this to ~/.bashrc | ~/.zshrc | |
| # put this in ~/.tmux.conf | |
| # bind-key W run "tmux split-window -v 'bash -ci ftpane'" | |
| # to enable it | |
| # This does a couple of things | |
| # mod+W opens a tmux split window with a list of existing windows | |
| # selecting an existing one will bring you there. If the window does | |
| # not exist it will create one with the provided name and switch to it |
This file contains hidden or 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
| import json | |
| import pprint | |
| import time | |
| import yaml | |
| from typing import * | |
| def _load_inventory_struct(): | |
| with open('inventory_schema.yaml', 'rb') as _fd: | |
| return yaml.safe_load(_fd) |
This file contains hidden or 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
| import json | |
| import pprint | |
| import time | |
| import yaml | |
| from typing import * | |
| def _load_inventory_struct(): | |
| with open('inventory_schema.yaml', 'rb') as _fd: | |
| return yaml.safe_load(_fd) |
This file contains hidden or 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
| specs: | |
| - spec: | |
| # service_name, service_type | |
| key1: val | |
| key3: val | |
| # random k-v pairs on a spec level (created_at) would be a candidate | |
| key1: val | |
| # versioning | |
| version: 1 |
NewerOlder