Closed skopcsa closed 9 months ago
Hi @skopcsa,
For the registration.github
section only configure client-id
and client-secret
and delete the provider.github
section in the application.yml
file. Hope that helps.
Hello Aart,
Thank you so much for the fast reply. The issue is, I am trying to use the locally hosted (on premise) github instance for the authentication.
If I remove those lines, open vsx will try to authorize via github.com (publicly hosted). The premise github host name does not match the public one (e.g. our own is gh.< company >.com
Is this supported?
Thank you! Sergiu
Hi Sergiu,
What is the response when you get /user/auth-error
after trying to log in?
The Open VSX server uses Spring Authorization Server: https://docs.spring.io/spring-authorization-server/docs/current/reference/html/guides/how-to-social-login.html#register-social-login-provider. You could ask the Spring project whether on-premises Github is supported.
Hello Aart,
Thank you for your response!
I've made a small spring application and use the same configuration (as the one for open vsx) and I could authenticate/retrieve data from our on-premise github instance. The open vsx applications (e.g. backend, frontend, etc) are running in kubernetes (each with individual pod/host) and the application I made I've lunched it from my virtual machine.
Could there be some open vsx dependency? Maybe some additional configuration/variables? Or any idea what else should I be checking? :(
Thanks a lot! Sergiu
I was looking at the server's source code and way this
File: https://github.com/eclipse/openvsx/blob/e231e575c3d02c0f5c4c12b4b9314532f4542cf7/server/src/main/java/org/eclipse/openvsx/security/SecurityConfig.java#L54C28-L54C28
Line 67:
configurer.failureUrl(redirectUrl + "?auth-error");
I understand if there is an error during authentication, the user (frontend) gets redirected to < host >?auth-error? Is there a way to extract more details about what went wrong? :(
There's a couple things you can do:
/user/auth-error
server (not frontend) endpoint to get the last authentication error.application.yml
file:
logging:
level:
org
springframework
security
oauth2: DEBUG
org.eclipse.openvsx.security.OAuth2UserServices.java
is a good starting point.@skopcsa I'm closing this issue for now. Feel free to re-open it if you still have this issue.
Hello,
First of, thank you so much for this project! We really appreciate it.
I am trying to deploy open vsx internally though Kubernetes. I have the frontend, backend, elasticsearch and postgresql deployed and they seems to be fine.
I can access the web ui and currently, there are no extensions but this is normal - I just deployed it.
Then, I am trying to configure open vsx to use our internally hosted github for authentication and this is where I am stuck :(
The flow (from web ui) is:
Do you know what might cause this?
==============================
My versions are:
My application.yml file is (I tried different combinations):
This is what I see in the logs: