redirectURI error while creating workspace with `devfile.yaml` hosted within gitlabOrganization account using SSO
See original GitHub issueSummary
i have installed eclipse-che
in minikube
cluster.
chectl version
When i clone a devfile.yaml
present inside my organization’s repository, i receive The redirect URI included is not valid
error
below is the url taken from the screen which shows The redirect URI included is not valid
(screenshot posted above)
https://gitlab.myorganization.com/oauth/authorize?client_id=ead48c715845d574253a18dfe5e99d28ab5b2f68d846986f143e6249e32a06ad&redirect_uri=https://192.168.49.2.nip.io/api/oauth/callback&response_type=code&scope=api%20write_repository%20openid&state=oauth_provider%3Dgitlab%26scope%3Dapi%2Bwrite_repository%2Bopenid%26request_method%3DPOST%26signature_method%3Drsa%26redirect_after_login%3Dhttps://192.168.49.2.nip.io/f?url%3Dhttps%253A%252F%252Fgitlab.eng.vmware.com%252Fdchelladurai%252Fdemonodejs.git
in this url, i can see redirect_uri=https://192.168.49.2.nip.io/api/oauth/callback
. is this url causing the error? because this documentation says that default uri ends with /api/oauth/callback
. i dont think this URI exists in my eclipse-che
setup.
Please let me know how to fix this problem.
gitlab application
i have added below config map to replace default dex
login interface with my organization gitlab sso, this intergation + redirection from gitlabSSO back to eclipse-che
works perfectly…
But, when cloning the repository hosted within my gitlab.myorganization.com
repository, redirection error is thrown
kubectl edit configmap dex -n dex
apiVersion: v1
data:
config.yaml: |
issuer: https://dex.192.168.49.2.nip.io
storage:
type: kubernetes
config:
inCluster: true
web:
http: 0.0.0.0:5556
oauth2:
skipApprovalScreen: true
staticClients:
- id: eclipse-che
redirectURIs:
- 'https://192.168.49.2.nip.io/oauth/callback'
name: 'Eclipse Che'
secret: Qi3zbNqJvtwdMmhWdnsm9YkPnEnDkWyTiaSFgNtlupc=
connectors:
- type: gitlab
id: gitlab
name: GitLab
config:
baseURL: https://gitlab.myorganization.com/
clientID: ead48c715845d574253a18dfe5e99d28ab5b2sgds6249e32a06ad
clientSecret: 8c40305d69b5dd5dd7894ad4d7526f33c2fb1sfdsfdfeba6ae028cdc658d0
redirectURI: 'https://dex.192.168.49.2.nip.io/callback'
useLoginAsID: false
kind: ConfigMap
metadata:
creationTimestamp: "2022-02-11T08:45:21Z"
labels:
app: dex
name: dex
namespace: dex
resourceVersion: "18867"
uid: 9e3a897a-b416-49c5-912b-7629e6c9855c
i have added my below secret key kubectl apply gitlab-secret.yaml - eclipse-che
, inorder to allow cloning of gitlabOrganization repository.
kind: Secret
apiVersion: v1
metadata:
name: gitlab-oauth-config
namespace: 'eclipse-che'
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: oauth-scm-configuration
annotations:
che.eclipse.org/oauth-scm-server: gitlab
che.eclipse.org/scm-server-endpoint: 'https://gitlab.myorganization.com'
type: Opaque
data:
id: 'ZWFkNDhjNdfdfI1M2ExOGRmZTVlOTlkMjhhYjViMmY2OGQ4NDY5ODZmMTQzZTYyNDllMzJhMDZhZA=='
secret: 'OGM0MDsdfZGQ3ODk0YWQ0ZDc1MjZmMzNjMmZiMTUwMzhiMDJkMGZlYmE2YWUwMjhjZGM2NThkMA=='
Please help
Relevant information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hello @Divine1 I’m glad you were able to solve your problem. Here’s the list of Eclipse Che components https://github.com/eclipse/che/blob/main/CONTRIBUTING.md#other-che-repositories I believe, it should be up to date.
I’m not sure if this is a Dashboard or Che-Server functionality. cc @ibuziuk @skabashnyuk