🪚Customize policy.json
how to setup the policy.json / rules configuration for Ira
Sample policy.json
Visit: https://coauth.dev/ira/ira-policy.json
Explanation
resource_groups: You categorize the URLs into groups and give the group a name (alpha numeric and underscores only. All Urls defined in the resource groups are regex pattern. Visit https://regex101.com/ to test your pattern
conditions: This is an array / list of conditions that you want to apply on the resources that you have defined earlier.
conditions-> actions: The name explains what it does. The possible values expected here are
block_page (blocking of page)
disclaimer (show popup)
sticky (show sticky banner at top or bottom)
block_copy (block copy)
block_paste (block paste)
block_cut (block cut)
conditions->props->message: Defines the message to be shown to users on that action (title, description).
conditions->props->message->alertType: Possible values are
danger (red)
warning (light orange)
info (light blue)
success (green)
conditions->props->message->location: Defines the location of message to be shown. Possible values are;
top
bottom
*For disclaimer, the value has no effect.
conditions->resources_include: Add the resource group names that you defined earlier, for which policy should be applicable
One exception for value / constant here is <all_urls>, means that this policy will apply to any URL fired from browser except the ones mentioned in resources_exclude.
conditions->resources_exclude: Add the resource group names that you want to exclude from this policy
Ideal setup for organizations
Define resource group that you want to exclude probably based on scenarios like copy, paste, etc.
And
conditions->resources_include use constant "<all_urls>"
conditions->resources_exclude list the names of resource groups that you want to exclude. i.e all your company allowed websites
Except for block_pages else you'll end up blocking all sites
This way you are adding restrictions on all sites except known / trusted sites.
Last updated