Skip to content

"argocd proj list" returns an empty list when user lacks permissions on projects #25111

@aminerachyd

Description

@aminerachyd

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

The CLI returns a silent error, an empty list, when listing projects with a user which lacks permissions to do.
Without required rights, when getting a project we encounter this error:

$ argocd --auth-token $ARGOCD_TOKEN --grpc-web --server $ARGOCD_INSTANCE proj get default
FATA[0000] rpc error: code = PermissionDenied desc = permission denied

While when querying a list of projects, we get this silent error output:

$ argocd --auth-token $ARGOCD_TOKEN --grpc-web --server $ARGOCD_INSTANCE proj list
NAME  DESCRIPTION  DESTINATIONS  SOURCES  CLUSTER-RESOURCE-WHITELIST  NAMESPACE-RESOURCE-BLACKLIST  SIGNATURE-KEYS  ORPHANED-RESOURCES  DESTINATION-SERVICE-ACCOUNTS

To Reproduce

A user lacking permissions on listing project resources.

Expected behavior

Return a permission error, like:

FATA[0000] rpc error: code = PermissionDenied desc = permission denied: projects, list

Version

argocd: v2.13.3+a25c8a0
  BuildDate: 2025-01-03T19:06:52Z
  GitCommit: a25c8a0eef7830be0c2c9074c92dbea8ff23a962
  GitTreeState: clean
  GoVersion: go1.22.10
  Compiler: gc
  Platform: linux/amd64
argocd-server: v3.0.6+db93798

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/pendingThis issue needs further triage to be correctly classified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions