Rampart
  1. Rampart
  2. RAMPART-154

org.apache.rahas.client.STSClient.org.apache.rahas.processIssueResponse fails if SamlAssertion is issued.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.1
    • Component/s: rampart-policy
    • Labels:
      None
    • Environment:
      Latest Rampart and Wss4j on a windows platform.

      Description

      the method processIssueResponse throws a trustexception if findIdentifier returns null. This is a problem since SAML Assertions don't has a AssertionID attribute instead of an ID attribute.

      One solution could be to look for the assertionID attribute as well. Another could be to ignore the ID if it isn't found.

      The example below shows a version of findIdentifier that also works with SAML 1.1 Assetions

      private String findIdentifier(OMElement reqAttRef,
      OMElement reqUnattRef,
      OMElement token) {
      String id;
      if (reqAttRef != null)

      { //First try the attached ref id = this.getIdFromSTR(reqAttRef); }

      else if (reqUnattRef != null)

      { //then try the unattached ref id = this.getIdFromSTR(reqUnattRef); }

      else {
      //Return wsu:Id of the token element
      id = token.getAttributeValue(new QName(WSConstants.WSU_NS, "Id"));
      if ( id == null )

      { id = token.getAttributeValue(new QName( "AssertionID")); }

      }

      return id;
      }

      1. patch.txt
        0.8 kB
        Rasmus Rhein Helwigh

        Activity

        Hide
        Nandana Mihindukulasooriya added a comment -

        Hi Rasmus,
        Can you create a patch and apply it to the JIRA ?

        Show
        Nandana Mihindukulasooriya added a comment - Hi Rasmus, Can you create a patch and apply it to the JIRA ?
        Hide
        Rasmus Rhein Helwigh added a comment -

        I've attatched the patch. I don't know if it's in the correct format. Please let med know if there's any problems.

        Show
        Rasmus Rhein Helwigh added a comment - I've attatched the patch. I don't know if it's in the correct format. Please let med know if there's any problems.
        Hide
        Samisa Abeysinghe added a comment -

        Fixed applying the patch

        Show
        Samisa Abeysinghe added a comment - Fixed applying the patch

          People

          • Assignee:
            Ruchith Udayanga Fernando
            Reporter:
            Rasmus Rhein Helwigh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development