Himanshu Sharma
Himanshu Sharma

Reputation: 581

How to integrate gservice account to java application?

I want to add gservice account to the java-config file. What are the mandatory fields? A sample of current config consists

properties += [
 bigtableConfig: [
   projected: ,
   instanceId: ,
   tableName: ,
   privateKeyContent:
 ]
] 

And need to modify this with these details

[email protected]

Upvotes: 0

Views: 87

Answers (1)

John Hanley
John Hanley

Reputation: 81454

The client_email and private_key are mandatory.

Some of the other fields such as client_id and client_x509_cert_url improve performance / make validation easier depending on the actual use case.

However, you should include all values. Base64 encode the entire service account JSON key file as some clients expect additional keys.

Note: There are several strategies for managing service accounts. If your application is running on a Google Cloud compute service, review Application Default Credentials (ADC). Including the service account JSON key can be a security risk.

Upvotes: 1

Related Questions