java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI

JBoss Issue Tracker | Alessio Soldano | 6 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    When running org.jboss.test.ws.jaxws.samples.wsse.UsernameAuthorizationTestCase : org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is: org.apache.ws.security.WSSecurityException: Failed Authentication : Subject has not been created; nested exception is: java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI at org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:173) [wss4j-1.5.11.jar:1.5.11] at org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:61) [wss4j-1.5.11.jar:1.5.11] at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:328) [wss4j-1.5.11.jar:1.5.11] at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245) [wss4j-1.5.11.jar:1.5.11] at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:218) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.handleMessage(AbstractUsernameTokenAuthenticatingInterceptor.java:96) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.handleMessage(AbstractUsernameTokenAuthenticatingInterceptor.java:67) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [cxf-api.jar:2.3.4-SNAPSHOT] at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113) [cxf-rt-core.jar:2.3.4-SNAPSHOT] at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:105) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:172) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:57) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:156) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:90) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at java.lang.Thread.run(Thread.java:619) [:1.6.0_21] Caused by: org.apache.ws.security.WSSecurityException: Failed Authentication : Subject has not been created; nested exception is: java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.setSubject(AbstractUsernameTokenAuthenticatingInterceptor.java:147) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor$SubjectCreatingCallbackHandler.handleCallback(AbstractUsernameTokenAuthenticatingInterceptor.java:228) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.DelegatingCallbackHandler.handle(DelegatingCallbackHandler.java:38) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:168) [wss4j-1.5.11.jar:1.5.11] ... 30 more Caused by: java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI at org.jboss.wsf.stack.cxf.security.authentication.AuthenticationManagerLoader.getManager(AuthenticationManagerLoader.java:48) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingInterceptor.createSubject(SubjectCreatingInterceptor.java:110) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.setSubject(AbstractUsernameTokenAuthenticatingInterceptor.java:143) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] ... 33 more

    JBoss Issue Tracker | 6 years ago | Alessio Soldano
    java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI
  2. 0

    When running org.jboss.test.ws.jaxws.samples.wsse.UsernameAuthorizationTestCase : org.apache.ws.security.WSSecurityException: The security token could not be authenticated or authorized; nested exception is: org.apache.ws.security.WSSecurityException: Failed Authentication : Subject has not been created; nested exception is: java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI at org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:173) [wss4j-1.5.11.jar:1.5.11] at org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:61) [wss4j-1.5.11.jar:1.5.11] at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:328) [wss4j-1.5.11.jar:1.5.11] at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245) [wss4j-1.5.11.jar:1.5.11] at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:218) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.handleMessage(AbstractUsernameTokenAuthenticatingInterceptor.java:96) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.handleMessage(AbstractUsernameTokenAuthenticatingInterceptor.java:67) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [cxf-api.jar:2.3.4-SNAPSHOT] at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113) [cxf-rt-core.jar:2.3.4-SNAPSHOT] at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:105) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:172) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:57) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:156) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:90) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) [cxf-rt-transports-http.jar:2.3.4-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [jbossweb-7.0.0.Beta4.jar:7.0.0.Alpha2-SNAPSHOT] at java.lang.Thread.run(Thread.java:619) [:1.6.0_21] Caused by: org.apache.ws.security.WSSecurityException: Failed Authentication : Subject has not been created; nested exception is: java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.setSubject(AbstractUsernameTokenAuthenticatingInterceptor.java:147) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor$SubjectCreatingCallbackHandler.handleCallback(AbstractUsernameTokenAuthenticatingInterceptor.java:228) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.DelegatingCallbackHandler.handle(DelegatingCallbackHandler.java:38) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] at org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:168) [wss4j-1.5.11.jar:1.5.11] ... 30 more Caused by: java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI at org.jboss.wsf.stack.cxf.security.authentication.AuthenticationManagerLoader.getManager(AuthenticationManagerLoader.java:48) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingInterceptor.createSubject(SubjectCreatingInterceptor.java:110) [jbossws-cxf-server.jar:4.0.0-SNAPSHOT] at org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.setSubject(AbstractUsernameTokenAuthenticatingInterceptor.java:143) [cxf-rt-ws-security.jar:2.3.4-SNAPSHOT] ... 33 more

    JBoss Issue Tracker | 6 years ago | Alessio Soldano
    java.lang.SecurityException: Unable to lookup AuthenticationManager using JNDI

    Root Cause Analysis

    1. java.lang.SecurityException

      Unable to lookup AuthenticationManager using JNDI

      at org.jboss.wsf.stack.cxf.security.authentication.AuthenticationManagerLoader.getManager()
    2. org.jboss.wsf
      SubjectCreatingInterceptor.createSubject
      1. org.jboss.wsf.stack.cxf.security.authentication.AuthenticationManagerLoader.getManager(AuthenticationManagerLoader.java:48)[jbossws-cxf-server.jar:4.0.0-SNAPSHOT]
      2. org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingInterceptor.createSubject(SubjectCreatingInterceptor.java:110)[jbossws-cxf-server.jar:4.0.0-SNAPSHOT]
      2 frames
    3. Apache CXF Runtime WS Security
      DelegatingCallbackHandler.handle
      1. org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.setSubject(AbstractUsernameTokenAuthenticatingInterceptor.java:143)[cxf-rt-ws-security.jar:2.3.4-SNAPSHOT]
      2. org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor.setSubject(AbstractUsernameTokenAuthenticatingInterceptor.java:147)[cxf-rt-ws-security.jar:2.3.4-SNAPSHOT]
      3. org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor$SubjectCreatingCallbackHandler.handleCallback(AbstractUsernameTokenAuthenticatingInterceptor.java:228)[cxf-rt-ws-security.jar:2.3.4-SNAPSHOT]
      4. org.apache.cxf.ws.security.wss4j.DelegatingCallbackHandler.handle(DelegatingCallbackHandler.java:38)[cxf-rt-ws-security.jar:2.3.4-SNAPSHOT]
      4 frames
    4. Apache WSS4J
      UsernameTokenProcessor.handleUsernameToken
      1. org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:168)[wss4j-1.5.11.jar:1.5.11]
      1 frame