Access Management for Serivce Account in Native Tag Based Masking
This Section to introduced service account principal is one of the type of entity in GBQ.
Google BigQuery uses service accounts with emails formatted as <service-account-name>@<project_name>.iam.gserviceaccount.com
to manage authentication and access control.
How privacera support it using user email
- To enable
Privacera
to support this type of email in theuser principal
- To enable support for this type of email in the user principal, you must configure the
RANGER_VALID_EMAIL_REGEX
property inPrivacera Manager
. -
This property specifies the valid email format for
service account
principals, allowing the Privacera Portal to correctly recognize and process service account emails inuser principal
for access management. -
For
BigQuery Connector
to identify the regex pattern of service acccount email, you need to set theCONNECTOR_BIGQUERY_USER_SERVICE_ACCOUNT_REGEX_PATTERN
property in thevars.connector.bigquery.yml
file.
Note
- The regex pattern for service account email is
^[a-zA-Z0-9\\-]+@([a-zA-Z0-9\\-]+\\.iam|appspot|developer|cloudservices|cloudbuild|gcp-sa-[a-z0-9-]+)\\.gserviceaccount\\.com$
which is bydefault
set to connector. - This pattern is used to match the format of service account emails in Google BigQuery Connector.
- If your email follows above pattern then you
don't need
to change or set the propertyCONNECTOR_BIGQUERY_USER_SERVICE_ACCOUNT_REGEX_PATTERN
invars.connector.bigquery.yml
file.
Info
- For instructions on how to create a service account in Google Cloud Bigquery, refer to the link
Peform the following steps to configure access for service accounts in native tag based masking:
- Navigate to the directory:
- Add the below property with value
YAML -
Save the file and update the privacera manager
-
Create a user in the Privacera Portal or Ranger using the service account email.
For example:<service-account-name>@<project_name>.iam.gserviceaccount.com
Post-Configuration-Section
- Google CLI setup to verify Service Account Access:
Refer for installation link - Execute Command to login into Service Account:
- If
bq
tool is missing then install it manuallyBash - Execute the query to check the access for
service account
Bash
- Prev topic: Advance Configuration