Only attribute based policy + support for criteria in policies. #5760
khushboobhatia01
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
In order to achieve the same thing today, you would need a separate policy for every action that has the target attribute, right? With the action-based criteria, I'm not sure Should the criteria be required, so that policies are not overly broad? Could you show an example of action metadata that matches your policy example? I'm having a hard time picturing what that criteria matches. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Today Stackstorm provides a way to create policies on an action or combination of action and attributes. While working on a use case we discovered a need for an only attribute based policy.
Example: We have a host/server in our parameters and we want to control the concurrency of execution per host. In this case we don't have any specific action, but we have a specific hostname for which we want to achieve the concurrency.
To achieve this we implemented concurrency.attr_only policy type support along with an ability to define criteria. Similar to how we can define criteria for rule, we will be able to define criteria for policies with a difference that criteria in rule is based on trigger payload, criteria in policies will be based on action metadata. Since concurrency.attr_only policy type will be pretty generic, we wanted a way to control on which set of actions this policy should be applicable.
Below is an example for one such policy. Using this policy we can limit the action execution concurrency for mutating actions (Having role tag as RW) for a particular host to 1. This will be applicable for all actions having RW tag.
We already have POC implementation. However, we wanted some feedback if this will be helpful and useful feature. Thanks! :)
Beta Was this translation helpful? Give feedback.
All reactions