Chapter 3. Masking sensitive annotations in the Argo CD web UI


Prevent accidental exposure of sensitive information by masking annotation values in the Argo CD web UI. Configure which annotation keys to hide by adding them to the Argo CD custom resource (CR). This enhances security for sensitive data, such as tokens or API keys, stored in annotations on Secret resources.

OpenShift Container Platform automatically masks the openshift.io/token-secret.value annotation key by default. OpenShift Container Platform adds this annotation to secrets of type kubernetes.io/dockercfg, and it contains a service account token that requires protection. You can extend the default list with additional annotation keys as needed.

3.1. Prerequisites

  • You have created an Argo CD instance. For more information, see "Installing a user-defined Argo CD instance".

Configure the Argo CD web UI to hide sensitive values in annotations on Secret resources by specifying the annotation keys to mask in the Argo CD custom resource (CR).

Procedure

  1. Log in to the OpenShift Container Platform web console.
  2. In the Administrator perspective of the web console, click Operators Installed Operators.
  3. From the Project list, create or select the project where you want to install the user-defined Argo CD instance.
  4. From the installed Operators list, select Red Hat OpenShift GitOps, and then click the Argo CD tab.
  5. To mask additional annotation keys beyond the default, complete the following steps:

    1. Under the .spec.extraConfig section, set the resource.sensitive.mask.annotations key to a comma-separated list that includes any additional keys you want to mask.

      Note

      OpenShift Container Platform automatically masks openshift.io/token-secret.value by default. If you set resource.sensitive.mask.annotations explicitly in spec.extraConfig, your value replaces the default. To keep the default protection and add more keys, include openshift.io/token-secret.value in your list.

      apiVersion: argoproj.io/v1beta1
      kind: ArgoCD
      metadata:
        name: example
      spec:
        extraConfig:
          resource.sensitive.mask.annotations: openshift.io/token-secret.value, api-key, token

      where:

      spec.extraConfig.resource.sensitive.mask.annotations
      Specifies a comma-separated list of annotation keys to mask in the Argo CD web UI, such as openshift.io/token-secret.value, api-key, and token. OpenShift Container Platform automatically masks openshift.io/token-secret.value by default, so you do not need to specify it unless you add it alongside other keys.
      Important

      Ensure that the annotation keys listed in resource.sensitive.mask.annotations are accurate and relevant to your use case. Wildcards are not supported. Specify each annotation key explicitly.

  6. Click Save.
  7. To verify that the value in the Argo CD resource has been updated successfully, complete the following steps:

    1. In the Administrator perspective of the web console, click Operators Installed Operators.
    2. In the Project option, select the Argo CD namespace.
    3. From the installed Operators list, select Red Hat OpenShift GitOps, and then click the Argo CD tab.
    4. Verify that the Status field of the ArgoCD instance shows as Phase: Available.

      Argo CD hides the values of the specified annotation keys in the Argo CD UI.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top