Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eclipseche-dex login doesnot redirect to gitlab sso (installed via minikube) #21379

Closed
Divine1 opened this issue May 7, 2022 · 1 comment
Closed
Labels
kind/question Questions that haven't been identified as being feature requests or bugs. status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github.

Comments

@Divine1
Copy link

Divine1 commented May 7, 2022

Summary

My chectl version chectl/0.0.20220422-next.08c2079 linux-x64 node-v16.13.2
Operating system Ubuntu 18.04

i installed minikube with this configuration minikube start --driver=docker --memory=15000 --cpus=4 --ports="30670,30700,30710,30720,80:80,443:443,31728:31728"

i installed eclipse-che using chectl server:deploy --platform minikube --installer=operator --debug

The installation was successful and i'm able to login using user1@che / password

i have to integrate my organization's gitlab sso with dex, so that i can login using my organization's sso feature (https://gitlab.mycompany.com). Also i have my devfile.yaml in a repository which is present within gitlab organization account (https://gitlab.mycompany.com). this repository should be clonable by eclipse-che workspace.

i applied the secret file kubectl apply -f gitlab-secret.yaml -n eclipse-che (referred from here)

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.mycompany.com'
type: Opaque
data:
  id: 'ZWFkNDhjNzE1ODQ1ZDU32OGQ4NDY5ODZmMTQzZTYyNDllMzJhMDZhZA=='
  secret: 'OGM0MDMwNWQ2OWI1ZGQhiMDJkMGZlYmE2YWUwMjhjZGM2NThkMA=='

The i edited dex configmap in dex namespace kubectl edit configmap dex -n dex (referred from here)

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.mycompany.com/
        clientID: ead48c715845d574f68d846986f143e6249e32a06ad
        clientSecret: 8c40305d6fb15038b02d0feba6ae028cdc658d0
        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 successfully applied both the above mentioned changes.

But when i trigger https://192.168.49.2.nip.io weblink, it shows the dex static login page instead of redirecting to gitlab sso login screen
image

did i miss any other configuration?
in this page , i noticed below value related to OIDC . Should i do any changes here?
image

Please let me know how to fix this problem, my expectation is, when i trigger https://192.168.49.2.nip.io the page should be redirected to gitlab sso page.

Please help

Relevant information

No response

@Divine1 Divine1 added the kind/question Questions that haven't been identified as being feature requests or bugs. label May 7, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label May 7, 2022
@Divine1
Copy link
Author

Divine1 commented May 8, 2022

i was thinking for a while about this problem and tried below approach. Using this approach i was able to fix my problem.

Inorder for the configuration changes to take effect, we have to delete the dex pod kubectl delete pod dex-c6d746d9c-fmh5c -n dex that is currently running. The configuration changes will not reflect into the dex pod automatically. When the dex pod is deleted, the dex deployment component will automatically create a new pod and configure itself with newly updated configuration.

@Divine1 Divine1 closed this as completed May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs. status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github.
Projects
None yet
Development

No branches or pull requests

2 participants