Description
While testing KnoxSSO with Azure OIDC I came across this exception.
This seems to be because of the exclusion of javax.mail dependency in pac4j.
2020-02-10 14:55:22,055 DEBUG session.KnoxSessionStore (KnoxSessionStore.java:get(108)) - Get from session: AzureAdClient$attemptedAuthentication = null2020-02-10 14:55:22,055 DEBUG session.KnoxSessionStore (KnoxSessionStore.java:get(108)) - Get from session: AzureAdClient$attemptedAuthentication = null2020-02-10 14:55:22,055 DEBUG session.KnoxSessionStore (KnoxSessionStore.java:set(148)) - Save in session: oidcStateAttribute = SzDtKjOenCTTDC6q9rxYOLtwEsGkm9sOZfnY91k2iso2020-02-10 14:55:39,938 DEBUG knox.gateway (GatewayFilter.java:doFilter(116)) - Received request: GET /api/v1/websso/pac4jCallback/AzureAdClient2020-02-10 14:55:40,027 DEBUG session.KnoxSessionStore (KnoxSessionStore.java:get(108)) - Get from session: oidcStateAttribute = SzDtKjOenCTTDC6q9rxYOLtwEsGkm9sOZfnY91k2iso2020-02-10 14:55:40,037 ERROR knox.gateway (AbstractGatewayFilter.java:doFilter(63)) - Failed to execute filter: java.lang.NoClassDefFoundError: com/sun/mail/util/PropUtiljava.lang.NoClassDefFoundError: com/sun/mail/util/PropUtil at javax.mail.internet.ParameterList.<clinit>(ParameterList.java:120) at com.nimbusds.oauth2.sdk.http.CommonContentTypes.<clinit>(CommonContentTypes.java:42) at com.nimbusds.oauth2.sdk.TokenRequest.toHTTPRequest(TokenRequest.java:429) at org.pac4j.oidc.credentials.authenticator.OidcAuthenticator.validate(OidcAuthenticator.java:137) at org.pac4j.oidc.credentials.authenticator.OidcAuthenticator.validate(OidcAuthenticator.java:35) at org.pac4j.core.client.BaseClient.retrieveCredentials(BaseClient.java:71) at org.pac4j.core.client.IndirectClient.getCredentials(IndirectClient.java:140) at org.pac4j.core.engine.DefaultCallbackLogic.perform(DefaultCallbackLogic.java:89) at org.pac4j.j2e.filter.CallbackFilter.internalFilter(CallbackFilter.java:84) at org.pac4j.j2e.filter.AbstractConfigFilter.doFilter(AbstractConfigFilter.java:84) at org.apache.knox.gateway.pac4j.filter.Pac4jDispatcherFilter.doFilter(Pac4jDispatcherFilter.java:268) at org.apache.knox.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:348) at org.apache.knox.gateway.GatewayFilter$Chain.doFilter(GatewayFilter.java:262) at org.apache.knox.gateway.filter.XForwardedHeaderFilter.doFilter(XForwardedHeaderFilter.java:50) at org.apache.knox.gateway.filter.AbstractGatewayFilter.doFilter(AbstractGatewayFilter.java:58) at org.apache.knox.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:348) at org.apache.knox.gateway.GatewayFilter$Chain.doFilter(GatewayFilter.java:262) at org.apache.knox.gateway.webappsec.filter.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:52) at org.apache.knox.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:348) at org.apache.knox.gateway.GatewayFilter$Chain.doFilter(GatewayFilter.java:262) at org.apache.knox.gateway.GatewayFilter.doFilter(GatewayFilter.java:166) at org.apache.knox.gateway.GatewayFilter.doFilter(GatewayFilter.java:93) at org.apache.knox.gateway.GatewayServlet.service(GatewayServlet.java:135) at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1386) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617) at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.apache.knox.gateway.trace.TraceHandler.handle(TraceHandler.java:51) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.apache.knox.gateway.filter.CorrelationHandler.handle(CorrelationHandler.java:41) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.apache.knox.gateway.filter.PortMappingHelperHandler.handle(PortMappingHelperHandler.java:106) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:500) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543) at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398) at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.ClassNotFoundException: com.sun.mail.util.PropUtil at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 71 more
Attachments
Issue Links
- is caused by
-
KNOX-1878 Enforce single version of dependencies
- Resolved
- links to