Skip to content

Manage Purposes

Introduction

This page shows how to create purposes and apply them to data products, in the UI. For what Purpose-Based Access Control (PBAC) is and when to use it, see the Overview. For how a purpose's row filters and masks combine with the data product's other policies, see How Policies Combine. The same operations are available in the API.

Availability

To use PBAC, ask Trust3 AI Customer Support to enable it for your tenant.

If PBAC is turned off for a tenant, Trust3 AI stops enforcing every purpose at the next sync: the purposes' row filters and masks are removed from the data platform, so their groups and roles see what the other policies allow. The purposes and their applications are kept. The purpose pages and the purpose API are unavailable until PBAC is turned on again, but purpose policies still appear on the Policies page and can be edited or deleted there. Those changes take effect when PBAC is turned on again.

Terms used on this page

  • Purpose. A named set of rules, for example Marketing. It has a unique name and an optional description.
  • Purpose policies. The rules a purpose holds. Each one is either:

    • a row filter, which keeps or removes the rows its Record Identifiers match, as a standard row filter does; or
    • a column mask, which masks every column carrying a tag. A table without the tag is not affected.

    A purpose policy can be used in several purposes, or in none. Purpose policies do nothing until a purpose that has them is applied to a data product.

  • Application. Applying a purpose to a data product creates an application: the data product, the purpose, the groups and roles it is for, and any of the purpose's policies switched off (deselected) for that data product.

Rules that hold everywhere:

  • A group or role has at most one purpose per data product.
  • A purpose is applied for groups and roles that already exist in Trust3 AI. It cannot be applied for an individual user.
  • An application keeps at least one of its purpose's policies selected. To stop using a purpose on a data product, remove the application.

Who can do what

Action ROLE_ACCOUNT_ADMIN, ROLE_POLICY_ADMIN Admin of a security zone ROLE_POLICY_AUDITOR, ROLE_CATALOG_EXPLORER
Create, edit or delete a purpose and its policies Yes No No
See purposes and their policies Yes Yes Yes
Apply, change or remove a purpose on a data product Yes On data products in their zone No
See the purposes applied to a data product Yes On data products in their zone Yes

A user who cannot see a purpose, data product or application gets "not found" rather than "not allowed".

Applying a purpose can show masked columns

A purpose's Show policies take precedence over other masks on the same column. So an admin who can apply a purpose, including the admin of a security zone, can show to a group or role a column that a tag policy masks for everyone else. Review a purpose's Show policies before applying it, and review who can apply purposes in each zone. A purpose applied for the everyone group applies to every user; see PBAC on Snowflake.

See Portal Roles and Permissions for the roles.

Using PBAC with a data product

A purpose is applied to a whole data product. It cannot be applied to a single table or column. Before you start:

  1. Have a data product with assets. See Creating a Data Product and Adding Assets. Applying a purpose also gives its groups and roles read access to every table in the data product, so tag the columns to mask and check for untagged or newly added tables first. A purpose then changes which rows and columns they see. This read access is not given to a purpose applied for everyone (public), or for a group that is not mapped to a Snowflake role (see Groups that are not mapped). See Policy Integration.
  2. Prepare what the policies use. Masks find columns by tag, so the columns to mask must carry those tags; see Tags and metadata. Row filters use Record Identifiers, so create the ones they need; see Record Identifier.
  3. Know the groups and roles the purpose is for. They must already exist in Trust3 AI.

The flow is then:

  1. Create the purpose (ROLE_ACCOUNT_ADMIN or ROLE_POLICY_ADMIN).
  2. Add its row filters and masks.
  3. Open the data product and apply the purpose for its groups and roles, deselecting any policies that should not apply there.

Editing a purpose later changes every data product it is applied to. A policy added to the purpose applies to every existing application, except where you deselect it.

Example

Data product Member 360 holds the tables members and claims. Purpose Marketing has four policies:

Policy Type Rule
R1 Consenting members only Row filter Allow Result on Record Identifier Consenting members (obj.consent_marketing = 'true')
M1 Redact email Mask Columns tagged PII_EMAIL: Nullify
M2 Phone, last 4 Mask Columns tagged PII_PHONE: Partial Mask: Show last 4
M3 Hash date of birth Mask Columns tagged PII_DOB: Hash

