You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had mistakenly configured two ssh repo credentials (credential templates) for the same repo url during a migration. However, these did not have the same rights. One of the two credentials only had access to our test repos whereas the other was the correct one. As a result, the wrong credential was sometimes used to check the repos, which understandably led to errors. Finding this was not trivial, as the errors occurred only sporadically and very randomly.
To Reproduce
Add two repo credentials that have the identical repo url but different permissions on the repos
Add multiple repositories and applications that correspond to the different permissions
You will see that the health status of the apps will flicker
Expected behavior
Without having looked at the implementation details, we thought that the default ssh behavior should apply. This means that all available keys are tried until the operation is successful. We think that this would also be the best behavior.
As the implementation does not appear to be entirely trivial, we would welcome it if the behavior could be logged. If two repo credentials (credential templates) with the identical repo url are present we should see a warning in the logs. We don't currently see a use case when this would be useful as the credentials are chosen randomly: https://github.com/argoproj/argo-cd/blob/master/util/db/repository_secrets.go#L473C36-L473C36
Checklist:
argocd version
.Describe the bug
We had mistakenly configured two ssh repo credentials (credential templates) for the same repo url during a migration. However, these did not have the same rights. One of the two credentials only had access to our test repos whereas the other was the correct one. As a result, the wrong credential was sometimes used to check the repos, which understandably led to errors. Finding this was not trivial, as the errors occurred only sporadically and very randomly.
To Reproduce
Expected behavior
Without having looked at the implementation details, we thought that the default ssh behavior should apply. This means that all available keys are tried until the operation is successful. We think that this would also be the best behavior.
As the implementation does not appear to be entirely trivial, we would welcome it if the behavior could be logged. If two repo credentials (credential templates) with the identical repo url are present we should see a warning in the logs. We don't currently see a use case when this would be useful as the credentials are chosen randomly: https://github.com/argoproj/argo-cd/blob/master/util/db/repository_secrets.go#L473C36-L473C36
Version
The text was updated successfully, but these errors were encountered: