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


Argo CD hides sensitive annotation values on Secret resources from the Argo CD user interface (UI) and command-line interface (CLI). Users can configure this by specifying annotation keys to be masked in the Argo CD custom resource (CR). This feature enhances security by preventing accidental exposure of sensitive information, such as tokens or API keys, stored in annotations on Secret resources.

To enable this feature, add the resource.sensitive.mask.annotations key under .spec.extraConfig in the Argo CD CR. Specify a comma-separated list of annotation keys to mask.

Important

Ensure that the annotation keys listed in resource.sensitive.mask.annotations are accurate and relevant to your use case. This feature does not support wildcards and requires explicit configuration in the Argo CD CR.

Prerequisites

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

To enable sensitive annotations masking in the Argo CD user interface (UI), you can add the annotation key, resource.sensitive.mask.annotations, 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 edit the Argo CD CR, complete the following steps:

    1. Under the .spec.extraConfig section, add the resource.sensitive.mask.annotations key.
    2. To mask a comma-separated list of values, specify the annotation key in the following YAML snippet:

      apiVersion: argoproj.io/v1beta1
      kind: ArgoCD
      metadata:
        name: example
      spec:
        extraConfig:
          resource.sensitive.mask.annotations: openshift.io/token-secret.value, api-key, token 
      1
      Copy to Clipboard Toggle word wrap
      1
      Specify a comma-separated list of sensitive annotation values, such as openshift.io/token-secret.value, api-key, and token.
  6. 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.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

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

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

Theme

© 2025 Red Hat