Uploaded image for project: 'PicketLink'
  1. PicketLink
  2. PLINK-798

Getting exception when trying to parse the subject node in saml response

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • SAML

    Description

      In SamlSubjectParser getting exception when trying to parse the nameid tag. We are decrypting the assertion first and then parsing.

      Unencrypted subject is :
      <ns2:Subject>^M
      <ns2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">iesspdev</ns2:NameID>^M
      <ns2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">^M
      <ns2:SubjectConfirmationData NotOnOrAfter="2020-06-01T14:34:31Z" Recipient="https://XXXXXXXXXX"/>^M
      </ns2:SubjectConfirmation>^M
      </ns2:Subject>^M

      Exception we are getting is :
      < ClassCastException occured because org.codehaus.stax2.ri.evt.CharactersEventImpl cannot be cast to javax.xml.stream.events.EndElement. But Continuing with Flow of Execution.. >
      java.lang.ClassCastException: org.codehaus.stax2.ri.evt.CharactersEventImpl cannot be cast to javax.xml.stream.events.EndElement
      at org.picketlink.identity.federation.core.parsers.saml.SAMLSubjectParser.parse(SAMLSubjectParser.java:128)
      at org.picketlink.identity.federation.core.parsers.saml.SAMLAssertionParser.parse(SAMLAssertionParser.java:132)
      at org.picketlink.identity.federation.core.parsers.saml.SAMLAssertionParser.fromElement(SAMLAssertionParser.java:67)

      Attachments

        Activity

          People

            psilva@redhat.com Pedro Igor Craveiro
            girishsayana Girish Sayana (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: