Configure the Ranger GCS Plugin

Configure GCS Endpoint SSL Properties in Ranger

Import the required GCS certificate into the Ranger truststore.

For example:

keytool -importcert \ -alias gcs-cert \ -file cert.pem \ -keystore /etc/security/certificates/truststore.jks

Configure the truststore properties in Ranger:

  1. In the Ambari UI, go to Ranger > Configs > Advanced ranger-admin-site.

  2. Configure the following properties:

ranger.truststore.alias=<gcs-cert-alias> ranger.truststore.file=$JAVA_CACERTS_TRUSTSTORE ranger.truststore.password=<password>
  1. Save the configuration.

  2. Restart Ranger.


Configure Ranger Users

Verify that the Google Cloud IAM users that you want to use in Ranger policies are available in Ranger UserSync.

Ranger user names must match the corresponding Google Cloud IAM user names.

Create a Ranger GCS Service

  1. In the Ranger UI, go to Service Manager > GCS Service.

  2. Click + to create a service.


  1. Configure the following properties:

Property

Required

Description

username

Yes

Ranger lookup or administrator user used when generating the default policy.

credential_file

No

Path to the Google Cloud service account JSON key file. Leave this property empty to use Application Default Credentials (ADC).

projectid

Yes

Google Cloud project ID.

bucketname

Yes

Default GCS bucket used for connection testing and wildcard resolution.

Use the administrator service account as the value for username.

  1. Test the service connection.

  2. Verify that the connection succeeds.

  3. Save the service.


Ranger creates a default policy for the configured bucket and service account user.


Configure Ranger GCS Policies

After you create the GCS service, create or update Ranger policies based on your access requirements.

You can define policies for:

  • An entire bucket.

  • Specific object paths within a bucket.

Wildcard matching is supported for bucket and object resources.

When you create or update a Ranger policy, the plugin synchronizes the corresponding permissions with the GCS bucket IAM policy.



  Last updated