[OPENAM-5472] NPE in #setAttributes when IdRepo fails to read directory schema Created: 30/Jan/15  Updated: 20/Nov/16  Resolved: 30/Jan/15

Status: Resolved
Project: OpenAM
Component/s: idrepo, SAML
Affects Version/s: 11.0.2, 12.0.0, 13.0.0
Fix Version/s: 11.0.3, 12.0.1, 13.0.0

Type: Bug Priority: Major
Reporter: Quentin CASTEL [X] (Inactive) Assignee: Quentin CASTEL [X] (Inactive)
Resolution: Fixed Votes: 0
Labels: EDISON, release-notes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Sprint 76 - Sustaining
Support Ticket IDs:

 Description   

We get an exception when we do a SSO federation with a Sharepoint SP.

Caused by: java.lang.NullPointerException
	at com.sun.identity.idm.server.IdServicesImpl.setAttributes(IdServicesImpl.java:1741)
	at com.sun.identity.idm.server.IdCachedServicesImpl.setAttributes(IdCachedServicesImpl.java:529)
	at com.sun.identity.idm.AMIdentity.store(AMIdentity.java:535)
	at com.sun.identity.plugin.datastore.impl.IdRepoDataStoreProvider.setAttributes(IdRepoDataStoreProvider.java:245)
	at com.sun.identity.saml2.common.AccountUtils.setAccountFederation(AccountUtils.java:236)
	at com.sun.identity.saml2.profile.IDPSSOUtil.getSubject(IDPSSOUtil.java:1543)
	at com.sun.identity.saml2.profile.IDPSSOUtil.getAssertion(IDPSSOUtil.java:922)
	at com.sun.identity.saml2.profile.IDPSSOUtil.getResponse(IDPSSOUtil.java:740)
	at com.sun.identity.saml2.profile.IDPSSOUtil.sendResponseToACS(IDPSSOUtil.java:426)
	at com.sun.identity.saml2.profile.IDPSSOFederate.doSSOFederate(IDPSSOFederate.java:1075)
	at com.sun.identity.saml2.profile.IDPSSOFederate.doSSOFederate(IDPSSOFederate.java:132)
	at org.apache.jsp.saml2.jsp.idpSSOFederate_jsp._jspService(idpSSOFederate_jsp.java:123)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
	... 41 more

Seems like ide.getErrorCode() can be null

               if (!ide.getErrorCode().equalsIgnoreCase("220")

Should be instead

               if (!"220".equalsIgnoreCase(ide.getErrorCode())


 Comments   
Comment by Quentin CASTEL [X] (Inactive) [ 30/Jan/15 ]

added to 13.0.0 in r12270
added to 12.0.1 in r12272
added to 11.0.3 in r12271

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