Skip to content

Commit 13cd867

Browse files
Track when last snapshot is created (#65768)
Encrypted snapshots are available on active PLATINUM and ENTERPRISE license modes. Listing encrypted repositories, as well as restoring and deleting encrypted snapshots is still permitted after the license expires or is downgraded, to avoid a data hostage situation. This PR updates the last usage time stamp of the encrypted snapshots feature to the creation time of the most recent encrypted snapshot.
1 parent ff4e02a commit 13cd867

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/repository-encrypted/src/main/java/org/elasticsearch/repositories/encrypted/EncryptedRepositoryPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public Repository create(RepositoryMetadata metadata, Function<String, Repositor
148148
if (false == (delegatedRepository instanceof BlobStoreRepository) || delegatedRepository instanceof EncryptedRepository) {
149149
throw new IllegalArgumentException("Unsupported delegate repository type [" + DELEGATE_TYPE_SETTING.getKey() + "]");
150150
}
151-
if (false == getLicenseState().isAllowed(XPackLicenseState.Feature.ENCRYPTED_SNAPSHOT)) {
151+
if (false == getLicenseState().checkFeature(XPackLicenseState.Feature.ENCRYPTED_SNAPSHOT)) {
152152
logger.warn(
153153
new ParameterizedMessage(
154154
"Encrypted snapshots are not allowed for the currently installed license [{}]."

0 commit comments

Comments
 (0)