#Defining plugin configuration - Record with a secret field

5 messages · Page 1 of 1 (latest)

gusty laurel
#

Using the documentation, I defined configuration for my plugin.
Here is the config.d.ts

export interface Config {
  /**
   * The configuration parameters for the Catalog Insights backend
   */
  catalogInsights: {
    /**
     * The configuration parameters for Kubernetes
     */
    k8s: Record<
      string,
      {
        /**
         * The service account token
         * @visibility secret
         */
        token: string;
        /**
         * The API endpoint of the target Kubernetes cluster
         */
        api: string;
      }
    >;
  };
}

The token is not treated as a secret. How do I fix this?

This became obvious to me after trying @backstage/plugin-devtools; I do not believe the problem is with this plugin.

Documentation: https://backstage.io/docs/conf/defining
DevTools plugin: https://github.com/backstage/backstage/tree/master/plugins/devtools

#

Defining plugin configuration - Record with a secret field

sick sequoia
#

Hi @gusty laurel, hope as is well with you? Haven't seen you around here for a bit!

Anyway, I've found that objects or special types don't always play nice with this. You could try putting the @visibility secret up on the k8s part. But I'm not sure if that would work either to be honest.

The other option might be the work being done in this PR: https://github.com/backstage/backstage/pull/18187

Sorry, this isn't working for you, this tab in the DevTools has been a gift and a curse as we've run into a lot of these issues 😦

gusty laurel
#

All is well @sick sequoia , hope the same for you. I've been in-and-out for PTO as well as some priority shifts for my team. Good to be back.

Although moving the @visibility secret to the k8s part was a good idea, that didn't work either.

sick sequoia
#

Yeah, things are good with me just busy. Alright, that was my only idea for now. If something else comes to me I'll post here