[SWS-796] Ability to specify SAML properties file in Wss4jInterceptor Created: 14/Sep/12  Updated: 05/Dec/12  Resolved: 03/Dec/12

Status: Resolved
Project: Spring Web Services
Component/s: Security
Affects Version/s: None
Fix Version/s: 2.1.2

Type: Improvement Priority: Minor
Reporter: jaminh Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 26m
Original Estimate: Not Specified

Attachments: Text File AbstractSAMLCallbackHandler.java     Text File SAML2CallbackHandler.java     File saml.properties    
Issue Links:
is related to SWS-815 Error loading SAML properties file Resolved


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.

Comment by jaminh [ 08/Oct/12 ]

Pulled this from the Wss4j JUnit tests

Comment by jaminh [ 08/Oct/12 ]

Modified version pulled from Wss4j JUnits

Comment by jaminh [ 08/Oct/12 ]

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

Comment by jaminh [ 08/Oct/12 ]

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);
Comment by Arjen Poutsma [ 03/Dec/12 ]

Property added!

Generated at Wed Oct 17 07:38:02 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.