Skip to content

Commit

Permalink
Track when last snapshot is created (#65768)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
albertzaharovits authored Dec 23, 2020
1 parent ff4e02a commit 13cd867
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public Repository create(RepositoryMetadata metadata, Function<String, Repositor
if (false == (delegatedRepository instanceof BlobStoreRepository) || delegatedRepository instanceof EncryptedRepository) {
throw new IllegalArgumentException("Unsupported delegate repository type [" + DELEGATE_TYPE_SETTING.getKey() + "]");
}
if (false == getLicenseState().isAllowed(XPackLicenseState.Feature.ENCRYPTED_SNAPSHOT)) {
if (false == getLicenseState().checkFeature(XPackLicenseState.Feature.ENCRYPTED_SNAPSHOT)) {
logger.warn(
new ParameterizedMessage(
"Encrypted snapshots are not allowed for the currently installed license [{}]."
Expand Down

0 comments on commit 13cd867

Please sign in to comment.