Skip to main content
Version 3.0

Who gets into Argo CD
and what they can do.

Four scenarios: login through LDAP, login through Active Directory, an Argo CD role for each group, and restricting who reaches the pods. Each one covers: the chart default, what changes in the cluster, and the values file commented line by line.

ChartVersion3.0.3TypeapplicationAppVersion3.2.5
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+
Feature SupportLDAPsupported

The tdp-argo chart starts Argo CD with only the local admin account, with no directory login, no RBAC policy and no NetworkPolicy. Security is turned on in the values file: login through LDAP or Active Directory goes through Dex, with the bind credentials in a Secret created by you; the RBAC policy gives each group a role; and a custom NetworkPolicy restricts who reaches the pods. The initial admin password and how to change it are in the first contact of the Argo CD Configuration.

Your environment

If you fill in your environment details here, the examples and commands on the page use what you entered. The namespace, the release name and the values file are your choices, not the chart's.

Scenarios​

Dex on, the bind credentials in a Secret and the connector that looks up users and groups.

You want each person to sign in to Argo CD with the company directory account, and not with the local admin account. Argo CD does this login through Dex, a built-in identity provider that comes off. Turning it on means writing three things: a Secret with the technical bind account and its password, created before the installation; the LDAP connector in dex.config, with the directory address, where to look up users and where to look up groups; and dex.enabled: true. The bind password does not go in the values file: the connector reads it from the Secret, by reference.

Chart default

Dex off (dex.enabled) and dex.config empty: the login screen does not show the SSO button. Helm creates argocd-secret (configs.secret.createSecret).

Before you start

Argo CD installed as in the first contact of the Configuration, and the UI reachable at the address that goes in configs.cm.url (Publish at a URL).

Through the GitOps kit

The configs.cm.url is already https://argo. followed by the TDP_DOMAIN domain. A new ./deploy.sh --install rebuilds the Argo CD values from the variables file and discards manual adjustments.

The login path, with and without LDAP

Who signs in to Argo CD

Your choice changes the commands and passages below.

namespace <NAMESPACE>Who signs inadmin accountArgo CD serverUI and API
  1. Who signs in. Only the local admin account, with the password generated on first start, which you change after the first login. Chart default: local admin account.
  2. Argo CD server. UI and API. The configs.cm.url URL must be exactly the address opened in the browser: protocol, host and port. It is what the SSO login uses to return to Argo CD. Chart default: configs.cm.url: https://argo.tdp.local. (tdp-argo.configs.cm.url)

Who signs in to Argo CD: Only the admin account (default)

namespace <NAMESPACE>Who signs inadmin accountArgo CD serverUI and API
  1. Who signs in. Only the local admin account, with the password generated on first start, which you change after the first login. Chart default: local admin account.
  2. Argo CD server. UI and API. The configs.cm.url URL must be exactly the address opened in the browser: protocol, host and port. It is what the SSO login uses to return to Argo CD. Chart default: configs.cm.url: https://argo.tdp.local. (tdp-argo.configs.cm.url)

Who signs in to Argo CD: LDAP users

namespace <NAMESPACE>bind and searchWho signs indirectory accountArgo CD serverLOG IN VIA LDAP buttonDexLDAP connectorSecretargocd-secretLDAP serverusers and groups
  1. Who signs in. Each person clicks the SSO button on the login screen and signs in with the directory account. The username and password form keeps serving only the local Argo CD accounts. Chart default: local admin account.
  2. Argo CD server. UI and API. The configs.cm.url URL must be exactly the address opened in the browser: protocol, host and port. It is what the SSO login uses to return to Argo CD. Chart default: configs.cm.url: https://argo.tdp.local. (tdp-argo.configs.cm.url)
  3. Dex. Built-in identity provider. With the technical account from the Secret, it looks up the user in the directory, checks the password and returns to Argo CD who signed in and, with groupSearch, their groups. Chart default: off. (tdp-argo.dex.enabled: true · tdp-argo.configs.cm.dex.config)
  4. Bind credentials Secret. Created by you before the installation, with the dex.ldap.bindDN and dex.ldap.bindPW keys, which the connector reads by reference. With createSecret: false, Helm does not manage it, and it stays in the namespace after helm uninstall. Chart default: Helm creates argocd-secret. (tdp-argo.configs.secret.createSecret: false)
  5. LDAP server. The company directory. The technical account looks up the user by uid and the groups they are a member of. Chart default: none.
Switch above: with LDAP, Dex, the bind credentials Secret and the directory queried at each login appear.

Admin account only. The chart starts with no connector in Dex, and only the local admin account signs in. Admin account only: Best suited when Argo CD runs in the lab or in a cluster operated by a single person.

This is the state the chart starts in. There is nothing to add to the values file.

1tdp-argo:
2configs:
3 cm:
4 dex.config: ""
5 secret:
6 createSecret: true
7dex:
8 enabled: false

