Improve the configurability of the SAML signature creation in AssertionWrapper
------------------------------------------------------------------------------

                 Key: WSS-308
                 URL: https://issues.apache.org/jira/browse/WSS-308
             Project: WSS4J
          Issue Type: Improvement
          Components: WSS4J Core
    Affects Versions: 1.6.2
            Reporter: Anubhav Sharma
            Assignee: Colm O hEigeartaigh


The AssertionWrapper class is used in WSS4J to create a SAML Assertion
via a CallbackHandler. It has a method that can be used to sign the SAML
Assertion:

     public void signAssertion(
         String issuerKeyName,
         String issuerKeyPassword,
         Crypto issuerCrypto,
         boolean sendKeyValue
     )

The signature and canonicaliazation algorithms currently used are hard coded as 
showed by the following code snippet:

signature.setCanonicalizationAlgorithm(
             SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS
         );

String sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1;
String pubKeyAlgo = issuerCerts[0].getPublicKey().getAlgorithm();

  if (pubKeyAlgo.equalsIgnoreCase("DSA")) {
         sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_DSA;
}

There should be a way for the user to be able to configure these algorithms



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to