Important
notice: starting from kubewarden release 1.32.0, all code from this repository has been merged into github.com/kubewarden/policies, which is now a monorepo containing policies. please refer to that repository for future updates and development. this repository is now archived. development continues in the new location.
This is a waPC test policy that mutates raw requests.
The policy accepts requests in the following format:
{
"request": {
"user": "tonio"
"action": "eats",
"resource": "banana",
}
}The policy mutates the resource to a default resource defined by the settings if the resource is contained in the list of forbidden resources.
This policy has configurable settings:
forbiddenResources: a list of resources that cannot be accessed by the user.defaultResource: the default resource to use if a resource is forbidden.