I using GCP Secret manager to store passwords using the google-cloud-secretmanager client library (Java). The client library is expecting the service account key (json) file path for a gcp project in environment variable. I am able to do it for single project, but when I try to access Secret manager of multiple GCP projects, I don't know how to set the keys for different projects in environment variable. Need help in setting the keys in environment or is there a way to set it using java code.
I am using this maven dependency
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-secretmanager</artifactId>
</dependency>
https://cloud.google.com/secret-manager/docs/reference/libraries
Thanks in advance.