With no connector, the login screen does not show the SSO button.

  1. No connector (linha 4). With no connector, the login screen does not show the SSO button.
  2. Secret managed by Helm (linha 6). Helm creates and manages argocd-secret.
  3. Dex off (linha 8). Only the local admin account signs in. For the company directory, switch above to LDAP users.
Chart default: no directory login

LDAP users. Each person signs in through the SSO button with the directory account: Dex validates the username and password against LDAP and hands Argo CD who signed in and their groups. LDAP users: Best suited when Argo CD leaves the lab and each person should sign in with the company directory account. For an Active Directory, see scenario 2.

Click the markers to understand each line. The bind credentials stay in the Secret, not here.

1tdp-argo:
2configs:
3 cm:
4 url: https://<ARGOCD_HOSTNAME>
5 dex.config: |
6 connectors:
7 - type: ldap
8 id: ldap
9 name: LDAP
10 config:
11 host: "<LDAP_HOST>:389"
12 insecureNoSSL: true
13 insecureSkipVerify: true
14 bindDN: "$dex.ldap.bindDN"
15 bindPW: "$dex.ldap.bindPW"
16 userSearch:
17 baseDN: "cn=users,cn=accounts,dc=<LDAP_DOMAIN>,dc=com"
18 filter: "(objectClass=person)"
19 username: uid
20 idAttr: uid
21 emailAttr: mail
22 nameAttr: givenName
23 groupSearch:
24 baseDN: "cn=groups,cn=accounts,dc=<LDAP_DOMAIN>,dc=com"
25 filter: "(objectClass=groupOfNames)"
26 userMatchers:
27 - userAttr: DN
28 groupAttr: member
29 nameAttr: cn
30
31 secret:
32 createSecret: false
33
34dex:
35 enabled: true

Exactly the address opened in the browser: same protocol, host and port. The login is a round-trip OIDC flow through Dex, and the return is built with this URL.

  1. Public URL (linha 4). Exactly the address opened in the browser: same protocol, host and port. The login is a round-trip OIDC flow through Dex, and the return is built with this URL.
  2. Connector name (linha 9). Names the login screen button: LOG IN VIA LDAP.
  3. Server (linha 11). Directory address as seen from inside the cluster.
  4. No TLS (linha 12). With true, the connection to the directory does not use TLS, and the certificate is not verified (line 13). For LDAPS, in production, use false with the directory certificates.
  5. Bind credentials (linha 14). References to the dex.ldap.bindDN and dex.ldap.bindPW keys of the argocd-secret Secret. The values stay only in the Secret.
  6. Where to look up users (linha 17). Base of the user search in the directory. Adjust it to your directory.
  7. Login name (linha 19). The attribute the person types as the username.
  8. Email and name (linha 21). The attributes Dex hands to Argo CD as the email and name of whoever signed in.
  9. Group search (linha 23). Makes Dex return the user's groups. Without this block, the group rules of the RBAC policy (scenario 3) never apply.
  10. Who is a member (linha 27). The user DN must be in the group member attribute.
  11. Group name (linha 29). The attribute handed to Argo CD as the group name. This name goes in the g rules of the RBAC policy.
  12. Secret outside Helm (linha 32). Helm does not manage argocd-secret: it is the Secret you created with the bind credentials.
  13. Dex on (linha 35). Starts Dex, which does the login against the directory.
LDAP: the Dex connector

Create the Secret with the bind credentials

The connector reads the bind account and password from this Secret. It exists before the installation, so Helm does not try to manage it.

If the namespace does not exist yet, create it before the Secret with kubectl create namespace <NAMESPACE>.

Terminal input
kubectl create secret generic argocd-secret \
--from-literal=dex.ldap.bindDN="uid=<LDAP_BIND_USER>,cn=users,cn=accounts,dc=<LDAP_DOMAIN>,dc=com" \
--from-literal=dex.ldap.bindPW="<LDAP_BIND_PASSWORD>" \
-n <NAMESPACE>

Replace <LDAP_BIND_PASSWORD> with the technical account password. It stays only in the command and in the Secret.

Add the connector to the values file

Replace the URL, the server and the domain with yours.

<ARGOCD_HOSTNAME> is the UI address in the browser; <LDAP_HOST>, the directory address as seen from inside the cluster; <LDAP_DOMAIN>, the domain component of the DN. Adjust baseDN and filter for users and groups to your directory.

Apply to the release

Dex starts and the login screen gets the SSO button.

Terminal input
helm upgrade --install <RELEASE_NAME> \
oci://registry.tecnisys.com.br/tdp/charts/tdp-argo \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>

Without --version, Helm installs the latest published version.

It worked when

Terminal input
kubectl get pods -n <NAMESPACE> | grep dex
kubectl get svc -n <NAMESPACE> | grep dex

The Dex pod and Service appear.

Sign in with the directory account

The login goes through the SSO button, not the username and password form.