Marketing is applied to Member 360 twice:

  • for role SF_MARKETING_ANALYST, with all four policies;
  • for role SF_CAMPAIGN_OPS, with M1 deselected, because campaign operations needs the email address.

Create a purpose in the UI

You need the ROLE_ACCOUNT_ADMIN or ROLE_POLICY_ADMIN role.

A purpose is created with its policies in one wizard of three steps: Basic Info, Add Policies and Review. Nothing is saved until the last step. If anything goes wrong there, nothing is created.

  1. Open Purposes in the left menu and select Create Purpose.
  2. Basic Info:
    1. Enter a Purpose Name, such as Marketing campaign. Letters, digits, spaces, ., _ and - only, up to 255 characters. It must be unique; names that differ only in upper or lower case count as the same.
    2. Optionally enter a Description, up to 500 characters, saying what the purpose is used for.
    3. Select Next.
  3. Add Policies: select Add Policy to add existing purpose policies, or to create a column mask or row filter for the purpose (see Add policies to a purpose), up to 50; you can add more after the purpose is created. Each policy is shown as a card with its type. Use All, Masking or Row Level to filter the cards, select a card to preview the policy, and use its ⋮ menu to Edit or Delete it. Then select Review.
  4. Review: check what the purpose will do. Each policy is shown in plain words (Text), or as SQL. Select Back to change anything, or Create Purpose.

The policies only take effect once the purpose is applied to a data product for groups or roles.

To find a purpose, use the search box on the Purposes page; it matches any part of the name, ignoring case. You can sort by name, created time or updated time. Each purpose in the list shows how many row filter and masking policies it has, and who created it.

Add policies to a purpose

A purpose needs at least one policy before it can be applied. A mask acts on the columns that carry a tag, and a row filter on the rows its Record Identifiers match, so the same purpose works on any data product. The data product and the groups or roles come later, when the purpose is applied.

Add Policy first lists the purpose policies that already exist. Search them, or filter by All, Masking or Row Level, select the ones to use in this purpose too, and select Add Policy. A policy added this way stays in its other purposes, and editing it changes all of them.

To write a new policy instead, select Create one here. The Add Policy drawer opens:

  1. Choose the Policy type: Masking or Row Filter.
  2. Enter a Policy Name (up to 255 characters, unique within the purpose) and an optional Description.
  3. For Masking:
    1. Column Tag: search for and select the tag whose columns are masked, such as EMAIL.
    2. Actions: select the masking rule, such as Hash, Partial Mask: Show first 4, Partial Mask: Show last 4 or Nullify. Each card shows the services that support it; a rule is enforced only on compatible services. View full compatibility matrix lists them all.
  4. For Row Filter:

    1. Record Identifiers: select one or more Record Identifiers that define the rows, such as Consenting members. To make a new one, select the create option beside the field. See Record Identifier.
    2. Actions: Allow Result keeps the rows the Record Identifiers match; Exclude Result removes them.
  5. Select Review. Review Policy shows the policy's rules and a GIA summary of what it does. Select Add Policy to add it, or Back to change it.

A purpose policy has no draft or publish step: it is active from the moment it is saved.

A mask's tag, and a row filter's Record Identifiers, must exist when you save. If a mask's tag is later deleted, the policy stays but matches nothing, and it is flagged target missing. If a tag with the same name is created again, the policy applies again. A Record Identifier cannot be deleted while a purpose policy uses it.

From the policy page

Purpose policies are also listed on the policy page, beside standard policies, each with the purposes that use it. Use the Kind filter (Kind: All, Kind: Purpose or Kind: Standard) to show only purpose policies or only standard ones. Choosing Kind: Purpose clears the security zone filter, because a purpose policy has no zone of its own.

To create a purpose policy on the policy page, select Create Policy. In Set up your policy, under Purpose, choose Selected Purpose, pick one or more purposes, then choose Masking Policy or Row Filter Policy. A purpose policy has no security zone, and Access Policy is not offered. Any Purpose creates a standard policy, as before PBAC.

One policy in several purposes

