Nested sentinel policies

Is it possible to run a certain policy only if a previous( dependent ) policy has passed .Say if we have some 2 policies and my second policy should run only if the first policy passes if not it can be ignored.
I understand I could write my logic differently to both run and check but wanted to see if we have this option ?

Sorry, @swetharamk. That is not currently possible.

One thing you could consider using would be Sentinel’s when predicate on your main rule. See Sentinel Language - Rules | Sentinel by HashiCorp. The policy would still be run in all cases, but the rule would only be evaluated if the boolean condition evaluated to true. One warning about this, however, is that if your policy used the approach of the third-generation examples of calling functions outside the main rule and then evaluating their return value inside the rule, using the when predicate would not reduce work done by Sentinel since the function would still be called. To avoid the policy doing any work, you would need to call the function from inside the main rule.

Roger Berlind
Global Technology Specialist