Immutable resource retention rules for resource recovery service
Provided is a system for facilitating recovery of deleted computing resources in a cloud network environment. A centralized resource recovery service may communicate with a plurality of resource management services that are each configured to create, modify, or delete their respective computing resources such as storage volumes, databases, and compute instances. The resource recovery service may allow creation of immutable resource retention rules that are, under certain conditions, unable to be deleted or modified, even by an administrative user who created such retention rules. Such immutable retention rules may be used to thwart malicious attempts to permanently delete resources by deleting the retention rules that govern such resources. Since such attempts to delete such immutable retention rules would fail, the retention rules would continue to apply and allow deleted resources to be placed in a recoverable state according to the retention rules.
1 . A cloud provider system comprising:
a plurality of resource management services each comprising computer hardware and configured to manage creation and deletion of respective resource types of user resources; and
a resource recovery service comprising computer hardware and in network communication with the plurality of resource management services, wherein the network resource recovery service is configured to at least:
receive, from an administrative user of the resource recovery service, a first resource retention rule that specifies to place resources of a resource type in a recoverable state upon deletion and further specifies a resource retention period for which resources of the resource type are to be kept in the recoverable state before permanent deletion;
configure the first resource retention rule such that the first resource retention rule is immutable;
receive, from the administrative user, a first request to delete the first resource retention rule;
in response to determining that the first resource retention rule is immutable, reject the first request to delete the first resource retention rule;
receive a request to delete a particular resource of the resource type from a resource management service of the plurality of resource management services;
determine that the particular resource matches the first resource retention rule specified by the administrative user; and
output, to the resource management service, an instruction to place the particular resource in a recovery bin.
2 . The cloud provider system of claim 1 , wherein the resource recovery service is further configured to:
receive, from the administrative user, a request to delete a second resource retention rule; and
in response to determining that the second resource retention rule is not immutable, cause the second resource retention rule to be deleted such that resources of a particular resource type specified by the second resource retention rule would no longer be kept in a recoverable state upon deletion.
3 . The cloud provider system of claim 2 , wherein the resource recovery service is further configured to:
receive, from the administrative user, a request to remove immutability from the first resource retention rule;
subsequent to receiving the request to remove immutability from the first resource retention rule, receive, from the administrative user, a second request to delete the first resource retention rule such that resources of the resource type specified by the first resource retention rule would no longer be kept in the recoverable state upon deletion; and
in response to determining that a grace period associated with removing immutability from the first resource retention rule has not yet expired, reject the second request to delete the first resource retention rule.
4 . The cloud provider system of claim 1 , wherein the plurality of resource management services comprises one or more of a database service configured to create or delete database tables, a block store service configured to create or delete data storage volumes, a snapshot service configured to create or delete snapshots of data storage volumes, an object storage service configured to create or delete data storage buckets, or a compute service configured to create or delete compute instances.
5 . A computer-implemented method comprising:
receiving a request to create a first resource retention rule configured to cause resources satisfying a condition to be placed in a recoverable state upon deletion for a resource retention period before permanent deletion;
configuring the first resource retention rule for a resource recovery service such that the first resource retention rule is unable to be deleted or modified;
receiving a first request to delete the first resource retention rule; and
in response to determining that the first resource retention rule is in a locked state, rejecting the first request to delete the first resource retention rule.
6 . The computer-implemented method of claim 5 , further comprising:
receiving a request to delete a particular resource satisfying the condition from a resource management service in networked communication with the resource recovery service;
determining that the particular resource matches the first resource retention rule managed by the resource recovery service; and
outputting, to the resource management service, an instruction to place the particular resource in a recoverable state.
7 . The computer-implemented method of claim 5 , further comprising:
receiving a request to delete a second resource retention rule; and
in response to determining that the second resource retention rule is not in a locked state, deleting the second resource retention rule such that resources satisfying a condition specified by the second resource retention rule would no longer be kept in a recoverable state upon deletion.
8 . The computer-implemented method of claim 5 , further comprising:
subsequent to receiving the first request to delete the first resource retention rule, receiving a request to delete a particular resource from a resource management service in networked communication with the resource recovery service;
determining that the particular resource satisfies the condition specified by the first resource retention rule managed by the resource recovery service; and
outputting, to the resource management service, an instruction to place the particular resource in a recoverable state.
9 . The computer-implemented method of claim 5 , wherein the request to create the first resource retention rule and the request to delete the first resource retention rule are associated with the same set of administrative user credentials.
10 . The computer-implemented method of claim 5 , wherein the request to create the first resource retention rule and the request to delete the first resource retention rule are each associated with a different set of user credentials.
11 . The computer-implemented method of claim 5 , further comprising:
receiving a request to remove immutability from the first resource retention rule;
subsequent to receiving the request to remove immutability from the first resource retention rule, receiving a second request to delete the first resource retention rule such that resources satisfying the condition specified by the first resource retention rule would no longer be kept in the recoverable state upon deletion; and
in response to determining that a grace period associated with removing immutability from the first resource retention rule has not yet expired, rejecting the second request to delete the first resource retention rule.
12 . The computer-implemented method of claim 11 , further comprising allowing the grace period associated with removing immutability from the first resource retention rule to elapse prior to removing immutability from the first resource retention rule.
13 . A non-transitory computer-readable medium storing instructions that, when executed by a computing system within a cloud provider network, cause the computing system to perform operations comprising:
receiving a request to create a first resource retention rule configured to cause resources satisfying a condition to be placed in a recoverable state upon deletion for a resource retention period before permanent deletion;
configuring the first resource retention rule for a resource recovery service such that the first resource retention rule is unable to be deleted or modified;
receiving a first request to delete the first resource retention rule; and
in response to determining that the first resource retention rule is in a locked state, rejecting the first request to delete the first resource retention rule.
14 . The non-transitory computer-readable medium of claim 13 , storing further instructions that, when executed by the computing system, cause the computing system to perform operations comprising:
receiving a request to delete a particular resource satisfying the condition from a resource management service in networked communication with the resource recovery service;
determining that the particular resource matches the first resource retention rule managed by the resource recovery service; and
outputting, to the resource management service, an instruction to place the particular resource in a recoverable state.
15 . The non-transitory computer-readable medium of claim 13 , storing further instructions that, when executed by the computing system, cause the computing system to perform operations comprising:
receiving a request to delete a second resource retention rule; and
in response to determining that the second resource retention rule is not in a locked state, deleting the second resource retention rule such that resources satisfying a condition specified by the second resource retention rule would no longer be kept in a recoverable state upon deletion.
16 . The non-transitory computer-readable medium of claim 13 , storing further instructions that, when executed by the computing system, cause the computing system to perform operations comprising:
subsequent to receiving the first request to delete the first resource retention rule, receiving a request to delete a particular resource from a resource management service in networked communication with the resource recovery service;
determining that the particular resource satisfies the condition specified by the first resource retention rule managed by the resource recovery service; and
outputting, to the resource management service, an instruction to place the particular resource in a recoverable state.
17 . The non-transitory computer-readable medium of claim 13 , wherein the request to create the first resource retention rule and the first request to delete the first resource retention rule are associated with the same set of administrative user credentials.
18 . The non-transitory computer-readable medium of claim 13 , wherein the request to create the first resource retention rule and the first request to delete the first resource retention rule are each associated with a different set of user credentials.
19 . The non-transitory computer-readable medium of claim 13 , storing further instructions that, when executed by the computing system, cause the computing system to perform operations comprising:
receiving a request to remove immutability from the first resource retention rule;
subsequent to receiving the request to remove immutability from the first resource retention rule, receiving a second request to delete the first resource retention rule such that resources satisfying the condition specified by the first resource retention rule would no longer be kept in the recoverable state upon deletion; and
in response to determining that a grace period associated with removing immutability from the first resource retention rule has not yet expired, rejecting the second request to delete the first resource retention rule.
20 . The non-transitory computer-readable medium of claim 19 , storing further instructions that, when executed by the computing system, cause the computing system to perform operations comprising allowing the grace period associated with removing immutability from the first resource retention rule to elapse prior to removing immutability from the first resource retention rule.