How to authenticate GSM with token in NodeJS? As far as I know there's option to auth using GOOGLE_APPLICATION_CREDENTIALS
import { SecretManagerServiceClient } from '@google-cloud/secret-manager';
const GClient = new SecretManagerServiceClient();
but is there option to authenticate otherwise? Like with some token we can retrieve from gcloud (gcloud auth print-identity-token [....])?
ok I got something, it use gcloud if GOOGLE_APPLICATION_CREDENTIALS isn't set. But I have problem that it use MAIN auth account, instead of impersonificated one (gcloud config set auth/impersonate_service_account [...]. How to set SecretManagerServiceClient to use impersonificated account?