Skip to content

Commit f9aa262

Browse files
author
kevin.w.wall
committed
Removed getCipherTextImplementation() method. Changed MIC to MAC in method name.
Lots of Javadoc cleanup and corrections.
1 parent 34203fb commit f9aa262

1 file changed

Lines changed: 31 additions & 15 deletions

File tree

src/main/java/org/owasp/esapi/SecurityConfiguration.java

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.util.regex.Pattern;
2424

2525
/**
26-
* The SecurityConfiguration interface stores all configuration information
26+
* The {@code SecurityConfiguration} interface stores all configuration information
2727
* that directs the behavior of the ESAPI implementation.
2828
* <br><br>
2929
* Protection of this configuration information is critical to the secure
@@ -33,11 +33,16 @@
3333
* <br><br>
3434
* Please note that adding another layer of encryption does not make the
3535
* attackers job much more difficult. Somewhere there must be a master "secret"
36-
* that is stored unencrypted on the application platform. Creating another
37-
* layer of indirection doesn't provide any real additional security. Its up to the
38-
* reference implementation to decide whether this file should be encrypted or not.
39-
* The ESAPI reference implementation (DefaultSecurityConfiguration.java) does not encrypt
40-
* its properties file.
36+
* that is stored unencrypted on the application platform (unless you are
37+
* willing to prompt for some passphrase when you application starts or insert
38+
* a USB thumb drive or an HSM card, etc., in which case this master "secret"
39+
* it would only be in memory). Creating another layer of indirection provides
40+
* additional obfuscation, but doesn't provide any real additional security.
41+
* It's up to the reference implementation to decide whether this file should
42+
* be encrypted or not.
43+
* <br><br>
44+
* The ESAPI reference implementation (DefaultSecurityConfiguration.java) does
45+
* <i>not</i> encrypt its properties file.
4146
*
4247
* @author Jeff Williams (jeff.williams .at. aspectsecurity.com) <a
4348
* href="http://www.aspectsecurity.com">Aspect Security</a>
@@ -86,11 +91,6 @@ public interface SecurityConfiguration {
8691
* Returns the fully qualified classname of the ESAPI Encryption implementation.
8792
*/
8893
public String getEncryptionImplementation();
89-
90-
/**
91-
* Returns the fully qualified classname of the ESAPI CipherText implementation.
92-
*/
93-
public String getCipherTextImplementation();
9494

9595
/**
9696
* Returns the fully qualified classname of the ESAPI Validation implementation.
@@ -257,20 +257,36 @@ public interface SecurityConfiguration {
257257
*/
258258
public String setCipherTransformation(String cipherXform);
259259

260-
// TODO - DISCUSS: Where should this web page go? Maybe with the Javadoc? But where?
260+
// TODO - DISCUSS: Where should this web page (below) go? Maybe with the Javadoc? But where?
261261
// Think it makes more sense as part of the release notes, but OTOH, I
262262
// really don't want to rewrite this as a Wiki page either.
263263
/**
264264
* Determines whether the {@code CipherText} should be used with a Message
265-
* Integrity Code (MIC). Generally this makes for a more robust cryptographic
265+
* Authentication Code (MAC). Generally this makes for a more robust cryptographic
266266
* scheme, but there are some minor performance implications.
267267
* For further details, see the "Advanced Usage" section of
268268
* <a href="http://www.owasp.org/ESAPI_2.0_ReleaseNotes_CryptoChanges.html">
269-
* Why Is OWASP Changing ESAPI Encryption?</a>.
269+
* "Why Is OWASP Changing ESAPI Encryption?"</a>.
270270
* @return {@code true} if a MIC should be used, otherwise {@code false}.
271271
*/
272-
public boolean useMICforCipherText();
272+
public boolean useMACforCipherText();
273273

274+
/**
275+
* Indicates whether the {@code PlainText} objects may be overwritten after
276+
* they have been encrypted. Generally this is a good idea, especially if
277+
* your VM is shared by multiple applications (e.g., multiple applications
278+
* running in the same J2EE container) or if there is a possibility that
279+
* your VM may leave a core dump (say because it is running non-native
280+
* Java code.
281+
* <p>
282+
* Controlled by the property {@code Encryptor.PlainText.overwrite} in
283+
* the {@code ESAPI.properties} file.
284+
* </p>
285+
* @return True if it is OK to overwrite the {@code PlainText} objects
286+
* after encrypting, false otherwise.
287+
*/
288+
public boolean overwritePlainText();
289+
274290
/**
275291
* Get a string indicating how to compute an Initialization Vector (IV).
276292
* Currently supported modes are "random" to generate a random IV or

0 commit comments

Comments
 (0)