-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Dashboard issue while deploying on AKS cluster (Failed to fetch the user profile data. Unable to get user profile data: Unauthorized: 401 error) #22665
Comments
@tolusha I have followed this document to install Eclipse-che on AKS https://che.eclipseprojects.io/2022/07/25/@karatkep-installing-eclipse-che-on-aks.html But as per document while using 'oAuthClientName' and 'oAuthScope' in below spec (Both are different app ID's ), we are Getting 403 (Login Failed: The upstream identity provider returned an error: invalid_client) If we deploy Eclipse-che without below values under spec we are able to install and login into che, but we are getting previously mentioned 401 Authorization error |
@karatkep hi, maybe you can take a look and provide some guidance based on your experience with https://che.eclipseprojects.io/2022/07/25/@karatkep-installing-eclipse-che-on-aks.html ? |
Hello @venkatesh0822, Small hint: oAuthScope is a constant for AKS case. I need following to help you:
|
Hi @karatkep 1: I have used below spec and constant value of
|
Hello @venkatesh0822 , could you please check if Token configuration contains |
@karatkep, No claims in my token configuration. I have created new group claim now and deployed eclipse-che with below claim values
|
@venkatesh0822 , both By some reason, oauth-proxy configuration below has been not applied in your case
You can see that in your logs:
Let's double check it. Please run echo command in oauth-proxy container:
|
@karatkep No value for |
@venkatesh0822, |
Looking on it. |
@karatkep I have tried by adding that value directly in deployment file, but it is not updating. |
@venkatesh0822 , right, che-operator will prevent direct modification in deployment file. |
Yes @karatkep, any idea how to update ? |
@venkatesh0822, I think the first step is to back to documentation and try to find some information about it... In case no luck, please let me know |
Ok @karatkep, I have followed this document https://che.eclipseprojects.io/2022/07/25/@karatkep-installing-eclipse-che-on-aks.html, do we have any other document also? |
@venkatesh0822, one moment, let me please try google. |
According to the google:
|
Thanks @karatkep, I will go through this documents. |
Hi @karatkep, I have tried different approaches to deploy che with this env value
Still getting same below 500 error, can you help on this ?
|
What Eclipse Che version do you use? |
Installing default version. |
Could you please run and share?
Important: please mask/hide secret information from the output before sharing |
|
As we can see envvar is missing here... it should look like this:
Please update it accordingly. |
Used below
Output of
|
che pod logs
|
@venkatesh0822 Could you please check in your browser: what is cookie size when request goes to /dashboard/api/... ? |
I'm getting 401 Unauthorized error:Che-dashboard pod logs
|
Hi @venkatesh0822, We need to check request header size for calls /dashboard/api/... |
I found that 401 error and shared above details for your reference. cookie details of api/cookie deatils of /api/... |
Errors in consoleFYI I'm using Only some warn logs available in
|
@venkatesh0822, not sure, but let's try to use
|
I have tired this, but still same issue. |
@venkatesh0822 I have no such documentation. My suggestion: to work on investigation, identify the error and fix it. |
Hi @karatkep, can you please share below details, so I can compare with my configurations.
|
Hello @venkatesh0822, I haven't already been working on that for year and months. Long story short... I had a task to install Che on Azure on my project about two yeas ago. I performed installation according to the instruction, and it did not work. I met and resolved lots of issues to make it workable. Most interesting things were documented in my blog post. That is it. I think, I will try to repeat Che installation on Azure in the future. But not sure about timing due to high loading on my current project. |
Thanks @karatkep, I will try to debug this issue. |
@venkatesh0822 @karatkep
I was able to deploy Eclipse Che on Azure Kubernetes Service (following the https://che.eclipseprojects.io/2022/07/25/@karatkep-installing-eclipse-che-on-aks.html) |
Do you mind if I create an article [1] How to deploy Eclipse Che on AKS based on your blogpost with some adjustments ? |
@tolusha, sure, please do it. |
Fixed by eclipse-che/che-docs#2670 |
@tolusha , could you please share a link to that documentation? |
@karatkep |
Summary
Hi All,
I am installing eclipse che on AKS cluster using chectl command (chectl server:deploy --platform k8s --che-operator-cr-patch-yaml cr-patch.yaml --domain --skip-oidc-provider-check) and using OIDC as Azure application details.
Installation completed Successfully and after hitting che dashboard URL Azure login page is appearing and able to login with AD credentials, after the oidc authentication it redirecting to che dashboard successful but I am getting below errors:
'Failed to fetch available workspaces, reason: Failed to fetch the list of devWorkspaces. Unable to list devworkspaces: Unauthorized'
'Failed to fetch the user profile data. Unable to get user profile data: Unauthorized'
Relevant information
Details:
Installation Command: chectl server:deploy --platform k8s --che-operator-cr-patch-yaml cr-patch.yaml --domain --skip-oidc-provider-check
cr-patch.yaml:
spec:
networking:
auth:
identityProviderURL: https://sts.windows.net/{TENANT_ID}/v2.0/
oAuthClientName: {CLIENT_ID}
oAuthSecret: {CLIENT_SECRET}
components:
cheServer:
extraProperties:
CHE_OIDC_AUTH__SERVER__URL: https://sts.windows.net/{TENANT_ID}/v2.0/
CHE_OIDC_USERNAME__CLAIM: name
(I have tried both 'CHE_OIDC_USERNAME__CLAIM: name' and 'CHE_OIDC_EMAIL__CLAIM: email')
OIDC details:
I have created application in Azure and used as OIDC
ClientID and TENANTID
CLIENT_SECRET
Authentication:
che-dashboard- logs:
body: {
kind: 'Status',
apiVersion: 'v1',
metadata: {},
status: 'Failure',
message: 'Unauthorized',
reason: 'Unauthorized',
code: 401
},
statusCode: 401
}
che-gateway-xxxx -c oauth-proxy logs:
No error messages
che logs:
2023-11-09 04:20:44,259[nio-8080-exec-2] [ERROR] [o.a.c.c.C.[.[.[/api].[default] 175] - Servlet.service() for servlet [default] in context with path [/api] threw exception
io.jsonwebtoken.ExpiredJwtException: JWT expired at 2023-11-09T04:07:24Z. Current time: 2023-11-09T04:20:44Z, a difference of 797258 milliseconds. Allowed clock skew: 3000 milliseconds.
at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:448)
at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:550)
at io.jsonwebtoken.impl.DefaultJwtParser.parseClaimsJws(DefaultJwtParser.java:610)
at io.jsonwebtoken.impl.ImmutableJwtParser.parseClaimsJws(ImmutableJwtParser.java:173)
at org.eclipse.che.multiuser.oidc.filter.OidcTokenInitializationFilter.processToken(OidcTokenInitializationFilter.java:80)
at org.eclipse.che.multiuser.api.authentication.commons.filter.MultiUserEnvironmentInitializationFilter.doFilter(MultiUserEnvironmentInitializationFilter.java:127)
at org.eclipse.che.commons.logback.filter.RequestIdLoggerFilter.doFilter(RequestIdLoggerFilter.java:50)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:738)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:676)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:400)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:840)
2023-11-09 04:20:58,893[nio-8080-exec-5] [WARN ] [o.e.c.s.oauth.EmbeddedOAuthAPI 198] - Unsupported OAuth provider gitlab
2023-11-09 04:20:58,915[nio-8080-exec-5] [WARN ] [o.e.c.s.oauth.EmbeddedOAuthAPI 198] - Unsupported OAuth provider github
2023-11-09 04:20:58,937[nio-8080-exec-5] [WARN ] [o.e.c.s.oauth.EmbeddedOAuthAPI 198] - Unsupported OAuth provider bitbucket
Errors after accessing che dashboard:
Error While creating workspace in che dashboard:
Can someone please help on this I have tried different below approaches to resolve this issue, but the issue is still appearing
The text was updated successfully, but these errors were encountered: