-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
comp:policyPolicy Configuration ( attributes, subject mappings, resource mappings, kas registry)Policy Configuration ( attributes, subject mappings, resource mappings, kas registry)
Description
Background
The relation of Attribute Values to Subject Condition Sets (SCSs) is via Subject Mappings (SMs). While every Subject Mapping relates exactly one Attribute Value and one Subject Condition Sets, SCSs can be reused across multiple SMs and Attribute Values. This is by design.
With the new Unsafe service functionality, it is now evident that there is a use case for pruning Subject Condition Sets that are not related to any Subject Mappings in a platform. They are not cascadingly deleted like their potentially linked Subject Mappings because of the many to one relationship, and therefore can be left stored unnecessarily.
Acceptance Criteria
- new protos are added for a
DeleteUnmappedRPC on Subject Condition Sets as a safe behavior - logic is added to remove any SCSs that are stranded and not on SMs
- sqlc is utilized for the new DB queries now that it is unblocked (related to Explore using sqlc instead of squirrel for policy #864)
- integration tests are added to validate this change
Metadata
Metadata
Assignees
Labels
comp:policyPolicy Configuration ( attributes, subject mappings, resource mappings, kas registry)Policy Configuration ( attributes, subject mappings, resource mappings, kas registry)