Skip to content

Role Management with Regex

This connector guide describes how to map Trust3 AI Ranger roles to Databricks groups using regular expressions to manage access control in the Databricks SQL Analytics connector.

Mapping Trust3 AI Roles to Databricks Groups

Consider an example shown below

Trust3 AI Role Databricks Group
Format aws-account=<account-id>/role/<role-name> AWS[<account-id>][<role-name>]
Example aws-account=1234567890/role/data_analyst AWS[1234567890][data_analyst]
  1. To achieve this mapping, add the following settings:

    YAML
    CONNECTOR_DATABRICKS_SQL_ANALYTICS_ROLE_NAME_REPLACE_FROM_REGEX: "aws-account=(\\d+)/role/(.+)"
    CONNECTOR_DATABRICKS_SQL_ANALYTICS_ROLE_NAME_REPLACE_TO_STRING: "AWS[$1][$2]"
    

  2. Optional settings

    • If you do not want to attach any prefix to the Databricks group, add the following setting:

      YAML
        CONNECTOR_DATABRICKS_SQL_ANALYTICS_ROLE_ROLE_PREFIX: ""
      
    • To maintain case sensitivity of names, add this setting:

      YAML
      CONNECTOR_DATABRICKS_SQL_ANALYTICS_ROLE_NAME_PERSIST_CASE_SENSITIVITY: "true"
      
    • If you do not want the connector to create, delete, or modify roles, use this setting:

      YAML
      CONNECTOR_DATABRICKS_SQL_ANALYTICS_MANAGE_ROLES: "false"
      
  3. Once the properties are configured, run the following commands to update your Privacera Manager platform instance:

    Step 1 - Setup which generates the helm charts. This step usually takes few minutes.

    Bash
    cd ~/privacera/privacera-manager
    ./privacera-manager.sh setup
    
    Step 2 - Apply the Privacera Manager helm charts.
    Bash
    cd ~/privacera/privacera-manager
    ./pm_with_helm.sh upgrade
    
    Step 3 - (Optional) Post-installation step which generates Plugin tar ball, updates Route 53 DNS and so on. This step is not required if you are updating only connector properties.

    Bash
    cd ~/privacera/privacera-manager
    ./privacera-manager.sh post-install