Give a service account data access
A new service account reads no data until you give it access in Data Security, the same way you do for a user or a group. Every policy form has a Service Accounts field.
Prerequisites
- Your role includes the permission for the policy type:
governance:permissions:grant(Access),governance:row_policies:write(Row level filter), orgovernance:masking_policies:write(Masking). Theportal_adminandpolicy_managerroles have all three. - To add the account to a tag policy, your role includes
governance:tag_policies:write. Theportal_adminandpolicy_managerroles have it. - The service account is Active. Disabled and deleted accounts cannot be selected.
Add the account to a policy
-
In the left sidebar, select Data Security → Resource policies.
-
Open the tab of the policy type you need.
Tab Use it to Details Access Let the account read or change a catalog, schema, or table. Grant data access with an access policy Row level filter Limit the rows it sees in one table. Filter rows with a row level filter policy Masking Hide the values of a column. Mask columns with a masking policy -
Create a policy, or open an existing one.
-
In Service Accounts, select the account.
-
Select Create or Save.
The account can use the new access within about 1 minute.
Give the account only what its job needs. For example, a dashboard that reads one schema needs SELECT on that schema, not on the whole catalog.
Add the account to a tag policy
Tag policies have a Service Account field in each rule.
- In the left sidebar, select Data Security → Tag policies.
- Open the Access or Masking tab.
- Select Create access policy or Create masking policy, or open an existing policy and select Edit.
- In a rule, select the account in Service Account.
- Select Create or Save.
Tag policy changes apply to queries within 10 minutes when the system works normally. See Allow or deny access with a tag policy and Mask tagged columns with a tag policy.
Remove access
Open the policy, remove the account from Service Accounts, and select Save. See Edit, deactivate, or delete a policy.
To block the account everywhere at once, disable it instead. See Disable, enable, or delete a service account.
What happens to policies when the status changes
| Status change | Effect on policies |
|---|---|
| Disable or Delete | The account loses all its access. It stays listed in its policies. |
| Enable | The account gets back the access from those policies. |
Find the policies of a service account
The Resource policies list has no filter by service account. Look for the account in the Service Account column of the list.
On the Tag policies page, select Filters and choose the account in Principal.