Private GitLab repositories: OAuth2 flow fails in devworkspace mode (without Keycloak) #21231
Labels
area/factory/dashboard
Issues related to factories frontend (che user dashboard side)
engine/devworkspace
Issues related to Che configured to use the devworkspace controller as workspace engine.
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.
Describe the bug
Trying to start workspaces from private GitLab repo fails with the following message:
It seems that the token that was passed by GitLab isn't used`.
As expected authentication is triggered after
https://che.company.dev/api/factory/resolver/
fails. Following the OAuth flow:https://che.company.dev/api/oauth/authenticate?oauth_provider=gitlab&scope...
https://git.company.dev/oauth/authorize?client_id=a6
.https://che.company.dev/api/oauth/callback?code=...
.Browser console shows the following output.
As a result an empty secret
workspace-credentials-secret
is created in the users namespace. Dex is configured using GitLab for Kubernetes native auth.Based on the configuration and OAuth flow, that looks good. Am I missing something?
Che version
next (development version)
Steps to reproduce
Che authentication
We've deployed dex and configured the kube api server as well as Che's authentication to use it. That works as expected.
GitLab OAuth2 integration
As described by https://www.eclipse.org/che/docs/next/administration-guide/configuring-authorization/#configuring-gitlab-oauth2-with-devworkspace-engine_che, we've created a new application in GitLab
Che
and created a secretFrom what I understand Che/Kubernetes-auth is independent from GitLab-auth that's being used for pulling projects, right? Just in case
CHE_OIDC_USERNAME__CLAIM: email
shouldn't cause issues, right?We're using trusted SSL certs.
Expected behavior
Devfile should be retrieved from private GitLab repository using requested OAuth token.
Runtime
Kubernetes (vanilla)
Screenshots
No response
Installation method
chectl/next
Environment
Linux
Eclipse Che Logs
Che Server/ Dashboard don't show any logs.
Additional context
#20831 On prem private Gitlab repositores support with OAuth2 flow (without Keycloak)
The text was updated successfully, but these errors were encountered: