Secret and deployment name normalization required when using SCM username in PersonalAccessToken management #19700
Labels
area/che-server
kind/bug
Outline of a bug - must adhere to the bug report template.
severity/P1
Has a major impact to usage or development of the system.
sprint/current
sprint/next
Milestone
Describe the bug
I have seen the following problems when dealing with Gitlab PersonalAccessTokens (PATs), but I can't see why it would not apply to other SCMs.
My corporate gitlab username is
<firstname>.<lastname>
. This username is causing the following two errors in che-server:1- Uppercase letters in the username are not valid
My goal was to register a k8s secret as described in the documentation. So here is the YAML for the secret:
Notice the uppercase letters in the
scm-username
annotation. WhenKubernetesGitCredentialManager
tries to create a secret using this username, I get the following error:I easily fixed that one by updating the secret to
che.eclipse.org/scm-username: 'first.last'
. I think it would be nice at this stage to call a lowercase() function on the provided username to normalize it.2- '.' character is not allowed
A little bit further down when it's time to create the deployment, the '.' character in the username creates a problem:
This second problem might have greater ramifications in the system, so might be tougher to fix.
Che version
7.29.1
The text was updated successfully, but these errors were encountered: