-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delete assigned identities when deleting policy
This commit changes the implementation of the `/v1/policy/delete` API. Deleting a policy used to just remove the policy with the specified name from the policy set. When there were identities assigned to this particular policy then identities would become "stale"/"dangling". If the KES server would encounter a request from an identity that would be "assigned" to a deleted policy it would deny any access, as it would if the identity would not be assigned to a policy. This commit changes the behavior of `/v1/policy/delete` such that deleting a policy also removes all assigned identities from the KES server. This behavior is save because: - An identity can be assigned to (at most) one policy at one point in time. - An assigned identity is just a mapping from (external) identity to a policy. It does not have any state whatsoever. It's worth noting that assigning an identity to a policy and re-assigning an identity from one (potentially deleted) policy to another policy are the exact same operations. Therefore, no state gets lost when removing the assigned identities once a policy gets deleted - except for which identities "belong" together based on being assigned to the same policy. However, this information would be lost anyway on e.g. KES server restart and cannot be assumed to be persistent. Also, it is anyway not possible to assign an identity to a non-existing policy via the `/v1/identity/assign` API. *** From a user perspective this change has the following implications: 1. Now, an identity is always assigned to exactly one (existing) policy. 2. Setting a policy and deleting a policy are not inverse operations anymore.
- Loading branch information
1 parent
c5c1d49
commit bb67968
Showing
5 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters