Skip to content

Commit

Permalink
fix: drop setting min_available_version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell Williams committed Mar 26, 2024
1 parent fafb022 commit 3a40761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ final VaultTransitKey loadKey() {
}

/**
* Set the minimum decryption key, minimum encryption key and minimum available version
* Set the minimum decryption key and minimum encryption key
*
* <p>Does not raise exception on failure.
*
Expand All @@ -200,8 +200,7 @@ final void setMinVersion(int minVersion) {
try {
VaultResponse response = logicalWriteWithReauthentication("transit/keys/" + configuration.getKeyName() + "/config", ImmutableMap.of(
"min_decryption_version", minVersion,
"min_encryption_version", minVersion,
"min_available_version", minVersion));
"min_encryption_version", minVersion));
validateVaultOperationResponse(response, "Unable to update vault key");
} catch (RuntimeException e) {
LOGGER.warn("Unable to update vault key", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ class VaultEncryptionServiceTest extends Specification {
subject.rotateKeys()
verify(logicalDriver).write("transit/keys/" + config.getKeyName() + "/rotate", null)
verify(logicalDriver).write("transit/keys/" + config.getKeyName() + "/config", ImmutableMap.of(
"min_available_version", 3,
"min_decryption_version", 3,
"min_encryption_version", 3))

Expand Down Expand Up @@ -506,7 +505,6 @@ class VaultEncryptionServiceTest extends Specification {

subject.setMinVersion(12)
verify(logicalDriver).write("transit/keys/" + config.getKeyName() + "/config", ImmutableMap.of(
"min_available_version", 12,
"min_decryption_version", 12,
"min_encryption_version", 12))

Expand Down

0 comments on commit 3a40761

Please sign in to comment.