ArgoCD
Create an integration to manage access to ArgoCD resources
ArgoCD is a Kubernetes-native continuous delivery (CD) tool that implements GitOps practices by using Git repositories as the single source of truth for application state.
Through this integration, Apono helps you discover ArgoCD roles and resources and securely manage just-in-time (JIT) access to them.
Prerequisites
Apono connector
On-prem connection serving as a bridge between an ArgoCD instance and Apono:
Kubernetes Command Line Tool (kubectl)
Command-line tool used for communicating with a Kubernetes cluster's control plane
ArgoCD
Instance installed and configured with your Identity Provider (IdP) for authentication
Set up Apono in ArgoCD
The steps to set up Apono in ArgoCD depend on where the Apono Connector is running and what permissions it has. The connector’s location determines whether you need to create a new service account, bind roles, or provide a token secret.
Use the tabs below to follow the instructions that match your environment:
Same cluster (cluster-admin): The connector already has full permissions.
Same cluster (limited permissions): Grant the connector’s existing service account the minimal Role/RoleBinding it needs.
Different cluster: Create a dedicated service account in the ArgoCD cluster and provide its token to Apono.
Follow these steps to set up Apono access in ArgoCD:
Open the
argocd-cmConfigMap in your default editor.
kubectl edit configmap argocd-cm -n argocdAdd
emailto both the OIDC scopes:requestedScopesandgroupsClaim.
oidc.config: |
name: Authentik
issuer: https://my-issuer.com
clientID: myclientid
clientSecret: myclientsecret
requestedScopes:
- openid
- profile
- email
- groups
- offline_access
insecureSkipVerify: true
requestedIDTokenClaims:
groups:
essential: true
groupsClaim: [groups, email]
Define your ArgoCD roles.
# Example in argocd-rbac-cm
policy.csv: |
p, role:readonly, applications, get, */*, allow
p, role:deployer, applications, sync, */*, allow# Example in an AppProject CRD
roles:
- name: deployer
description: Can sync apps in this project
policies:
- p, proj:team-a:deployer, applications, sync, team-a/*, allowRestart the ArgoCD API server for the changes to take effect.
kubectl rollout restart deployment argocd-server -n argocdFollow these steps to set up Apono access in ArgoCD:
Copy and save the following snippet as apono-argocd-sa.yaml.
At the shell prompt, apply the file to your ArgoCD cluster.
kubectl apply -f apono-argocd-sa.yamlOpen the
argocd-cmConfigMap in your default editor.
kubectl edit configmap argocd-cm -n argocdAdd
emailto both the OIDC scopes:requestedScopesandgroupsClaim.
oidc.config: |
name: Authentik
issuer: https://my-issuer.com
clientID: myclientid
clientSecret: myclientsecret
requestedScopes:
- openid
- profile
- email
- groups
- offline_access
insecureSkipVerify: true
requestedIDTokenClaims:
groups:
essential: true
groupsClaim: [groups, email]
Define your ArgoCD roles.
# Example in argocd-rbac-cm
policy.csv: |
p, role:readonly, applications, get, */*, allow
p, role:deployer, applications, sync, */*, allow# Example in an AppProject CRD
roles:
- name: deployer
description: Can sync apps in this project
policies:
- p, proj:team-a:deployer, applications, sync, team-a/*, allowRestart the ArgoCD API server for the changes to take effect.
kubectl rollout restart deployment argocd-server -n argocdFollow these steps to set up Apono access in ArgoCD:
Copy and save the following snippet as apono-argocd-sa.yaml.
At the shell prompt, apply the file to your ArgoCD cluster.
kubectl apply -f apono-argocd-sa.yamlOpen the
argocd-cmConfigMap in your default editor.
kubectl edit configmap argocd-cm -n argocdAdd
emailto both the OIDC scopes:requestedScopesandgroupsClaim.
oidc.config: |
name: Authentik
issuer: https://my-issuer.com
clientID: myclientid
clientSecret: myclientsecret
requestedScopes:
- openid
- profile
- email
- groups
- offline_access
insecureSkipVerify: true
requestedIDTokenClaims:
groups:
essential: true
groupsClaim: [groups, email]
Define your ArgoCD roles.
# Example in argocd-rbac-cm
policy.csv: |
p, role:readonly, applications, get, */*, allow
p, role:deployer, applications, sync, */*, allow# Example in an AppProject CRD
roles:
- name: deployer
description: Can sync apps in this project
policies:
- p, proj:team-a:deployer, applications, sync, team-a/*, allowRestart the ArgoCD API server for the changes to take effect.
kubectl rollout restart deployment argocd-server -n argocdGenerate the service account token.
Make sure you are using a Kubernetes version ≥1.24.
On earlier versions, you may need to retrieve the token from the service account’s Secret.
kubectl -n argocd create token apono-argocd-saCreate a secret with the token from step 7. Use the following key-value pair structure when generating the secret. Be sure to replace
#K8_SERVICE_TOKENwith the actual value.
"kubernetes_sa_token":"#K8_SERVICE_TOKEN"You can also input the token directly into the Apono UI during the integration process.
You can now Integrate ArgoCD.
Integrate ArgoCD
You can also use the steps below to integrate with Apono using Terraform.
In step 11, instead of clicking Confirm, follow the Are you integrating with Apono using Terraform? guidance.
Follow these steps to complete the integration:
On the Catalog tab, click ArgoCD. The Connect Integration page appears.
Under Discovery, click one or more resource types to sync with Apono.
Click Next. The Apono connector section expands.
From the dropdown menu, select a connector. Choosing a connector links Apono to all the services available on the account where the connector is located.
If the desired connector is not listed, click + Add new connector and follow the instructions for creating a connector (AWS, Azure, GCP, Kubernetes).
Click Next. The Integration Config section expands.
Define the Integration Config settings.
SettingDescriptionIntegration Name
Unique, alphanumeric, user-friendly name used to identify this integration when constructing an access flow
ArgoCD UI URL
Public URL of your ArgoCD instance
Example: https://argocd.my-domain.com
ArgoCD Namespace
Kubernetes namespace where ArgoCD is installed Default: argocd
Kubernetes Server URL
(Optional) API server endpoint of the Kubernetes cluster hosting ArgoCD
Provide the URL only when connecting to an external Kubernetes API server.
Leave this field blank when Apono’s connector is running in the same cluster.
Kubernetes Certificate Authority
(Optional) Certificate Authority (CA) bundle used to validate the Kubernetes API server certificate
Provide the CA file if connecting to an external cluster with a custom CA.
Leave this field blank when Apono's connector is running in the same cluster.
Click Next. The Secret Store section expands.
(Different cluster) Associate the secret or credentials.
Click Next. The Get more with Apono section expands.
Define the Get more with Apono settings.
SettingDescriptionCredential Rotation
(Optional) Number of days after which the database credentials must be rotated
Learn more about the Credentials Rotation Policy.
User cleanup after access is revoked (in days)
(Optional) Defines the number of days after access has been revoked that the user should be deleted
Learn more about Periodic User Cleanup & Deletion.
Custom Access Details
(Optional) Instructions explaining how to access this integration's resources
Upon accessing an integration, a message with these instructions will be displayed to end users in the User Portal. The message may include up to 400 characters.
To view the message as it appears to end users, click Preview.
Integration Owner
(Optional) Fallback approver if no resource owner is found Follow these steps to define one or several integration owners:
From the Attribute dropdown menu, select User or Group under the relevant identity provider (IdP) platform.
From the Value dropdown menu, select one or multiple users or groups.
NOTE: When Resource Owner is defined, an Integration Owner must be defined.
Resource Owner
(Optional) Group or role responsible for managing access approvals or rejections for the resource Follow these steps to define one or several resource owners:
Enter a Key name. This value is the name of the tag created in your cloud environment.
From the Attribute dropdown menu, select an attribute under the IdP platform to which the key name is associated. Apono will use the value associated with the key (tag) to identify the resource owner. When you update the membership of the group or role in your IdP platform, this change is also reflected in Apono.
NOTE: When this setting is defined, an Integration Owner must also be defined.
Click Confirm.
Now that you have completed this integration, you can create access flows that grant permission to your ArgoCD resources.
Last updated
Was this helpful?
