Skip to main content

Agent Federation

Without agent federation, the agent manifests carry a long-lived token for your Argo CD instance. Anyone who copies it from the cluster, a backup or a leaked manifest can use it from anywhere, until the credentials are rotated, to:

  • Read the repository credentials stored in the instance.

  • Sync the cluster's applications.

  • On a cluster running privileged components such as the ApplicationSet controller, create, change and delete Applications and ApplicationSets, for example to point an application at another repository.

With agent federation, the agent uses short-lived service account tokens issued by its own cluster instead. The Akuity Platform verifies them against the cluster's OIDC issuer and accepts them only for the agent's service accounts.

info

Agent federation is enabled per organization. Contact Akuity Support to enable it.

Requirements​

  • Akuity Agent 0.5.107 or later.

  • A cluster connected through the Akuity Agent. Integration clusters are not supported.

Limitations​

danger

Once enabled, agent federation can't be turned off, and its settings and the agent namespace can't be changed. To change them, delete the cluster, connect it again and re-apply the manifests. Check the values carefully before saving.

This is for safety: if the settings could be edited or federation turned off, anyone allowed to update the cluster could trust their own keys or get a new long-lived token issued.

The agent still uses a static password for two connections, neither of which can read or change anything sensitive:

  • The shared Redis cache, which holds the resource trees and diffs shown in the dashboard, with Secret values masked. Argo CD rewrites it on every refresh.

  • The agent's tunnel, a connection from the cluster to the control plane that the agent uses to send data.

Finding the issuer and keys​

In the cluster where the agent runs, type:

kubectl get --raw /.well-known/openid-configuration

Use the issuer field as the Issuer, then choose a Key Source:

  • Discover from issuer: For issuers whose discovery document and keys are public over HTTPS, such as EKS, GKE and AKS with the OIDC issuer enabled.

  • JWKS URL: For keys served at another public HTTPS URL.

  • Paste JWKS: For private clusters, such as on-premises, k3s or kind. Paste the output of kubectl get --raw /openid/v1/jwks.

The keys must be fetchable when you save. Discovered keys and keys from a URL are refreshed regularly. Pasted keys never are, so use them only if the cluster doesn't rotate its signing key.

Enabling agent federation​

For a new cluster, go to your instance → Clusters → + Connect a cluster and expand Advanced settings. For an existing cluster, click its edit button under Action. The agent must be connected and no credential rotation may be in progress. Then:

  1. Select the Security tab and turn on Agent Federation.

  2. Enter the Issuer and choose a Key Source.

  3. Click Connect Cluster for a new cluster, or Update Cluster (Save with Auto Upgrade disabled) for an existing one.

On an existing cluster, saving rotates its credentials once. If Auto Upgrade is disabled, re-apply the manifests. The old token keeps working until the agent connects with federated tokens, and is then removed.

Declarative management​

Add a federation block to the Cluster spec:

apiVersion: argocd.akuity.io/v1alpha1
kind: Cluster
metadata:
name: my-cluster
spec:
data:
size: small
federation:
issuer: https://oidc.eks.us-west-2.amazonaws.com/id/EXAMPLE
# Optional, set at most one. With neither, keys are discovered from the issuer.
# jwksUrl: https://example.com/keys
# jwks: '{"keys": [...]}'

enabled can be left out, and enabled: false is refused. After federation is enabled, different settings are refused and leaving the block out keeps the stored ones.

Troubleshooting​

ErrorWhat to do
agent federation feature is not enabledContact Akuity Support.
agent federation is not supported by this versionSelect agent version 0.5.107 or later.
the agent has not connected yetWait for the agent to connect, or re-create the cluster with agent federation enabled.
credential rotation in progressWait for the agent to apply the rotation.
cannot be changed or disabled once enabled or agent namespace cannot be changedDelete the cluster, connect it again and re-apply the manifests.