How to config sentitive field in KongPlugin?

We are running Kong on k8s with some custom plugins.
One of them has one sensitive field that needs to hide. The configuration is following:

 apiVersion: configuration.konghq.com/v1
 kind: KongPlugin
 metadata:
   name: my-service-custom-plugin
 config:
   service_secret_key: "need_to_hide_this_value"
 plugin: my-custom-plugin

Can I use Kubernetes secret to apply in this case?, like below:

 apiVersion: configuration.konghq.com/v1
 kind: KongPlugin
 metadata:
   name: my-serivce-custom-plugin
 config:
   service_secret_key:
     valueFrom:
       secretKeyRef:
         key: secret_key
         name: custom-plugin-secret
 plugin: my-custom-plugin

Or anyone knows some ways, please help me. Thank you so much?

Work is underway to handle this: we’re adding the ability to use a secret reference for plugin configuration rather than providing it directly in the KongPlugin, although it’s for the entire config rather than individual items.

1 Like

Could you share about the release time for that, @traines?

I don’t have a specific timeline, but it is scheduled for the next minor release (0.9).

1 Like

It is good for waiting. And thank you for your reply!