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

Eclipse che authentication using GitLab -> Callback URL is invalid #22984

Open
AkramMulani opened this issue May 27, 2024 · 8 comments
Open

Eclipse che authentication using GitLab -> Callback URL is invalid #22984

AkramMulani opened this issue May 27, 2024 · 8 comments
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@AkramMulani
Copy link

Summary

I have changed the configuration for networking.auth to authenticate using GitLab.

As per the changes, configuration applied successfully, but the issue I encountered that is:
Invalid callback URI. Just after successfully authenticating by GitLab

Relevant information

I have changed the configuration for networking.auth to authenticate using GitLab.

configurations:

spec.networking.auth.identityProviderURL: https://gitlab.com # the actual gitlab provider
spec.networking.auth.oAuthClientName: < your-oauth-client-name > # client name/id
spec.networking.auth.oAuthSecret: < your-oauth-client-secret > # client secret

As per the changes, configuration applied successfully, but the issue I encountered that is:
Invalid callback URI. Just after successfully authenticating by GitLab

So I request everyone, if anyone know the callback URI after the authentication success?

@AkramMulani AkramMulani added the kind/question Questions that haven't been identified as being feature requests or bugs. label May 27, 2024
@tolusha
Copy link
Contributor

tolusha commented May 27, 2024

@AkramMulani
Copy link
Author

Hello @tolusha

I have already gone through the mentioned documentation, but my question is regarding the user authentication in dashboard, like by default there is "Dex" and I wanted to replace it by GitLab. So I think we can configure it in CheCluster custom resources.

I had change that identity provider with GitLab one.

And It's working, I can now sign in using GitLab.

But again in the second document you provided, about OAuth for GitLab,

  1. Create new Application with following :
  • Name
  • Redirect callback URL
  • Check boxes
  1. Save the Id and Secretes

In this the redirect callback URL is given in documentation:
https://che-host/api/oauth/callback

But when I gave this url, in the dashboard's login page, after the sign in success, I got the error page of GitLab with message "Invalid callback URL".

So I wondering if there is any other callback URL provided in Eclipse che that after successfully sign in it will redirect to it.

I have also tried with following, but the same result I found:

  1. https://che-host/callback
  2. https://che-host/dashboard/

I'll share snapshots also.

Any highlights in this?

@tolusha
Copy link
Contributor

tolusha commented Jun 3, 2024

Hello @AkramMulani
To be honest, I haven't tried to configure GitLab as OIDC. Which doc did you follow?
Maybe I will have some idea.

@AkramMulani
Copy link
Author

Hello @tolusha

I followed official documentation for CheCluster custom resources.

https://eclipse.dev/che/docs/stable/administration-guide/checluster-custom-resource-fields-reference/

Firstly I got the custom resources for che from kubectl configurations, "checluster.yaml".

By following the "auth options" table in documentation I have just changed the following tags:
identityProviderURL - gitlab provider url
oAuthClientName - gitlab application client id
oAuthSecret - gitlab application client secret

@tolusha
Copy link
Contributor

tolusha commented Jun 3, 2024

The fields below are used to configure OIDC provider, not a git provider.
'oAuthSecret'
'oAuthClientName'
'identityProviderURL'

@AkramMulani
Copy link
Author

Ok so any inputs from your side regarding how to configure custom authentication by gitlab/github

@tolusha
Copy link
Contributor

tolusha commented Jun 3, 2024

I think, the only way is to confiure OIDC (like dex) to work with gitlab.
For instance https://dexidp.io/docs/connectors/gitlab/

@huonguyenlt
Copy link

I had change that identity provider with GitLab one.

And It's working, I can now sign in using GitLab.

@AkramMulani as I understand, you have successfully sign in with gitlab? Can you share me your setup. I am having the same issue with your initial issue that after login to gitlab it give me the error Callback URL is invalid

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.
Projects
None yet
Development

No branches or pull requests

3 participants