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. SAML2CallbackHandler.java
        4 kB
        jaminh
      2. saml.properties
        0.6 kB
        jaminh
      3. AbstractSAMLCallbackHandler.java
        7 kB
        jaminh

        Issue Links

          Activity

          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
          Hide
          jaminh jaminh added a comment -

          Modified version pulled from Wss4j JUnits

          Show
          jaminh jaminh added a comment - Modified version pulled from Wss4j JUnits
          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.
          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); }
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Property added!

          Show
          arjen.poutsma Arjen Poutsma added a comment - Property added!

            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