A purpose policy can be used in several purposes, or in none. A policy's name is unique within the purpose, so a policy cannot be added to a purpose that already has a policy of the same name.

  • Editing a policy changes every purpose that uses it, and every data product those purposes are applied to, except where an application deselects it.
  • Adding it to another purpose: on that purpose's page, select Add Policy and pick it from the list.
  • Removing it from one purpose: on that purpose's page, use Remove from purpose name in the policy's ⋮ menu. The policy stays in its other purposes, and is not deleted. A policy in no purpose stays on the policy page and does nothing until it is added to a purpose again.
  • Deleting a policy is done on the policy page, and removes it from every purpose that uses it. Removing a policy from a purpose never deletes it.

You can remove a policy from a purpose even while the purpose is applied to data products. Those data products stop applying it right away. If any of them had deselected it, that setting is cleared, so if you add the policy back later it applies everywhere the purpose is applied.

Deleting a purpose keeps its policies: each stays in its other purposes, or in no purpose. See Delete a purpose.

Apply a purpose to a data product in the UI

You need the ROLE_ACCOUNT_ADMIN or ROLE_POLICY_ADMIN role, or to be an admin of the data product's security zone.

  1. Open the data product and go to its Purposes tab. Each card is one application: the purpose, the Groups & Roles it is applied for, its Effective policies, and its Ineffective policies (the ones deselected for this application). Select a card to open Purpose details, which shows every policy of the purpose with its rules, marks the deselected ones Not applied, and shows how many apply here (for example 2 of 3).
  2. Select Apply Purpose. The Apply Purpose drawer opens.
  3. Purpose: search for and select the purpose, such as Marketing campaign.
  4. Groups & Roles: pick one or more groups or roles known to Trust3 AI, such as marketing. A group or role that already has a purpose on this data product cannot be picked: edit that application instead.
  5. Policies in this purpose: every policy is ticked (for example 3 of 3 applied). Untick any you do not want for this application (see the next section). Select the eye icon on a policy to see its details without changing its tick. The data product's own policies always apply.
  6. Select Apply Purpose. The new card shows the purpose, its groups and roles, and the policies in effect.

The purpose's row filters can only remove rows from what these groups and roles see in this data product. Its masks take precedence over other masks on the same columns, so a Show policy shows a column that another policy masks. Applying a purpose gives these groups and roles read access to every table in the data product, and deleting the application revokes it. A table or column that is not tagged yet, or a table added later, is read without the purpose's masks.

To change an application later, use the ⋮ menu on its card: Edit changes its groups and roles or its deselections, and Delete removes it. The purpose of an application cannot be changed. To use a different purpose, remove the application and apply the other purpose.

Select and deselect policies when applying

When you apply a purpose, all of its policies are selected. You can deselect any of them for this one application. For example, apply Marketing but keep email visible for SF_CAMPAIGN_OPS by deselecting M1.

  • At least one policy must stay selected. Deselecting every policy is refused. To stop using the purpose, remove the application.
  • Only the purpose's own policies can be deselected. The data product's own policies, and standard policies, are not listed and cannot be switched off here.
  • A policy added to the purpose later takes effect immediately on every data product the purpose is already applied to, for all of those groups and roles. You do not need to apply the purpose again; deselect the new policy on any application where it should not apply.
  • A policy removed from the purpose, or deleted, stops applying wherever the purpose is applied, even while the purpose is applied to data products. A deselection of it is cleared.

Deselections are made per application, so the same purpose can be applied to two roles on one data product with different policies switched off.

Delete a purpose

Only a ROLE_ACCOUNT_ADMIN or ROLE_POLICY_ADMIN user can delete a purpose.

  • If the purpose is not applied anywhere, it is deleted. Its policies are kept: each stays in its other purposes, or on the policy page in no purpose, where you can add it to another purpose or delete it.
  • If it is applied, the delete is refused, listing the data products it is applied to. You can remove those applications first, or, in the Force remove "Marketing" from data products? dialog, select Force Remove and Delete, which removes the purpose from every data product and then deletes it. Its policies are kept in the same way.

Reporting

The purpose report is available through the API, as GET /purpose-applications; there is no report page in the UI. It lists each data product with a purpose applied, the groups and roles it is applied for, and which purpose policies are deselected. Filter it by purpose, by data product, or to applications that do or do not deselect anything. It also reports how many matching applications deselect at least one policy.

Current limits

  • A purpose's row filters combine by fixed rules: Allow filters on the same column with OR, everything else with AND. You cannot group filters across policies yourself. See How Policies Combine.