Consider having more than one git credentials tokens from the same SCM #22821
Labels
area/git/oauth-services
OAuth support to authenticate developers with their GitHub, GitLab, Bitbucket etc...accounts
kind/task
Internal things, technical debt, and to-do tasks to be performed.
severity/P2
Has a minor but important impact to the usage or development of the system.
team/A
This team is responsible for the Che Operator and all its operands as well as chectl and Hosted Che
Is your task related to a problem? Please describe
According to our current logic, we do not propagate more than one scm token with the same scm endpoint and user id: https://github.com/eclipse-che/che-server/blob/4f8a84cb1d4a9a8cd1b698a33457222078114e3c/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java#L107-L108
This might cause a problem when user has an oauth token which might be limited in permissions and a Personal Access Token with full permissions. There is a possibility that the oauth token would be propagated to a workspace but not the PAT, so it might cause problems with some git remote operations due to the oauth token restrictions.
Describe the solution you'd like
Rework the current logic of generating the git-credentials secrets.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: