- Platform Release 6.5
- Privacera Platform Installation
- About Privacera Manager (PM)
- Install overview
- Prerequisites
- Installation
- Default services configuration
- Component services configurations
- Access Management
- Data Server
- PolicySync
- Snowflake
- Redshift
- Redshift Spectrum
- PostgreSQL
- Microsoft SQL Server
- Databricks SQL
- RocksDB
- Google BigQuery
- Power BI
- UserSync
- Privacera Plugin
- Databricks
- Spark standalone
- Spark on EKS
- Trino Open Source
- Dremio
- AWS EMR
- AWS EMR with Native Apache Ranger
- GCP Dataproc
- Starburst Enterprise
- Privacera services (Data Assets)
- Audit Fluentd
- Grafana
- Access Request Manager (ARM)
- Ranger Tagsync
- Discovery
- Encryption & Masking
- Privacera Encryption Gateway (PEG) and Cryptography with Ranger KMS
- AWS S3 bucket encryption
- Ranger KMS
- AuthZ / AuthN
- Security
- Access Management
- Reference - Custom Properties
- Validation
- Additional Privacera Manager configurations
- CLI actions
- Debugging and logging
- Advanced service configuration
- Increase Privacera portal timeout for large requests
- Order of precedence in PolicySync filter
- Configure system properties
- PolicySync
- Databricks
- Table properties
- Upgrade Privacera Manager
- Troubleshooting
- Possible Errors and Solutions in Privacera Manager
-
- Unable to Connect to Docker
- Terminate Installation
- 6.5 Platform Installation fails with invalid apiVersion
- Ansible Kubernetes Module does not load
- Unable to connect to Kubernetes Cluster
- Common Errors/Warnings in YAML Config Files
- Delete old unused Privacera Docker images
- Unable to debug error for an Ansible task
- Unable to upgrade from 4.x to 5.x or 6.x due to Zookeeper snapshot issue
- Storage issue in Privacera UserSync & PolicySync
- Permission Denied Errors in PM Docker Installation
- Unable to initialize the Discovery Kubernetes pod
- Portal service
- Grafana service
- Audit server
- Audit Fluentd
- Privacera Plugin
-
- Possible Errors and Solutions in Privacera Manager
- How-to
- Appendix
- AWS topics
- AWS CLI
- AWS IAM
- Configure S3 for real-time scanning
- Install Docker and Docker compose (AWS-Linux-RHEL)
- AWS S3 MinIO quick setup
- Cross account IAM role for Databricks
- Integrate Privacera services in separate VPC
- Securely access S3 buckets ssing IAM roles
- Multiple AWS account support in Dataserver using Databricks
- Multiple AWS S3 IAM role support in Dataserver
- Azure topics
- GCP topics
- Kubernetes
- Microsoft SQL topics
- Snowflake configuration for PolicySync
- Create Azure resources
- Databricks
- Spark Plug-in
- Azure key vault
- Add custom properties
- Migrate Ranger KMS master key
- IAM policy for AWS controller
- Customize topic and table names
- Configure SSL for Privacera
- Configure Real-time scan across projects in GCP
- Upload custom SSL certificates
- Deployment size
- Service-level system properties
- PrestoSQL standalone installation
- AWS topics
- Privacera Platform User Guide
- Introduction to Privacera Platform
- Settings
- Data inventory
- Token generator
- System configuration
- Diagnostics
- Notifications
- How-to
- Privacera Discovery User Guide
- What is Discovery?
- Discovery Dashboard
- Scan Techniques
- Processing order of scan techniques
- Add and scan resources in a data source
- Start or cancel a scan
- Tags
- Dictionaries
- Patterns
- Scan status
- Data zone movement
- Models
- Disallowed Tags Policy
- Rules
- Types of rules
- Example rules and classifications
- Create a structured rule
- Create an unstructured rule
- Create a rule mapping
- Export rules and mappings
- Import rules and mappings
- Post-processing in real-time and offline scans
- Enable post-processing
- Example of post-processing rules on tags
- List of structured rules
- Supported scan file formats
- Data Source Scanning
- Data Inventory
- TagSync using Apache Ranger
- Compliance Workflow
- Data zones and workflow policies
- Workflow Policies
- Alerts Dashboard
- Data Zone Dashboard
- Data zone movement
- Example Workflow Usage
- Discovery health check
- Reports
- Built-in Reports
- Saved reports
- Offline reports
- Reports with the query builder
- How-to
- Privacera Encryption Guide
- Essential Privacera Encryption terminology
- Install Privacera Encryption
- Encryption Key Management
- Schemes
- Scheme Policies
- Encryption Schemes
- Presentation Schemes
- Masking schemes
- Encryption formats, algorithms, and scopes
- Deprecated encryption formats, algorithms, and scopes
- Encryption with PEG REST API
- PEG REST API on Privacera Platform
- PEG API Endpoint
- Encryption Endpoint Summary for Privacera Platform
- Authentication Methods on Privacera Platform
- Anatomy of the /protect API Endpoint on Privacera Platform
- About Constructing the datalist for protect
- About Deconstructing the datalist for unprotect
- Example of Data Transformation with /unprotect and Presentation Scheme
- Example PEG API endpoints
- /unprotect with masking scheme
- REST API Response Partial Success on Bulk Operations
- Audit Details for PEG REST API Accesses
- REST API Reference
- Make calls on behalf of another user
- Troubleshoot REST API Issues on Privacera Platform
- PEG REST API on Privacera Platform
- Encryption with Databricks, Hive, Streamsets, Trino
- Databricks UDFs for encryption and masking
- Hive UDFs
- Streamsets
- Trino UDFs
- Privacera Access Management User Guide
- Privacera Access Management
- How Polices are evaluated
- Resource policies
- Policies overview
- Creating Resource Based Policies
- Configure Policy with Attribute-Based Access Control
- Configuring Policy with Conditional Masking
- Tag Policies
- Entitlement
- Request Access
- Approve access requests
- Service Explorer
- User/Groups/Roles
- Permissions
- Reports
- Audit
- Security Zone
- Access Control using APIs
- AWS User Guide
- Overview of Privacera on AWS
- Set policies for AWS services
- Using Athena with data access server
- Using DynamoDB with data access server
- Databricks access manager policy
- Accessing Kinesis with data access server
- Accessing Firehose with Data Access Server
- EMR user guide
- AWS S3 bucket encryption
- S3 browser
- Getting started with Minio
- Plugins
- How to Get Support
- Coordinated Vulnerability Disclosure (CVD) Program of Privacera
- Shared Security Model
- Privacera documentation changelog
Google BigQuery
Google BigQuery provides fine-grained access control on BigQuery Datasets. This includes
Table-level Access Control
Column-level Access Control
Native/Dynamic secure view-based Row Filter
Masking With Dynamic secure views created using PolicySync
Privacera access control for BigQuery relies on the privacera_bigquery connector service.
Prerequisites
Create PrivaceraPolicySyncRole IAM Role
You need to give Privacera PolicySync basic access to GCP. To grant that access, create PrivaceraPolicySyncRole
IAM role in your GCP project or GCP organization using the following commands on Google Cloud's shell (gcloud). The shell can be installed and accessed locally or through Google Console.
Run the following command to create the file containing the permissions required for the PrivaceraPolicySyncRole
role:
ROLE_NAME="PrivaceraPolicySyncRole" cat << EOF > ${ROLE_NAME}.yaml title: "${ROLE_NAME}" description: "${ROLE_NAME}" stage: "ALPHA" includedPermissions: - resourcemanager.projects.get - resourcemanager.projects.getIamPolicy - resourcemanager.projects.setIamPolicy - iam.roles.list - iam.roles.get - iam.roles.create - iam.roles.update - bigquery.jobs.create - bigquery.datasets.get - bigquery.datasets.create - bigquery.datasets.update - bigquery.datasets.delete - bigquery.datasets.getIamPolicy - bigquery.datasets.setIamPolicy - bigquery.tables.list - bigquery.tables.get - bigquery.tables.getData - bigquery.tables.create - bigquery.tables.update - bigquery.tables.delete - bigquery.tables.getIamPolicy - bigquery.tables.setIamPolicy - bigquery.rowAccessPolicies.list - bigquery.rowAccessPolicies.create - bigquery.rowAccessPolicies.update - bigquery.rowAccessPolicies.delete - bigquery.rowAccessPolicies.getIamPolicy - bigquery.rowAccessPolicies.setIamPolicy EOF
GCP Project-level access
Note
If you have multiple projects in your GCP organization and want them to be managed by a single BigQuery connector, then repeat the steps below for each project. Assign the role to the same service account which will be used across multiple projects.
Run the following command. Replace
<GCP_PROJECT_ID>
with your GCP project ID.PROJECT_ID="<GCP_PROJECT_ID>"
To create
PrivaceraPolicySyncRole
role in your GCP project, run the following command.gcloud iam roles create ${ROLE_NAME} --project=${PROJECT_ID} --file=${ROLE_NAME}.yaml
GCP Organization-level access
Run the following command. Replace
<GCP_ORGANIZATION_ID>
with your GCP organization ID.ORGANIZATION_ID="<GCP_ORGANIZATION_ID>"
To create
PrivaceraPolicySyncRole
role in your GCP organization, run the following command.gcloud iam roles create ${ROLE_NAME} --organization=${ORGANIZATION_ID} --file=${ROLE_NAME}.yaml
Attach IAM Role to Service Account
To attach the PrivaceraPolicySyncRole
IAM role created above, do the following steps:
Log in to your GCP console.
Select IAM & admin > Service accounts and click + CREATE SERVICE ACCOUNT.
Enter values in the fields and click CREATE.
In Grant this service account access to project, select the role as
PrivaceraPolicySyncRole
.On the Services Account Page, find the newly created service account and copy the email address of the new service account for use in a later step.
Note
This email will be the Service Account Email for configuring PolicySync in Privacera Manager.
If you are using a Google VM machine to configure GBQ for PolicySync, then you can attach the service account created above to your VM machine and skip below steps.
On the Services Account Page, go to the Keys tab and click Add Key and select Create New Key.
Select the JSON key type, and click CREATE. A JSON key file downloads to your system. Store the file at an accessible location. It will be used for configuring PolicySync in Privacera Manager.
Refer the Google documentation for a detailed information on creating a service account.
Configure Logs for Auditing
A sink is required to collect all the logs from GBQ. To create a sink, do the following steps:
In the search bar, search for Logging, and then click Logs Router, and click Create Sink.
Enter the sink name as PolicySyncBigQueryAuditSink, and then click Next.
Enter the sink destination.
In the Select sink service, select BigQuery.
In SelectBigQuerydataset, click Create newBigQuerydataset.
Enter the Dataset ID as bigquery_audits and click Create Dataset.
Click Next.
Add theBigQuerylogs in the sink:
In the Build an inclusion filter, add the following line:
resource.type="bigquery_resource"
Click Create Sink.
Refer the Google documentation for a detailed information on creating a sink.
CLI Configuration
SSH to the instance where Privacera is installed.
Do the following, if you’re not using VM attached credentials:
Access the JSON file of the service account you downloaded using the steps above.
Copy the JSON to the
config/custom-vars
folder.
Run the following commands.
cd ~/privacera/privacera-manager/ cp config/sample-vars/vars.policysync.bigquery.yml config/custom-vars/ vi config/custom-vars/vars.policysync.bigquery.yml
Set the properties for your specific installation. For property details and descriptions, see the Configuration Properties section that follows.
Notice
Along with the above properties, you can add custom properties that are not included by default. For more information about these properties, see PolicySync properties.
Run the update.
cd ~/privacera/privacera-manager ./privacera-manager.sh update
Configuration Properties
JDBC configuration properties
Name | Type | Default | Required | Description |
---|---|---|---|---|
|
|
| Yes | Specifies the geographical region where the taxonomy for the PolicySync should be created. |
|
| Yes | Specifies the Google project ID where your Google BigQuery data source resides. For example: | |
|
|
| No | Specifies the JDBC URL for the Google BigQuery connector. |
|
|
| No | Specifies whether the PolicySync uses the service account attached to your virtual machine for the credentials to connect to the data source. When set to |
|
| Yes | Specifies the service account email address that PolicySync uses. You must specify this value if you are not using a Google Cloud Platform (GCP) virtual machine attached service account. | |
|
|
| Yes | Specifies the path of the service account credentials JSON file that you downloaded from your Google Cloud Platform (GCP) account. You must specify this property if |
|
| Yes | Specifies the name of the JSON file that contains your Google Cloud Platform service account credentials. If specified, this value is combined with |
Custom IAM roles
Name | Type | Default | Required | Description |
---|---|---|---|---|
|
|
| No | Specifies whether PolicySync automatically creates custom IAM roles in your Google Cloud Platform project or organization for fine-grained access control (FGAC). If set to |
|
|
| No | Specifies whether PolicySync creates and uses custom IAM roles at the project or organizational level in Google Cloud Platform (GCP). The following values are allowed:
|
|
| No | Specifies the Google Cloud Platform (GCP) organizational ID. Specify this only if you configured PolicySync to use custom IAM roles at the organizational level. | |
|
| No | Specifies a list of mappings between PolicySync custom IAM role names and your custom role names. Use the following format when specifying your custom role names: <PRIVACERA_DEFAULT_ROLE_NAME_1>:<CUSTOM_ROLE_NAME_1> <PRIVACERA_DEFAULT_ROLE_NAME_2>:<CUSTOM_ROLE_NAME_2> The following is a list of the default custom role names:
|
Load keys and intervals
Name | Type | Default | Required | Description |
---|---|---|---|---|
|
|
| No | Specifies how PolicySync loads resources from Google BigQuery. The following values are allowed:
|
|
|
| No | Specifies the interval in seconds for PolicySync to wait before checking for new resources or changes to existing resources. |
|
|
| No | Specifies the interval in seconds for PolicySync to wait before reconciling principals with those in the data source, such as users, groups, and roles. When differences are detected, PolicySync updates the principals in the data source accordingly. |
|
|
| No | Specifies the interval in seconds for PolicySync to wait before reconciling Apache Ranger access control policies with those in the data source. When differences are detected, PolicySync updates the access control permissions on data source accordingly. |
|
|
| No | Specifies the interval in seconds to elapse before PolicySync retrieves access audits and saves the data in Privacera. |
Resources management
Name | Type | Default | Required | Description |
---|---|---|---|---|
|
| Yes | Specifies a comma-separated list of project names to which access control is managed by PolicySync. If unset, PolicySync manages all projects. If specified, use the following format. You can use wildcards. Names are case-sensitive. The list of projects to ignore takes precedence over any projects specified by this setting. An example list of projects might resemble the following: | |
|
| Yes | Specifies a list of comma-separated datasets that PolicySync manages access control to. You can use wildcards in the value. Names are case-sensitive. If you want to manage all datasets, do not set a value. For example: testproject1.dataset1,testproject2.dataset2,sales_project*.sales* You can configure the postfix by specifying If specified, the | |
|
| No | Specifies a comma-separated list of table names for which PolicySync manages access control. You can use wildcards. Use the following format when specifying a table: <PROJECT_NAME>.<DATASET_NAME>.<TABLE_NAME> If specified, If you specify a wildcard, such as in the following example, all matched tables are managed:
The specified value, if any, is interpreted in the following ways:
| |
|
| No | Specifies a comma-separated list of project names that PolicySync does not provide access control for. You can specify wildcards. Names are case-sensitive. If not specified, all projects are subject to access control. For example: This setting supersedes any values specified by | |
|
| No | Specifies a comma-separated list of dataset names that PolicySync does not provide access control for. You can specify wildcards. Names are case-sensitive. If not specified, all datasets are subject to access control. For example: This setting supersedes any values specified by | |
|
| No | Specifies a comma-separated list of table names that PolicySync does not provide access control for. You can specify wildcards. Names are case-sensitive. If not specified, all tables are subject to access control. Specify tables using the following format: <PROJECT_NAME>.<DATASET_NAME>.<TABLE_NAME> This setting supersedes any values specified by |
Users, groups, and roles management
Name | Type | Default | Required | Description |
---|---|---|---|---|
|
|
| No | Specifies a regular expression to apply to a username and replaces each matching character with the value specified by the If not specified, no find and replace operation is performed. |
|
|
| No | Specifies a string to replace the characters matched by the regex specified by the If not specified, no find and replace operation is performed. |
|
|
| No | Specifies a regular expression to apply to a group and replaces each matching character with the value specified by the If not specified, no find and replace operation is performed. |
|
|
| No | Specifies a string to replace the characters matched by the regex specified by the If not specified, no find and replace operation is performed. |
|
| No | Specifies a comma-separated list of user names for which PolicySync manages access control. You can use wildcards. Names are case-sensitive. If not specified, PolicySync manages access control for all users. If specified, An example user list might resemble the following: | |
|
| No | Specifies a comma-separated list of group names for which PolicySync manages access control. If unset, access control is managed for all groups. If specified, use the following format. You can use wildcards. Names are case-sensitive. An example list of projects might resemble the following: If specified, | |
|
| No | Specifies a comma-separated list of user names that PolicySync does not provide access control for. You can specify wildcards. Names are case-sensitive. If not specified, all users are subject to access control. This setting supersedes any values specified by | |
|
| No | Specifies a comma-separated list of group names that PolicySync does not provide access control for. You can specify wildcards. Names are case-sensitive. If not specified, all groups are subject to access control. This setting supersedes any values specified by | |
|
| Yes | Set this property to your preferred value, policysync uses this native public group for access grants whenever there is policy created referring to public group inside it. The following values are allowed:
| |
|
|
| No | Specifies whether to manage only the users that are members of groups specified by |
Access control management
Name | Type | Default | Required | Description |
---|---|---|---|---|
|
|
| No | Specifies how PolicySync manages column-level access control. The following values are allowed:
|
|
|
| No | Specifies a string to use as part of the name of native row filter and masking policies. |
|
|
| No | Specifies a template for the name that PolicySync uses when creating a row filter policy. For example, given a table proj_priv_ds_priv_data_<ROW_FILTER_ITEM_NUMBER> |
|
|
| No | Specifies whether to use the data source native row filter functionality. This setting is disabled by default. When enabled, you can create row filters only on tables, but not on views. |
|
|
| No | Specifies whether to use secure view based masking. The default value is |
|
|
| No | Specifies whether to use secure view based row filtering. The default value is While Google BigQuery supports native filtering, PolicySync provides additional functionality that is not available natively. Enabling this setting is recommended. |
|
|
| No | Specifies whether to create secure views for all tables and views that are created by users. If enabled, PolicySync creates secure views for resources regardless of whether masking or filtering policies are enabled. |
Access audits management
Name | Type | Default | Required | Description |
---|---|---|---|---|
|
|
| No | Specifies the name of the dataset where PolicySync creates custom masking functions. |
|
|
| No | Specifies the masking value used for numeric data types. |
|
|
| No | Specifies the masking value used for text or string data types. |
|
| No | Specifies a prefix string for secure views. By default view-based row filter and masking-related secure views have the same dataset name as the table dataset name. If you want to change the secure view dataset name prefix, specify a value for this setting. For example, if the prefix is | |
|
| No | Specifies a postfix string for secure views. By default view-based row filter and masking-related secure views have the same dataset name as the table dataset name. If you want to change the secure view dataset name postfix, specify a value for this setting. For example, if the postfix is | |
|
| No | Specifies a prefix string for secure views. By default view-based row filter and masking-related secure views have the same dataset name as the table dataset name. If you want to change the secure view dataset name prefix, specify a value for this setting. For example, if the prefix is | |
|
|
| No | Specifies a postfix string for secure views. By default view-based row filter and masking-related secure views have the same dataset name as the table dataset name. If you want to change the secure view dataset name postfix, specify a value for this setting. For example, if the postfix is |
|
| No | Specifies a suffix to remove from a table or view name. For example, if the table is named You can specify a single suffix or a comma separated list of suffixes. | |
|
| No | Specifies a suffix to remove from a secure view dataset name. For example, if the dataset is named You can specify a single suffix or a comma separated list of suffixes, such as | |
|
|
| No | Specifies the interval at which the authorized view ACLs updater thread updates the permissions in the dataset if any permission updates are pending. |
|
|
| Yes | Specifies whether PolicySync performs grants and revokes for access control and creates, updates, and deletes queries for users, groups, and roles. The default value is |
|
|
| No | Specifies the maximum number of attempts that PolicySync makes to execute a grant query if it is unable to do so successfully. The default value is |
|
|
| No | Specifies whether PolicySync applies grants and revokes in batches. If enabled, this behavior improves overall performance of applying permission changes. |
|
|
| No | This property is used to enable the data admin feature. With this feature enabled you can create all the policies on native tables/views, and respective grants will be made on the secure views of those native tables/views. These secure views will have row filter and masking capability. In case you need to grant permission on the native tables/views then you can select the permission you want plus data admin in the policy. Then those permissions will be granted on both the native table/view as well as its secure view. |
|
|
| Yes | Specifies whether Privacera fetches access audit data from the data source. |
|
| No | Specifies a comma separated list of users to exclude when fetching access audits. For example: | |
|
| No | Specifies the project ID where Google BigQuery stores audit log data. | |
|
| No | Specifies the name of the dataset where Google BigQuery logs audit data. Privacera uses this data for running audit queries. | |
|
|
| No | Specifies the maximum interval, in minutes, of the time window that SQL queries use to retrieve access audit information. If there are a large number of audits records, narrowing the window interval improves performance. For example, if the interval is set to SELECT * FROM audits where time_from=00:01 and time_to=00:30; SELECT * FROM audits where time_from=00:31 and time_to=01:00; SELECT * FROM audits where time_from=01:01 and time_to=01:30; |
Validation
Let's test the access control usingBigQueryby defining some test policies for a test user (emily).
Prepare test data in GCP. Refer Google documentation for a detailed information on running queries inBigQuery- Click here.
Log in to GCP console, navigate to BigQuery and then click Compose New Query.
In the Query editor text area, copy the following query:
-- Create Dataset CREATE SCHEMA customer_dataset; -- Create Table CREATE TABLE IF NOT EXISTS customer_dataset.customer_data ( id INT64, person_name string, domain string, ssn string, country string, us_phone string, address string, account_id string, zipcode string); -- Insert Data into table insert into customer_dataset.customer_data values (1, 'Nancy','nancy@yahoo.com','201-99-5532','US','856-232-9702','939 Park Avenue','159635478','33317'); insert into customer_dataset.customer_data values (2,'Gene','gene@google.us','202-99-5532','UK','954-583-0575','303 Johnston Blvd','236854569','95202'); insert into customer_dataset.customer_data values (3,'Edward','edward@facebook.com','203-99-5532','US','209-626-9041','130 Hollister','365412985','60173'); insert into customer_dataset.customer_data values (4,'Pearlene','pearlene@gmail.com','204-99-5532','US','708-471-6810','17 Warren Rd','452189732','90017'); insert into customer_dataset.customer_data values (5,'James','james@cuvox.de','205-99-5532','US','661-338-6787','898 Newport Gray Rd','517836427','94041'); insert into customer_dataset.customer_data values (6,'Pamela','pamela@cuvox.de','206-99-5532','UK','650-526-5259','861 Strick Rd','685231473','80214'); insert into customer_dataset.customer_data values (7,'Donna','donna@fleckens.hu','207-99-5532','US','303-239-4282','1784 S Shore Dr','789563258','1730'); insert into customer_dataset.customer_data values (8,'Amy','amy@gustr.com','208-99-5532','US','774-553-4736','9522 Apple Valley Dr','854126945','55102'); insert into customer_dataset.customer_data values (9,'Adam','adam@teleworm.us','209-99-5532','UK','651-297-1448','745 Old Springville Rd','965412381','43201'); insert into customer_dataset.customer_data values (10,'Lucille','lucille@armyspy.com','210-99-5532','US','740-320-1270','4223 Midway Road','785651236','89102'); insert into customer_dataset.customer_data values (11,'Edard','edu@gustr.com','211-99-5532','UK','702-257-8796','3659 Dye Street','965121354','53207'); insert into customer_dataset.customer_data values (12,'Nick','nick@jourrapide.com','212-99-5532','US','414-483-8638','2966 Nutters Barn Lane','563515264','72764'); insert into customer_dataset.customer_data values (13,'Brian','brian@einrot.com','213-99-5532','US','479-872-9783','3300 Worthington Drive','654621233','91303'); insert into customer_dataset.customer_data values (14,'Stella','stella@jourrapide.com','214-99-5532','US','818-596-6681','1893 Ingram Road','261613654','35816'); insert into customer_dataset.customer_data values (15,'Leona','leona@dayrep.com','215-99-5532','UK','256-250-5413','4244 Burnside Court','986513211','75069'); -- Verify table by running select query SELECT * FROM customer_dataset.customer_data;
Click Run.
Create test user in Privacera Portal as emily. For more information see User Management.
In GCP console, the user emily gets added after you create the user in step 2.
Check the user emily can list the projects inside your organization.
Check user emily does not have Full Admin or Full Reader access on BigQuery.
Create a policy for emily to run queries and list dataset and tables.
Check the access control on the test data in GCP.
A) Table-level Access Control
In Privacera Portal, create a policy Customer Data Full Access for accessing table.
Log in to GCP console with credentials of the test user emily.
Navigate to BigQuery.
Run the following query.
SELECT * FROM customer_dataset.customer_data; SELECT * FROM customer_dataset_secure.customer_data;
User emily can access and view the data.
In Privacera Portal, disable the policy.
In GCP, run the following query.
SELECT * FROM customer_dataset.customer_data; SELECT * FROM customer_dataset_secure.customer_data;
User emily can not access and view the data.
B) View-based Column-level Access Control
In the view-based column-level access control, you have to create a column-level policy on the table. The columns which are not permitted from that policy will be shown as NULL in the secure view of the table.
In Privacera Portal, do the following:
Create a policy Customer Data Column Level Access granting access to a few columns.
Log in to GCP console with credentials of the test user emily.
Navigate to BigQuery.
Run the following queries.
User emily will not see person_name column in the secure view of customer_data table..
SELECT * FROM customer_dataset_secure.customer_data;
In Privacera Portal, disable the Customer Data Column Level Access policy.
C) View-based Row-level Filter
In Privacera Portal, enable Customer Data Full Access policy created above.
emily can view
customer_data
for US and UK from table and in secure view.Log in to GCP console with credentials of the test user emily.
Navigate to BigQuery.
Use the below query to view data from customer data secure view. It will show data from countries US and UK.
SELECT * FROM customer_dataset_secure.customer_data;
User emily can access and view the data.
In Privacera Portal, create a Customer Access by Country policy to access data only from UK.
Use the below query to view data from customer data secure view. The row filter policy gets applied showing data from country UK.
SELECT * FROM customer_dataset_secure.customer_data;
D) View-based Masking
Log in to GCP console with credentials of the test user emily.
Navigate to BigQuery.
Run the following query.
SELECT * FROM customer_dataset_secure.customer_data;
User emily can view the SSN values.
In Privacera Portal, create a Mask SSN policy to mask SSN values for emily.
Run the following query.
SELECT * FROM customer_dataset_secure.customer_data;
User emily cannot view the the SSN values, since it is masked using md5 encryption.
Create custom IAM roles
By default, PolicySync creates all the IAM roles listed in the table below automatically to perform access control in GBQ. If you want to create the custom IAM roles manually, then disable the BIGQUERY_CREATE_CUSTOM_IAM_ROLES
by setting its value to false
.
In the GCP console, you need the map the roles with its appropriate permissions. The role and its permissions mapping are given in the table below. For creating a custom role in GCP and adding its corresponding permissions, see Google documentation.
Role Name | GCP Permissions |
---|---|
PrivaceraGBQProjectListRole | resourcemanager.projects.get |
PrivaceraGBQJobListRole | bigquery.jobs.list |
PrivaceraGBQJobListAllRole | bigquery.jobs.listAll |
PrivaceraGBQJobCreateRole | bigquery.jobs.create |
PrivaceraGBQJobGetRole | bigquery.jobs.get |
PrivaceraGBQJobUpdateRole | bigquery.jobs.update |
PrivaceraGBQJobDeleteRole | bigquery.jobs.delete |
PrivaceraGBQDatasetCreateRole | bigquery.datasets.create |
PrivaceraGBQDatasetGetMetadataRole | bigquery.datasets.get |
PrivaceraGBQDatasetUpdateRole | bigquery.datasets.update |
PrivaceraGBQDatasetDeleteRole | bigquery.datasets.delete |
PrivaceraGBQTableListRole | bigquery.tables.list |
PrivaceraGBQTableCreateRole | bigquery.tables.create |
PrivaceraGBQTableGetMetadataRole | bigquery.tables.get |
PrivaceraGBQTableQueryRole | bigquery.tables.getData |
PrivaceraGBQTableExportRole | bigquery.tables.export |
PrivaceraGBQTableUpdateMetadataRole | bigquery.tables.update |
PrivaceraGBQTableUpdateRole | bigquery.tables.updateData |
PrivaceraGBQTableSetCategoryRole | bigquery.tables.setCategory |
PrivaceraGBQTableDeleteRole | bigquery.tables.delete |
PrivaceraGBQTransferUpdateRole | bigquery.transfers.update |
PrivaceraGBQTransferGetRole | bigquery.transfers.get |
Based on the GCP Resource hierarchy, you can create the roles above at the organization or project level. If you have multiple projects in your GCP organization, it is recommended to create all the roles at the organization level instead at the project level. Once the roles are defined at the organization level, all the projects under that organization will inherit all the roles.