Allow plugin developers to add custom kong commands #14666
roskh
started this conversation in
Ideas and feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be useful for plugin developers to have a way to inject their own custom commands.
In our use-case we developed a custom plugin for fetching a JWKS from a remote URL, which we then use to validate externally issued JWTs.
For this use-case we want to have a command like
verify_jwks
to ensure that a URL is reachable by a running kong instance.We've managed to monkey-patch the command (probably not ideal).
Example Dockerfile:
It then allows us to invoke the command like so:
kong verify_jwks https://token.actions.githubusercontent.com/.well-known/jwks # exits with 0 or 1 depending on validation success
Following this strategy we've run into some issues with initialising the Kong context/configuration, namely to have our custom command pick up these directives:
for the rest http client
Any suggestions where to look would be greatly appreciated, even if all this is very hacky.
PS: let us know if you'd like us to upstream our work on JWKs fetching/validation into the jwt plugin
Beta Was this translation helpful? Give feedback.
All reactions