Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-5472

NPE in #setAttributes when IdRepo fails to read directory schema

    Details

    • 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())
      

        Attachments

          Activity

            People

            • Assignee:
              quentin.castel Quentin CASTEL [X] (Inactive)
              Reporter:
              quentin.castel Quentin CASTEL [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: