Policy to only allow action being called within another action

Let’s say I have resource A and B, I have an update action action_1 in resource A that has a change which will call an update action action_2 from resource B.

Is there some way to add to the action action_2 from resource B policy so that it can only authorize if called from that change?

No, but you can set some context on that particular call and then use that context in a simple check in the policy on resource B.

1 Like