Repository navigation
Closed
eclipse-che/che-dashboard
#524Labels
area/che-serverarea/dashboardkind/bugOutline of a bug - must adhere to the bug report template.severity/P1Has a major impact to usage or development of the system.
Description
Describe the bug
I successfully deployed eclipse che on k8s with an external keycloak. After 5 mins the JWT token expire and "500 – Internal Server Error" shows up.
After investigation i found out that the token is not being sent with the request "/api/websocket?token=" and eclipse che is not retrieving the keycloak settings from the endpint keycloak/settings.
Che version
7.47@latest
Steps to reproduce
chectl server:deploy --domain=eclipse-che.<REDACTED> --platform=k8s --che-operator-cr-yaml=CheClusterCR.yml --skip-oidc-provider-check
CheClusterCR.yml file:
apiVersion: org.eclipse.che/v1
kind: CheCluster
metadata:
name: eclipse-che
spec:
auth:
externalIdentityProvider: true
identityProviderURL: https://<REDACTED>/auth/realms/<realm>
openShiftoAuth: false
oAuthClientName: 'ovh-kube'
oAuthSecret: '<REDACTED>'
server:
externalDevfileRegistry: false
cheHostTLSSecret: "che-https-certificates"
workspaceNamespaceDefault: <username>
database:
externalDb: false
k8s:
tlsSecretName: 'che-tls'
ingressDomain: 'eclipse-che.<REDACTED>'
Expected behavior
Access token expire after 5 mins and get refreshed using refresh tokens.
Runtime
Kubernetes (vanilla)
Screenshots
Installation method
chectl/latest
Environment
Windows
Eclipse Che Logs
2022-05-06 12:19:12,020[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 2022-05-06T10:31:14Z. Current time: 2022-05-06T12:19:12Z, a difference of 6475020 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:74)
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:185)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:119)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:353)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:872)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1705)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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:829)Additional context
No response
Metadata
Metadata
Assignees
Labels
area/che-serverarea/dashboardkind/bugOutline of a bug - must adhere to the bug report template.severity/P1Has a major impact to usage or development of the system.


Activity
tolusha commentedon May 9, 2022
/cc @olexii4
olexii4 commentedon May 16, 2022
Close with Simplify authentication and authorization with a more flexible and lightweight approach and Remove an old authorization flow with Keycloak
@Ryder05 Feel free to reopen this PR if you find it actual