In the UI, at https://<ARGOCD_HOSTNAME>, click LOG IN VIA LDAP, below the form, and sign in with the directory username and password. The username and password form serves only the local Argo CD accounts. Through the CLI:

Terminal input
argocd login <ARGOCD_HOSTNAME> --sso

It worked when

You sign in with the directory account and see what the RBAC policy (scenario 3) allows.
If the login fails

Bind and directory search errors are in the Dex log. Login and RBAC errors, in the server log. The Dex image has no LDAP client: check the bind and search result of a login attempt in the log.

Terminal input
kubectl logs -n <NAMESPACE> deployment/tdp-argocd-dex-server --since=10m | grep -i ldap
kubectl logs -n <NAMESPACE> deployment/tdp-argocd-server -f

The most common messages are in When something goes wrong.

Query the directory from inside the clusterOpcional

Only if the Dex log is not enough: ldapsearch, in a temporary pod, shows whether the bind account finds the user.

Use an image that has ldapsearch, for example an OpenLDAP client image available in your registry. The -W asks for the bind password in the terminal.

Terminal input
kubectl run ldap-test -n <NAMESPACE> --rm -it --restart=Never \
--image=<LDAPSEARCH_IMAGE> -- \
ldapsearch -x -H ldap://<LDAP_HOST>:389 \
-D "uid=<LDAP_BIND_USER>,cn=users,cn=accounts,dc=<LDAP_DOMAIN>,dc=com" -W \
-b "cn=users,cn=accounts,dc=<LDAP_DOMAIN>,dc=com" \
"(uid=<LDAP_USER>)"

It worked when

The search returns the test user entry.

After helm uninstall. The argocd-secret created by you does not carry the release label and stays in the namespace. Delete it by name if you will no longer use it.

When something goes wrong​

Troubleshooting

Paste the error message or pick the symptom. The answer comes with the cause, what to do and the command.

  1. no such host for tdp-argocd-dex-server. Cause: Dex is off, so its Service does not exist. What to do: Turn on tdp-argo.dex.enabled: true and apply it to the release.
  2. config referenced key does not exist in secret. Cause: The dex.config references keys that do not exist in the Secret, or the Secret is not named argocd-secret. What to do: The Secret must be named argocd-secret and have the dex.ldap.bindDN and dex.ldap.bindPW keys.
  3. Invalid username or password. Cause: Dex cannot reach the directory, the bind account or password are wrong, or the search base and filter do not find the user. What to do: Check the bind and search result in the Dex log. Then check the connectivity to the directory, the bindDN and the password, userSearch.baseDN and filter, and the LDAP server logs.
  4. User signs in but has no permission. Cause: Their group is not mapped in policy.csv, or the connector has no groupSearch and Dex does not send groups. What to do: Check configs.rbac.policy.csv and the group names, which are the groupSearch.nameAttr value. The RBAC evaluation messages are in the server log.
  5. Invalid redirect URL. Cause: configs.cm.url is different from the address opened in the browser: protocol, host or port. What to do: Set configs.cm.url exactly as the URL used in the browser. When exposing through Gateway API, use the port the browser uses, not the listener's.
  6. Directory user cannot sign in through the username and password form. Cause: The username and password form serves only the local Argo CD accounts. What to do: Sign in with the LOG IN VIA button, with the connector name, below the form. In the CLI, use argocd login with --sso.

Best practices​

  • Change the admin password after the first login and delete the argocd-initial-admin-secret, as in the first contact of the Configuration.
  • Keep the bind credentials in the argocd-secret Secret, with createSecret: false, and never in the values file, which would end up versioned.
  • In production, connect Dex to the directory through LDAPS, with insecureNoSSL: false and the directory certificates.
  • In production, accept ingress to the Argo CD pods only from trusted namespaces, with a custom NetworkPolicy (scenario 4).

All parameters​

The chart prefix is already filled in.

8 of 8 parameters

ParameterDescriptionChart default
tdp-argo.dex.enabledLoginTurns on Dex, which does the login through LDAP or Active Directoryfalse
tdp-argo.configs.cm.dex.configLoginDex connectors (LDAP, Active Directory)""
tdp-argo.configs.cm.urlLoginPublic URL of Argo CD. Same as the browser one, including the porthttps://argo.tdp.local
tdp-argo.configs.secret.createSecretLoginHelm creates the argocd-secret. false when you create it with the bind credentialstrue
tdp-argo.configs.rbac.policy.defaultAuthorizationRole of anyone who matches no rulenot defined
tdp-argo.configs.rbac.policy.csvAuthorizationg rules (groups and users to roles) and p rules (permissions of a role)not defined
tdp-argo.global.networkPolicy.createNetworkCreates the upstream NetworkPolicies, which allow all ingressfalse
tdp-argo.global.networkPolicy.defaultDenyIngressNetworkPolicy that denies all ingressnot defined

Next steps​