Skip to main content

Policies

Policies control what your users can do and see in the platform. There are three kinds of policy, and they all live in the same policy service:

Policy_typeWhat it controlsEnforced by
Security policyPolicyWhich records a user can create, read, update, delete or run, and who can edit master data properties declared on typesThe platform, on every API call
Feature policyFeaturePolicyWhich menu items and extension views a user sees in the Web PortalThe Web Portal (presentation only)
Redaction policyRedactionPolicyWhich master data fields are removed from the records a user readsThe platform, when master data is read

Use security policies to protect data. Feature policies only tidy up the portal for a user, they do not stop anyone reading data through the API, ODSL or the Excel Add-in. Redaction policies hide individual fields while still letting the user see the record.

Who a policy applies to​

Every policy has a list of members. A member can be:

MemberExampleSecurityFeatureRedaction
Everyone in your company*YesYesYes
A user's email addressuser@company.comYesYesYes
A policy user groupuser:security:policy:DataStewardsYesYesYes
An Azure Active Directory group id39c6cccd-d6ea-4ac1-b564-8e4d1e28d75dYesNoNo

Policy user groups​

A policy user group is a group of user email addresses that you manage in the platform, so you do not need an Azure Active Directory group for every team. Create it in the user service with type security and category policy, then use user:security:policy: followed by the group name as the member:

stewards = Group()
stewards.name = "DataStewards"
stewards.service = "user"
stewards.type = "security"
stewards.category = "policy"
stewards.items = ["anna@company.com", "raj@company.com"]
save stewards

StewardsEditTypeProperties = Policy()
StewardsEditTypeProperties.service = "object"
StewardsEditTypeProperties.addActions(["update", "editPrivateTypeProperties"])
StewardsEditTypeProperties.addMember("user:security:policy:DataStewards")
save StewardsEditTypeProperties

Adding or removing a person from the group changes their access in every policy that uses the group.

Managing policies​

Policies are records in the policy service, told apart by their _type. You can manage them:

To list each kind of policy in ODSL:

security = find ${policy} where _type = "Policy"
features = find ${policy} where _type = "FeaturePolicy"
redactions = find ${policy} where _type = "RedactionPolicy"

Users with the admin role can always create, update and delete your company's policies. Take care when changing the default ManageAllPrivateData policy: make sure someone can still manage policies before you remove or restrict it.

Further information​