Adding New Local User for ArgoCD

Preface

A simple hack to create new local ArgoCD user on OCP4 Cluster.

Prerequisite

  • You have access to the OCP Cluster;
  • You have access to the ArgoCD Namespace inside that cluster with write permissions.

Procedure

Create User

  1. Connect to the Cluster (either via OCP Client CLI or OCP Console), move into the ArgoCD Project.
  2. Edit the argocd-cm configMap. In data, add new key-value pair: accounts.<user-name>: 'apiKey, login';
  3. Save/apply your edit;
  4. Restart the deployment rollout.

Create Password for the user

  1. Hash your password using 10-factor Bcrypt hash (just google for one) and copy your hashed password;
  2. In the secret named argocd-secret in the ArgoCD namespace, add new key-value pair: `accounts..password: <your-hashed-password’;
  3. Save/apply your edit;
  4. Restart the deployment rollout.

Conclusion

You should be able to use the user you just create to access the ArgoCD web UI.

References