kong-plugin-backend-token-creation
‼️ This code is just an example on how custom plugins are developed.
This is not supported by Kong or meant to be used in any production environment. ‼️
- clone this repository
- execute the following command to create a config map
kubectl create configmap backend-token --from-file=./github/kong-plugin-backend-token-creation/kong/plugins/backend-token-creation -n kong-enterprise
- in the values.yaml of the Kong Gateway data plane add:
env:
plugins: backend-token-creation
plugins:
configMaps:
- name: bbackend-token-creation
pluginName: backend-token-creation
- add custom plugin to Konnect control plane
-
Select Plugins and New Plugin
Button
-
select Custom Plugins
and create
![Kong - Plugin Alt text](images/custom-plugin.png?raw=true)
-
select the schema.lua
file and click save
![Kong - Plugin Alt text](images/create-custom-plugin.png?raw=true)
- now the plugin is available in this control plane.
- Select the route or service where you want to add the plugin
- Configure the plugin with
- Token URL of the token endpoint
- Client ID
- Client Secret and if needed
- Scope(s)
- Credentials send in Auth header or body
![Kong - Plugin Alt text](images/configure-plugin.png?raw=true)