[OPENAM-5131] FederationConfig.properties in unconfigured Fedlet should have com.sun.identity.common.serverMode=false by default Created: 26/Nov/14  Updated: 22/Jun/16  Resolved: 03/May/16

Status: Resolved
Project: OpenAM
Component/s: SAML
Affects Version/s: 12.0.0
Fix Version/s: 13.5.0, 14.0.0

Type: Improvement Priority: Minor
Reporter: Nemanja Lukic Assignee: Mark de Reeper
Resolution: Fixed Votes: 0
Labels: EDISON
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is required by OPENAM-8218 File not found error when creating fe... Resolved
is required by OPENAM-3344 Unconfigured fedlet is too difficult ... Closed
Sprint: AM Sustaining Sprint 21
QA Assignee: Nemanja Lukic
Verified Version/s:

 Description   

FederationConfig.properties file which comes with predetermined values and tags mixture, should have the property com.sun.identity.common.serverMode set to false or with an appropriate description for the user. Currently, the value is set to true and causes SSO to fail with an NPE:

Nov 26, 2014 8:39:25 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [fedletapplication] in context with path [/fedlet] threw exception [An exception occurred processing JSP page /fedletSampleApp.jsp at line 88

85:         // necessary processing conforming to SAMLv2 specifications,
86:         // such as XML signature validation, Audience and Recipient
87:         // validation etc.  
88:         map = SPACSUtils.processResponseForFedlet(request, response, new PrintWriter(out, true));
89:     } catch (SAML2Exception sme) {
90:         SAMLUtils.sendError(request, response,
91:             response.SC_INTERNAL_SERVER_ERROR, "failedToProcessSSOResponse",


Stacktrace:] with root cause
java.lang.NullPointerException
	at com.sun.identity.saml.common.SAMLServiceManager.getAttribute(SAMLServiceManager.java:1339)
	at com.sun.identity.saml.common.SAMLUtils.<clinit>(SAMLUtils.java:137)
	at com.sun.identity.saml2.protocol.impl.ResponseImpl.parseElement(ResponseImpl.java:239)
	at com.sun.identity.saml2.protocol.impl.ResponseImpl.<init>(ResponseImpl.java:294)
	at com.sun.identity.saml2.protocol.ProtocolFactory.createResponse(ProtocolFactory.java:1419)
	at com.sun.identity.saml2.profile.SPACSUtils.getResponseFromPost(SPACSUtils.java:906)
	at com.sun.identity.saml2.profile.SPACSUtils.getResponse(SPACSUtils.java:196)
	at com.sun.identity.saml2.profile.SPACSUtils.processResponseForFedlet(SPACSUtils.java:2028)
	at org.apache.jsp.fedletSampleApp_jsp._jspService(fedletSampleApp_jsp.java:257)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)

or:

Nov 26, 2014 8:10:01 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [fedletapplication] in context with path [/fedlet] threw exception [javax.servlet.ServletException: java.lang.ExceptionInInitializerError] with root cause
java.lang.NullPointerException
	at com.sun.identity.saml.common.SAMLServiceManager.getAttribute(SAMLServiceManager.java:1339)
	at com.sun.identity.saml.common.SAMLUtils.<clinit>(SAMLUtils.java:137)
	at com.sun.identity.saml2.protocol.impl.ResponseImpl.parseElement(ResponseImpl.java:239)
	at com.sun.identity.saml2.protocol.impl.ResponseImpl.<init>(ResponseImpl.java:294)
	at com.sun.identity.saml2.protocol.ProtocolFactory.createResponse(ProtocolFactory.java:1419)
	at com.sun.identity.saml2.profile.SPACSUtils.getResponseFromPost(SPACSUtils.java:906)
	at com.sun.identity.saml2.profile.SPACSUtils.getResponse(SPACSUtils.java:196)
	at com.sun.identity.saml2.profile.SPACSUtils.processResponseForFedlet(SPACSUtils.java:2028)
	at org.apache.jsp.fedletSampleApp_jsp._jspService(fedletSampleApp_jsp.java:257)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)

depending on the build.



 Comments   
Comment by Mark de Reeper [ 03/May/16 ]

This issue has been resolved as part of the work that went into OPENAM-8218.

Comment by Nemanja Lukic [ 22/Jun/16 ]

Verified in: 13.5.0-RC8

Generated at Wed Oct 21 10:58:24 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.