question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

redirectURI error while creating workspace with `devfile.yaml` hosted within gitlabOrganization account using SSO

See original GitHub issue

Summary

i have installed eclipse-che in minikube cluster.

chectl version image

When i clone a devfile.yaml present inside my organization’s repository, i receive The redirect URI included is not valid error image

image

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 image

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=='

image

Please help

Relevant information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
azatsarynnyycommented, Feb 23, 2022

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.

1reaction
azatsarynnyycommented, Feb 23, 2022

I’m not sure if this is a Dashboard or Che-Server functionality. cc @ibuziuk @skabashnyuk

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4. Authoring devfiles - Red Hat Customer Portal
A devfiles is a YAML file that CodeReady Workspaces consumes and transforms into a cloud workspace composed of multiple containers. It is possible...
Read more >
Unable to create workspace from devfile #21486 - eclipse/che
Describe the bug When I try to create a workspace from a devfile in a gitrepo by mporting from git (bitbucket) i get...
Read more >
Using a customized devfile to create a workspace - IBM
Select the Custom Workspace tab. For a custom devfile enter a public URL, then click Load Devfile. Note: You can also copy and...
Read more >
Introduction to Devfile - GitHub Pages
This is as simple as create devfile.yaml file in the root of your GH repo, ... If you're a user of chectl tool,...
Read more >
GitHub Business cloud application - Google Support
Using Security Assertion Markup Language (SAML), your users can use their Google Cloud credentials to sign in to enterprise-cloud applications.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found