Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-796

Ability to specify SAML properties file in Wss4jInterceptor

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.2
    • Component/s: Security
    • Labels:
      None

      Description

      Performing the SAMLTokenSigned securement action requires that the samlPropFile option has been set on the Wss4jHandler object. A setter should be exposed on the Wss4jInterceptor to set that option.

      1. AbstractSAMLCallbackHandler.java
        7 kB
        jaminh
      2. saml.properties
        0.6 kB
        jaminh
      3. SAML2CallbackHandler.java
        4 kB
        jaminh

        Issue Links

          Activity

          jaminh jaminh created issue -
          Hide
          jaminh jaminh added a comment -

          Pulled this from the Wss4j JUnit tests

          Show
          jaminh jaminh added a comment - Pulled this from the Wss4j JUnit tests
          jaminh jaminh made changes -
          Field Original Value New Value
          Attachment AbstractSAMLCallbackHandler.java [ 20541 ]
          Hide
          jaminh jaminh added a comment -

          Modified version pulled from Wss4j JUnits

          Show
          jaminh jaminh added a comment - Modified version pulled from Wss4j JUnits
          jaminh jaminh made changes -
          Attachment SAML2CallbackHandler.java [ 20542 ]
          Hide
          jaminh jaminh added a comment -

          Example SAML properties. Notice you have to define the Crypto used for the SAML assertion in the SAML properties file.

          Show
          jaminh jaminh added a comment - Example SAML properties. Notice you have to define the Crypto used for the SAML assertion in the SAML properties file.
          jaminh jaminh made changes -
          Attachment saml.properties [ 20543 ]
          Hide
          jaminh jaminh added a comment -

          After adding a setter for the SAML properties file to the Wss4jSecurityInterceptor I was able to successfully create a soap message with a signed SAML token. Creating a SAML token requires a SAML properties file and a SAML CallbackHandler so I will include examples of the ones I used for testing.

          Here is the necessary setter method.
          /**

          • Set the location of the SAML properties file.
          • @param location the location of the SAML properties file
            */
            public void setSamlPropertiesFile(String location)
            {
            this.handler.setOption(WSHandlerConstants.SAML_PROP_FILE, location);
            }
          Show
          jaminh jaminh added a comment - After adding a setter for the SAML properties file to the Wss4jSecurityInterceptor I was able to successfully create a soap message with a signed SAML token. Creating a SAML token requires a SAML properties file and a SAML CallbackHandler so I will include examples of the ones I used for testing. Here is the necessary setter method. /** Set the location of the SAML properties file. @param location the location of the SAML properties file */ public void setSamlPropertiesFile(String location) { this.handler.setOption(WSHandlerConstants.SAML_PROP_FILE, location); }
          arjen.poutsma Arjen Poutsma made changes -
          Fix Version/s 2.1.2 [ 13606 ]
          arjen.poutsma Arjen Poutsma made changes -
          Assignee Arjen Poutsma [ arjen.poutsma ]
          arjen.poutsma Arjen Poutsma made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          arjen.poutsma Arjen Poutsma logged work - 03/Dec/12 6:23 AM
          • Time Spent:
            26m
             
            <No comment>
          arjen.poutsma Arjen Poutsma made changes -
          Worklog Id 29814 [ 29814 ]
          Time Spent 26m [ 1560 ]
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Property added!

          Show
          arjen.poutsma Arjen Poutsma added a comment - Property added!
          arjen.poutsma Arjen Poutsma made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          arjen.poutsma Arjen Poutsma made changes -
          Link This issue is related to SWS-815 [ SWS-815 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          79d 21h 39m 1 Arjen Poutsma 03/Dec/12 5:57 AM
          In Progress In Progress Resolved Resolved
          28m 10s 1 Arjen Poutsma 03/Dec/12 6:25 AM

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              jaminh jaminh
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 26m
                26m