All Products
Search
Document Center

Container Service for Kubernetes:Configure multi-tenant permissions for ACK One GitOps

Last Updated:Sep 02, 2026

When multiple teams share one ACK One GitOps instance, unscoped accounts can access any project's repositories, clusters, and applications. Define ArgoCD local users and Project-scoped Role-Based Access Control (RBAC) rules to confine each team to its own resources, and then verify the permission model.

Table of contents

Permission model

Security model

Use cases

User

Role

Resource scope

Permissions

admin

super administrator

All resources

  • Create and configure local users.

  • Create and configure Projects.

  • Grant permission policies to local users.

  • Query, create, modify, or delete global resources such as repositories.

team01-admin

project administrator

Project team01

Query, create, modify, or delete Project-level resources such as repositories.

team02-admin

project administrator

Project team02

Query, create, modify, or delete Project-level resources such as repositories.

team01-user01

application administrator

team01/production-app

Query, create, modify, or delete the team01/production-app application.

team01-user02

application administrator

team01/staging-app

Query, create, modify, or delete the team01/staging-app application.

Configure multi-tenant permissions for ACK One GitOps

  1. Edit the ArgoCD argocd-cm ConfigMap:

    kubectl edit cm argocd-cm -n argocd
  2. In the argocd-cm ConfigMap, add the local users:

    data:
      accounts.team01-admin: login
      accounts.team01-admin.enabled: "true"
      accounts.team01-user01: login
      accounts.team01-user01.enabled: "true"
      accounts.team01-user02: login
      accounts.team01-user02.enabled: "true"
      accounts.team02-admin: login
      accounts.team02-admin.enabled: "true"
  3. Edit the ArgoCD argocd-rbac-cm ConfigMap:

    kubectl edit cm argocd-rbac-cm -n argocd
  4. In the argocd-rbac-cm ConfigMap, add the following content to configure RBAC rules for the local users:

    RBAC rules for the local users

    data:
      policy.csv: |
        ...
        p, role:team01-admin, projects, get, team01, allow
        p, role:team01-admin, repositories, *, team01/*, allow
        p, role:team01-admin, applications, *, team01/*, allow
        p, role:team01-admin, repositories, get, *, allow
        p, role:team01-admin, clusters, get, *, allow
        p, role:team02-admin, projects, get, team02, allow
        p, role:team02-admin, repositories, *, team02/*, allow
        p, role:team02-admin, applications, *, team02/*, allow
        p, role:team02-admin, repositories, get, *, allow
        p, role:team02-admin, clusters, get, *, allow
        p, role:team01-user01, projects, get, team01, allow
        p, role:team01-user01, repositories, get, team01/*, allow
        p, role:team01-user01, repositories, get, *, allow
        p, role:team01-user01, clusters, get, *, allow
        p, role:team01-user01, applications, *, team01/production-app, allow
        p, role:team01-user02, projects, get, team01, allow
        p, role:team01-user02, repositories, get, team01/*, allow
        p, role:team01-user02, repositories, get, *, allow
        p, role:team01-user02, clusters, get, *, allow
        p, role:team01-user02, applications, *, team01/staging-app, allow
        ...
        g, team01-admin, role:team01-admin
        g, team02-admin, role:team02-admin
        g, team01-user01, role:team01-user01
        g, team01-user02, role:team01-user02
  5. Log in to ArgoCD with the admin account, view the local users, and set a password for each local user.

    1. View the local users:

      export ARGOCD_OPTS='--port-forward-namespace argocd --port-forward'
      argocd account list

      Expected output:

      NAME           ENABLED  CAPABILITIES
      admin          true     apiKey, login
      team01-admin   true     login
      team01-user01  true     login
      team01-user02  true     login
      team02-admin   true     login
    2. Set a password for a local user:

      argocd account update-password --account <username> --current-password <current password> --new-password <new password>
  6. Log in to ArgoCD with the admin account and add global repositories:

    argocd repo add https://code.aliyun.com/bigteam/echo-server01.git
    argocd repo add https://code.aliyun.com/bigteam/echo-server02.git
    argocd repo list
    TYPE  NAME  REPO                                               INSECURE  OCI    LFS    CREDS  STATUS      MESSAGE  PROJECT
    git         https://code.aliyun.com/bigteam/echo-server01.git  false     false  false  false  Successful
    git         https://code.aliyun.com/bigteam/echo-server02.git  false     false  false  false  Successful
  7. Log in to ArgoCD with the admin account and run the following commands to create and configure Project team01 and Project team02.

    Category

    Git repository

    Cluster

    Resources that Project team01 can use

    https://code.aliyun.com/bigteam/echo-server01.git

    https://47.111.XX.XX:6443

    Resources that Project team02 can use

    https://code.aliyun.com/bigteam/echo-server02.git

    https://47.97.XX.XX:6443

    argocd proj create team01
    argocd proj add-source team01 https://code.aliyun.com/bigteam/echo-server01.git
    argocd proj add-destination team01 https://47.111.XX.XX:6443 "*"
    argocd proj create team02
    argocd proj add-source team02 https://code.aliyun.com/bigteam/echo-server02.git
    argocd proj add-destination team02 https://47.97.XX.XX:6443 "*"
  8. Use the team01-admin and team02-admin accounts to create repositories in the projects.

    • team01-admin

      1. Log in as the team01-admin user:

        argocd login 
        Username: team01-admin
        Password:
        'team01-admin:login' logged in successfully
        Context 'port-forward' updated
      2. Create a repository in Project team01:

        argocd repo add https://code.aliyun.com/team01/echo-server.git --project team01

        Expected output:

        Repository 'https://code.aliyun.com/team01/echo-server.git' added
    • team02-admin

      1. Log in as the team02-admin user:

        argocd login 
        Username: team02-admin
        Password:
        'team02-admin:login' logged in successfully
        Context 'port-forward' updated
      2. Create a repository in Project team02:

        argocd repo add https://code.aliyun.com/team02/echo-server.git --project team02

        Expected output:

        Repository 'https://code.aliyun.com/team02/echo-server.git' added

Verify the permission model for ACK One GitOps

Verify the permissions on projects

Verify the permissions of team01-admin on projects:

argocd account can-i create projects "*"
no
argocd account can-i update projects "team01"
no
argocd account can-i delete projects "team01"
no
argocd account can-i get projects "team01"
yes
argocd account can-i get projects "team02"
no

The preceding output indicates that the project administrator can only view Project team01 and has no other permissions.

Verify the permissions on repositories

Verify the permissions of team01-admin on repositories:

argocd account can-i create repositories "*"
no
argocd account can-i update repositories "*"
no
argocd account can-i delete repositories "*"
no
argocd account can-i get repositories "*"
yes
argocd account can-i create repositories "team01/*"
yes
argocd account can-i update repositories "team01/*"
yes
argocd account can-i delete repositories "team01/*"
yes
argocd account can-i get repositories "team01/*"
yes

The preceding output indicates that the project administrator can only view global repositories, and can query, create, modify, and delete repositories in Project team01.

Verify the permissions on clusters

Verify the permissions of team01-admin on clusters:

argocd account can-i create clusters "*"
no
argocd account can-i update clusters "*"
no
argocd account can-i delete clusters "*"
no
argocd account can-i get clusters "*"
yes
argocd account can-i create clusters "team01/*"
no
argocd account can-i update clusters "team01/*"
no
argocd account can-i delete clusters "team01/*"
no

The preceding output indicates that the project administrator can only view global clusters and has no other permissions.

Verify the permissions on applications

Verify the permissions of team01-admin on applications:

argocd account can-i create applications "*"
no
argocd account can-i update applications "*"
no
argocd account can-i delete applications "*"
no
argocd account can-i get applications "*"
no
argocd account can-i create applications "team01/*"
yes
argocd account can-i update applications "team01/*"
yes
argocd account can-i delete applications "team01/*"
yes
argocd account can-i get applications "team01/*"
yes

The preceding output indicates that the project administrator can only query, create, modify, and delete applications in Project team01, and has no other permissions.

Verify the permissions to create applications

  • View the permissions of the team01-admin user on Project team01:

    • Accessible repositories:

      • Global Repositories: https://code.aliyun.com/bigteam/echo-server01.git.

      • Project-scoped Scoped Repositories: https://code.aliyun.com/team01/echo-server.git.

    • Accessible cluster: https://47.111.XX.XX:6443.

    argocd proj get team01
    Name:                        team01
    Description:
    Destinations:                https://47.111.XX.XX:6443,*
    Repositories:                https://code.aliyun.com/bigteam/echo-server01.git
    Scoped Repositories:         https://code.aliyun.com/team01/echo-server.git
    Allowed Cluster Resources:   <none>
    Scoped Clusters:             <none>
    Denied Namespaced Resources: <none>
    Signature keys:              <none>
    Orphaned Resources:          disabled
  • Create an application outside Project team01:

    argocd app create team01-admin-echo-server --repo https://code.aliyun.com/bigteam/echo-server01.git --dest-namespace team01-admin-echo-server --dest-server https://47.111.XX.XX:6443

    Expected output:

    FATA[0001] rpc error: code = PermissionDenied desc = permission denied: applications, create, default/team01-admin-echo-server, sub: team01-admin, iat: 2022-10-20T03:20:47Z

    The preceding output indicates that the system failed to create an application outside Project team01.

  • Create an application by using an unauthorized repository and cluster:

    argocd app create team01-admin-echo-server --project team01 --repo https://code.aliyun.com/bigteam/echo-server02.git --path  manifests/directory/production --dest-namespace team01-admin-echo-server --dest-server https://47.97.XX.XX:6443

    Expected output:

    FATA[0002] rpc error: code = InvalidArgument desc = application spec for team01-admin-echo-server is invalid: InvalidSpecError: application repo https://code.aliyun.com/bigteam/echo-server02.git is not permitted in project 'team01';InvalidSpecError: application destination {https://xx.xx.xx.xx:6443 team01-admin-echo-server} is not permitted in project 'team01

    The preceding output indicates that the system failed to create an application by using an unauthorized repository and cluster.

  • Create an application within Project team01 by using a permitted repository and cluster:

    argocd app create team01-admin-echo-server --project team01 --repo https://code.aliyun.com/bigteam/echo-server01.git --path  manifests/directory/production --dest-namespace team01-admin-echo-server --dest-server https://47.111.XX.XX:6443

    Expected output:

    application 'team01-admin-echo-server' created

    The preceding output indicates that the system has created an application in Project team01.