Policies model business requirements into authorization logic. They're built by business analysts who understand your application requirements and the regulations you’re complying with.
Let’s add a policy that will deny payments over $10,000 USD.
On the Policies tab, you'll see the default policy set called Policies. Policy sets are like folders that you can use to group and organize policies. You’re going to add your policy to the default policy set.
- Select the root policy set Policies, then click the + icon and select Add Policy.
For the policy Name, enter Payment
The red dot on the right indicates that there are unsaved changes in the policy.
Now you need a rule that defines the policy logic.
Click + Add Rule.
To keep things simple, leave out the description for now. When you develop your own policies, you can enter a description to document the underlying business case for the rule or the specific business policy the rule is enforcing.
- For the rule Name, enter Deny payments over 10000 USD.
Because you want to deny certain payments, select Deny
for the Effect.
Let’s make a comparison to determine if the payment amount is over $10,000 USD.
Click the hamburger menu next to the Name field and
select Add "Applies When".
- In the Applies When section, click + Comparison.
- In Select an attribute, select Amount, which is the attribute that you added to the Trust Framework.
- For the comparator, select Greater Than Or Equal.
- For the constant value, enter 10000.
Your rule looks like this.
Click Save changes.
Your new policy is displayed in the default policy set.