I have this KongPlugin on Kubernetes
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
config:
remove:
headers:
- Authorization
append:
headers:
- Authorization:Basic <SECRET>
plugin: request-transformer
Is it possible to move the header Authorization to a Kubernetes secret?
if you are using the request-transformer Enterprise version you can do it.
Ref : https://docs.konghq.com/hub/kong-inc/request-transformer-advanced/
There is no direct way as much i have tried if not exterprise version, but you can update or write the plugin code and create the docker image and run it.
Here is example code which append the headers : https://github.com/Kong/kong-plugin-request-transformer/blob/master/kong/plugins/request-transformer/access.lua#L228
You can read article do build custom docker image with plugin code : https://faun.pub/building-kong-custom-docker-image-add-a-customized-kong-plugin-2157a381d7fd