diff --git a/security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java b/security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java index 58c610c1..b0b42da6 100755 --- a/security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java +++ b/security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java @@ -180,24 +180,24 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl /** * Defines which algorithm to use to encrypt the generated symmetric key. Currently WSS4J supports {@link - * WSConstants#KEYTRANSPORT_RSA15} only. + * WSConstants#KEYTRANSPORT_RSA15} and {@link WSConstants#KEYTRANSPORT_RSAOEP}. */ public void setSecurementEncryptionKeyTransportAlgorithm(String securementEncryptionKeyTransportAlgorithm) { handler.setOption(WSHandlerConstants.ENC_KEY_TRANSPORT, securementEncryptionKeyTransportAlgorithm); } /** - * Parameter to define which parts of the request shall be encrypted. + * Property to define which parts of the request shall be encrypted. *
- * The value of this parameter is a list of semi-colon separated element names that identify the elements to - * encrypt. An encryption mode specifier and a namespace identification, each inside a pair of curly brackets, may - * preceed each element name. + * The value of this property is a list of semi-colon separated element names that identify the elements to encrypt. + * An encryption mode specifier and a namespace identification, each inside a pair of curly brackets, may precede + * each element name. * * The encryption mode specifier is either{Content} or {Element}. Please refer to the W3C
* XML Encryption specification about the differences between Element and Content encryption. The encryption mode
* defaults to Content if it is omitted. Example of a list:
*
- * <parameter name="encryptionParts"
+ * <property name="securementEncryptionParts"
* value="{Content}{http://example.org/paymentv2}CreditCard;
* {Element}{}UserName" />
*
@@ -205,7 +205,7 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
* http://example.org/paymentv2, and will encrypt its content. Be aware that the element name, the
* namespace identifier, and the encryption modifier are case sensitive.
*
- * The encryption modifier and the namespace identifier can be ommited. In this case the encryption mode defaults to
+ * The encryption modifier and the namespace identifier can be omitted. In this case the encryption mode defaults to
* Content and the namespace is set to the SOAP namespace.
*
* An empty encryption mode defaults to Content, an empty namespace identifier defaults to the SOAP
@@ -245,15 +245,9 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
*
* Encryption only does not authenticate a user / sender, therefore it does not need a password.
*
- * Placing the username of the encryption certficate in the WSDD is not a security risk, because the public key of
- * that certificate is used only.
+ * Placing the username of the encryption certificate in the configuration file is not a security risk, because the
+ * public key of that certificate is used only.
*
- * The application may set this parameter using the following method:
- * - * call.setProperty(WSHandlerConstants.ENCYRPTION_USER, "encryptionuser"); - *- * However, the parameter in the WSDD deployment file overwrites the property setting (deployment setting overwrites - * application setting). */ public void setSecurementEncryptionUser(String securementEncryptionUser) { handler.setOption(WSHandlerConstants.ENCRYPTION_USER, securementEncryptionUser); @@ -297,20 +291,20 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl } /** - * Parameter to define which parts of the request shall be signed. + * Property to define which parts of the request shall be signed. * * Refer to {@link #setSecurementEncryptionParts(String)} for a detailed description of the format of the value * string. * - * If this parameter is not specified the handler signs the SOAP Body by default. + * If this property is not specified the handler signs the SOAP Body by default. * * The WS Security specifications define several formats to transfer the signature tokens (certificates) or * references to these tokens. Thus, the plain element name
Token signs the token and takes care of the
- * different format.
+ * different formats.
*
* To sign the SOAP body and the signature token the value of this parameter must contain:
*
- * <parameter name="signatureParts"
+ * <property name="securementSignatureParts"
* value="{}{http://schemas.xmlsoap.org/soap/envelope/}Body; Token" />
*
* To specify an element without a namespace use the string Null as the namespace name (this is a case
@@ -323,6 +317,7 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
handler.setOption(WSHandlerConstants.SIGNATURE_PARTS, securementSignatureParts);
}
+ /** Sets the username for securement username token or/and the alias of the private key for securement signature */
public void setSecurementUsername(String securementUsername) {
this.securementUsername = securementUsername;
}
@@ -409,9 +404,9 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
* The value of this parameter is a list of element names that are added to the UsernameToken. The names of the list
* a separated by spaces.
*
- * The list may containe the names nonce and created only. Use this option if the password
- * type is passwordText and the handler shall add the Nonce and/or Created
- * elements.
+ * The list may contain the names Nonce and Created only (case sensitive). Use this option
+ * if the password type is passwordText and the handler shall add the Nonce and/or
+ * Created elements.
*/
public void setSecurementUsernameTokenElements(String securementUsernameTokenElements) {
handler.setOption(WSHandlerConstants.ADD_UT_ELEMENTS, securementUsernameTokenElements);
@@ -640,4 +635,4 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
}
}
}
-}
\ No newline at end of file
+}