Closed carlbalmer closed 1 week ago
OK, I found the cause! This issue was an intended result of #18388, the proposal explains:
If there are multiple repositories with the same URL and assuming the user is allowed to access them, then setting a project parameter would be required, since there would otherwise be no way to determine which of the credentials a user wants to access. This is not a breaking change since this adds functionality which has previously not existed.
Adding the appProject
query parameter solved the issue for us.
The use of project-scoped JWT tokens may be the reason that this was a breaking change for us.
Checklist:
argocd version
.Describe the bug
We use the
GET api/v1/repositories/{repo}/helmcharts
endpoint to query available helm charts for project scoped helm repositories. After an argoCD update from v2.9.21+1804306 to v2.12.6+4dab5bd the endpoint started returning a 'permission denied' error.Example:
If we prefix the project name to the helm repo (the same way it is defined in the RBAC role) the permission gets granted but argoCD tries to use the whole string ('myproject/https://helm.server/some/path/' in this case) as the URL and therefore fails to query the repo.
Example:
To Reproduce Create App Project:
Create Repository Secret:
Generate a token for the role in the frontend den curl the helm repo:
Expected behavior
The request to
GET api/v1/repositories/{repo}/helmcharts
should return a list of available charts ({"items":[...]}
).{repo}
should be the repository url (as displayed byargocd repo list
) even for project scoped repos.Version
Logs
Argocd Server log form request
GET https://argocd.server/api/v1/repositories/https%253A%252F%252Fhelm.server%252Fsome%252Fpath%252F/helmcharts
:Argocd Server log form request with project name prefixed: