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

Debug log showing NullPointerException in com.sun.identity.federation.common.FSUtils#getRemoteServiceURLs

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 14.0.0, 14.5.0, 5.5.1, 6.0.0, 6.5.0
    • Fix Version/s: 7.0.0
    • Component/s: SAML
    • Labels:
    • Environment:
      IG working as a SP using the AM federation libraries.
    • Sprint:
      AM Sustaining Sprint 60, AM Sustaining Sprint 61
    • Story Points:
      1
    • Needs backport:
      No
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Bug description

      As seen in the libIDFF debug log of an IG SP deployment:

      libIDFF:02/15/2019 10:45:38:567 AM NZDT: Thread[qtp1267032364-21,5,main]: TransactionId[c7da0fa0-c44a-4850-851d-1133bb5e9a9c-16]
      FSUtils.getRemoteServiceURLs:
      java.lang.NullPointerException
      	at java.util.Objects.requireNonNull(Objects.java:203)
      	at java.util.AbstractCollection.removeAll(AbstractCollection.java:371)
      	at com.sun.identity.federation.common.FSUtils.getRemoteServiceURLs(FSUtils.java:629)
      	at com.sun.identity.federation.common.FSUtils.requireAddCookie(FSUtils.java:503)
      	at com.sun.identity.federation.common.FSUtils.needSetLBCookieAndRedirect(FSUtils.java:545)
      	at com.sun.identity.saml2.profile.SPSSOFederate.initiateAuthnRequest(SPSSOFederate.java:200)
      	at com.sun.identity.saml2.profile.SPSSOFederate.initiateAuthnRequest(SPSSOFederate.java:156)
      	at org.forgerock.openig.handler.saml.SamlFederationHandler.serviceSPInitiatedSSO(SamlFederationHandler.java:330)
      	at org.forgerock.openig.handler.saml.SamlFederationHandler.handle(SamlFederationHandler.java:178)
      

       

      Code analysis

      com.sun.identity.federation.common.FSUtils#getRemoteServiceURLs
      The serverList may be null and this is not being tested before attempting to access methods. This is wrapped in a try/catch so the exception is being caught but it would be better to avoid this and also stop the debug logging of the NPE.

        Attachments

          Activity

            People

            • Assignee:
              markdr Mark de Reeper
              Reporter:
              markdr Mark de Reeper
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: