I have 2 GCP projects for which I am trying to perform authentication using C#. Because the projects are belonging to different clients, I am given access to service account json file.
Is there a way to call the Compute engine API in both the projects authenticating using service account json file?
The example code from the Google Cloud client library uses
var credential = GoogleCredential.GetApplicationDefault();
Which loads the path to the Service account key file from GOOGLE_APPLICATION_CREDENTIALS env var. This var is singular. In order for this to work I would need to load two service account JSon key files not just one.
I am resisting mixing the json file as it will a bigger security hole.