Skip to content

Commit 54dce71

Browse files
Changed Disabled mode to VerificationDisabled Mode (#469)
1 parent 57db947 commit 54dce71

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This project aims to adhere to [Semantic Versioning](http://semver.org/).
66
### Added
77
- [Allow for authentication to be disabled in CSE](https://github.com/joyent/java-manta/issues/465)
88
Client side encryption HMAC authentication of ciphertext for CTR/CBC ciphers
9-
can now be disabled. The default authentication mode continues to be
9+
can now be in VerificationDisabled mode. The default authentication mode continues to be
1010
Mandatory.
1111
### Changed
1212
- [Deprecate Jobs Multipart implementation and disable integration tests](https://github.com/joyent/java-manta/issues/459)

USAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Note: Dynamic Updates marked with an asterisk (*) are enabled by the `AuthAwareC
199199
encryption is enabled.
200200
* `manta.encryption_auth_mode` (**MANTA_ENCRYPTION_AUTH_MODE**)
201201
[EncryptionAuthenticationMode](/java-manta-client-unshaded/src/main/java/com/joyent/manta/config/EncryptionAuthenticationMode.java)
202-
enum type indicating that authenticating encryption verification is either `Mandatory`, `Optional` or `Disabled`.
202+
enum type indicating that authenticating encryption verification is either `Mandatory`, `Optional` or `VerificationDisabled`.
203203
* `manta.encryption_key_path` (**MANTA_ENCRYPTION_KEY_PATH**)
204204
The path on the local filesystem or a URI understandable by the JVM indicating the
205205
location of the private key used to perform client-side encryption. If this value is

java-manta-client-unshaded/src/main/java/com/joyent/manta/config/EncryptionAuthenticationMode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public enum EncryptionAuthenticationMode {
2929
Mandatory,
3030

3131
/**
32-
* Disabled mode will disable ciphertext verification upon decryption.
32+
* VerificationDisabled mode will disable ciphertext verification upon decryption.
3333
* HMACs will still be created when encrypting.
3434
*/
35-
Disabled;
35+
VerificationDisabled;
3636

3737
/**
3838
* The default encryption object authentication mode (Mandatory).

java-manta-client-unshaded/src/main/java/com/joyent/manta/http/EncryptionHttpHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public MantaObjectInputStream httpRequestAsInputStream(final HttpUriRequest requ
283283

284284
/* Errors when we attempt to do an HTTP range request when authentication
285285
* mode is set to Mandatory because HTTP range requests will only work
286-
* with authentication disabled. When you do a range request, it gets
286+
* with authentication in verification disabled mode. When you do a range request, it gets
287287
* arbitrary bytes from the ciphertext of the source object which means
288288
* that you will not be able to verify the ciphertext using the HMAC
289289
* because you don't have all of the bytes available. */
@@ -380,9 +380,9 @@ public MantaObjectInputStream httpRequestAsInputStream(final HttpUriRequest requ
380380
secretKey, false, initialSkipBytes, plaintextRangeLength, unboundedEnd);
381381
} else {
382382
/* We skip authentication on the ciphertext only when it is explicitly
383-
* disabled. For the Mandatory and Optional modes, it is enabled. */
383+
* in verification disabled mode. For the Mandatory and Optional modes, it is enabled. */
384384
final boolean authenticateCiphertext =
385-
!encryptionAuthenticationMode.equals(EncryptionAuthenticationMode.Disabled);
385+
!encryptionAuthenticationMode.equals(EncryptionAuthenticationMode.VerificationDisabled);
386386
return new MantaEncryptedObjectInputStream(rawStream, this.cipherDetails,
387387
secretKey, authenticateCiphertext);
388388
}

java-manta-client-unshaded/src/test/java/com/joyent/manta/config/SystemSettingsConfigContextTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ public void authenticationModeCanBeSetToOptional() {
141141
input, MANTA_ENCRYPTION_AUTHENTICATION_MODE_KEY));
142142
}
143143

144-
public void authenticationModeCanBeSetToDisabled() {
145-
final String input = "Disabled";
146-
final EncryptionAuthenticationMode expected = EncryptionAuthenticationMode.Disabled;
144+
public void authenticationModeCanBeSetToVerificationDisabled() {
145+
final String input = "VerificationDisabled";
146+
final EncryptionAuthenticationMode expected = EncryptionAuthenticationMode.VerificationDisabled;
147147

148148
final Properties properties = new Properties();
149149
properties.setProperty(MANTA_ENCRYPTION_AUTHENTICATION_MODE_KEY, input);

0 commit comments

Comments
 (0)