<p>I have this KongPlugin on Kubernetes</p>
<pre><code>apiVersion: configuration.konghq.com/v1
kind: KongPlugin
config: 
  remove:
    headers:
    - Authorization
  append:
    headers:
    - Authorization:Basic &lt;SECRET&gt;
plugin: request-transformer
</code></pre>
<p>Is it possible to move the header Authorization to a Kubernetes secret?</p>

<p>if you are using the <strong>request-transformer</strong> Enterprise version you can do it.</p>
<blockquote>
<p>config.append.headers optional</p>
<p>Type: array of string elements     List of headername:value pairs. If the
header is not set, set it with the given value. If it is already set,
a new header with the same name and the new value will be set.</p>
</blockquote>
<blockquote>
<p>This field is referenceable, which means it can be securely stored as
a secret in a vault. References must follow a specific format.</p>
</blockquote>
<p>Ref : <a href="https://docs.konghq.com/hub/kong-inc/request-transformer-advanced/" rel="nofollow noreferrer">https://docs.konghq.com/hub/kong-inc/request-transformer-advanced/</a></p>
<p>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.</p>
<p>Here is example code which append the headers : <a href="https://github.com/Kong/kong-plugin-request-transformer/blob/master/kong/plugins/request-transformer/access.lua#L228" rel="nofollow noreferrer">https://github.com/Kong/kong-plugin-request-transformer/blob/master/kong/plugins/request-transformer/access.lua#L228</a></p>
<p>You can read article do build custom docker image with plugin code : <a href="https://faun.pub/building-kong-custom-docker-image-add-a-customized-kong-plugin-2157a381d7fd" rel="nofollow noreferrer">https://faun.pub/building-kong-custom-docker-image-add-a-customized-kong-plugin-2157a381d7fd</a></p>
