Skip to content

Commit 6acae47

Browse files
committed
SWS-282 (Javadoc)
1 parent d8d790a commit 6acae47

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -180,32 +180,32 @@ public void setSecurementEncryptionKeyIdentifier(String securementEncryptionKeyI
180180

181181
/**
182182
* Defines which algorithm to use to encrypt the generated symmetric key. Currently WSS4J supports {@link
183-
* WSConstants#KEYTRANSPORT_RSA15} only.
183+
* WSConstants#KEYTRANSPORT_RSA15} and {@link WSConstants#KEYTRANSPORT_RSAOEP}.
184184
*/
185185
public void setSecurementEncryptionKeyTransportAlgorithm(String securementEncryptionKeyTransportAlgorithm) {
186186
handler.setOption(WSHandlerConstants.ENC_KEY_TRANSPORT, securementEncryptionKeyTransportAlgorithm);
187187
}
188188

189189
/**
190-
* Parameter to define which parts of the request shall be encrypted.
190+
* Property to define which parts of the request shall be encrypted.
191191
* <p/>
192-
* The value of this parameter is a list of semi-colon separated element names that identify the elements to
193-
* encrypt. An encryption mode specifier and a namespace identification, each inside a pair of curly brackets, may
194-
* preceed each element name.
192+
* The value of this property is a list of semi-colon separated element names that identify the elements to encrypt.
193+
* An encryption mode specifier and a namespace identification, each inside a pair of curly brackets, may precede
194+
* each element name.
195195
* <p/>
196196
* The encryption mode specifier is either <code>{Content}</code> or <code>{Element}</code>. Please refer to the W3C
197197
* XML Encryption specification about the differences between Element and Content encryption. The encryption mode
198198
* defaults to <code>Content</code> if it is omitted. Example of a list:
199199
* <pre>
200-
* &lt;parameter name="encryptionParts"
200+
* &lt;property name="securementEncryptionParts"
201201
* value="{Content}{http://example.org/paymentv2}CreditCard;
202202
* {Element}{}UserName" />
203203
* </pre>
204204
* The the first entry of the list identifies the element <code>CreditCard</code> in the namespace
205205
* <code>http://example.org/paymentv2</code>, and will encrypt its content. Be aware that the element name, the
206206
* namespace identifier, and the encryption modifier are case sensitive.
207207
* <p/>
208-
* The encryption modifier and the namespace identifier can be ommited. In this case the encryption mode defaults to
208+
* The encryption modifier and the namespace identifier can be omitted. In this case the encryption mode defaults to
209209
* <code>Content</code> and the namespace is set to the SOAP namespace.
210210
* <p/>
211211
* An empty encryption mode defaults to <code>Content</code>, an empty namespace identifier defaults to the SOAP
@@ -245,15 +245,9 @@ public void setSecurementEncryptionSymAlgorithm(String securementEncryptionSymAl
245245
* <p/>
246246
* Encryption only does not authenticate a user / sender, therefore it does not need a password.
247247
* <p/>
248-
* Placing the username of the encryption certficate in the WSDD is not a security risk, because the public key of
249-
* that certificate is used only.
248+
* Placing the username of the encryption certificate in the configuration file is not a security risk, because the
249+
* public key of that certificate is used only.
250250
* <p/>
251-
* The application may set this parameter using the following method:
252-
* <pre>
253-
* call.setProperty(WSHandlerConstants.ENCYRPTION_USER, "encryptionuser");
254-
* </pre>
255-
* However, the parameter in the WSDD deployment file overwrites the property setting (deployment setting overwrites
256-
* application setting).
257251
*/
258252
public void setSecurementEncryptionUser(String securementEncryptionUser) {
259253
handler.setOption(WSHandlerConstants.ENCRYPTION_USER, securementEncryptionUser);
@@ -297,20 +291,20 @@ public void setSecurementSignatureKeyIdentifier(String securementSignatureKeyIde
297291
}
298292

299293
/**
300-
* Parameter to define which parts of the request shall be signed.
294+
* Property to define which parts of the request shall be signed.
301295
* <p/>
302296
* Refer to {@link #setSecurementEncryptionParts(String)} for a detailed description of the format of the value
303297
* string.
304298
* <p/>
305-
* If this parameter is not specified the handler signs the SOAP Body by default.
299+
* If this property is not specified the handler signs the SOAP Body by default.
306300
* <p/>
307301
* The WS Security specifications define several formats to transfer the signature tokens (certificates) or
308302
* references to these tokens. Thus, the plain element name <code>Token</code> signs the token and takes care of the
309-
* different format.
303+
* different formats.
310304
* <p/>
311305
* To sign the SOAP body <b>and</b> the signature token the value of this parameter must contain:
312306
* <pre>
313-
* &lt;parameter name="signatureParts"
307+
* &lt;property name="securementSignatureParts"
314308
* value="{}{http://schemas.xmlsoap.org/soap/envelope/}Body; Token" />
315309
* </pre>
316310
* To specify an element without a namespace use the string <code>Null</code> as the namespace name (this is a case
@@ -323,6 +317,7 @@ public void setSecurementSignatureParts(String securementSignatureParts) {
323317
handler.setOption(WSHandlerConstants.SIGNATURE_PARTS, securementSignatureParts);
324318
}
325319

320+
/** Sets the username for securement username token or/and the alias of the private key for securement signature */
326321
public void setSecurementUsername(String securementUsername) {
327322
this.securementUsername = securementUsername;
328323
}
@@ -409,9 +404,9 @@ public void setSecurementMustUnderstand(boolean securementMustUnderstand) {
409404
* The value of this parameter is a list of element names that are added to the UsernameToken. The names of the list
410405
* a separated by spaces.
411406
* <p/>
412-
* The list may containe the names <code>nonce</code> and <code>created</code> only. Use this option if the password
413-
* type is <code>passwordText</code> and the handler shall add the <code>Nonce</code> and/or <code>Created</code>
414-
* elements.
407+
* The list may contain the names <code>Nonce</code> and <code>Created</code> only (case sensitive). Use this option
408+
* if the password type is <code>passwordText</code> and the handler shall add the <code>Nonce</code> and/or
409+
* <code>Created</code> elements.
415410
*/
416411
public void setSecurementUsernameTokenElements(String securementUsernameTokenElements) {
417412
handler.setOption(WSHandlerConstants.ADD_UT_ELEMENTS, securementUsernameTokenElements);
@@ -640,4 +635,4 @@ protected void cleanUp() {
640635
}
641636
}
642637
}
643-
}
638+
}

0 commit comments

Comments
 (0)