diff --git a/src/auth/baseexternalclient.ts b/src/auth/baseexternalclient.ts index 81540014..1aab7123 100644 --- a/src/auth/baseexternalclient.ts +++ b/src/auth/baseexternalclient.ts @@ -136,9 +136,9 @@ export abstract class BaseExternalAccountClient extends AuthClient { private readonly stsCredential: sts.StsCredentials; private readonly clientAuth?: ClientAuthentication; private readonly workforcePoolUserProject?: string; + private universeDomain?: string; public projectId: string | null; public projectNumber: string | null; - public universeDomain?: string; public readonly eagerRefreshThresholdMillis: number; public readonly forceRefreshOnFailure: boolean; /** diff --git a/test/test.baseexternalclient.ts b/test/test.baseexternalclient.ts index 0b89e840..917ff6b4 100644 --- a/test/test.baseexternalclient.ts +++ b/test/test.baseexternalclient.ts @@ -70,6 +70,7 @@ describe('BaseExternalAccountClient', () => { credential_source: { file: '/var/run/secrets/goog.id/token', }, + universe_domain: 'universe.domain.com', }; const externalAccountOptionsWithCreds = { type: 'external_account', @@ -283,26 +284,6 @@ describe('BaseExternalAccountClient', () => { }); }); - describe('universeDomain', () => { - it('should be undefined if not set', () => { - const client = new TestExternalAccountClient(externalAccountOptions); - - assert(client.universeDomain === undefined); - }); - - it('should be set if provided', () => { - const universeDomain = 'universe.domain.com'; - const options: BaseExternalAccountClientOptions = Object.assign( - {}, - externalAccountOptions - ); - options.universe_domain = universeDomain; - const client = new TestExternalAccountClient(options); - - assert.equal(client.universeDomain, universeDomain); - }); - }); - describe('getServiceAccountEmail()', () => { it('should return the service account email when impersonation is used', () => { const saEmail = 'service-1234@service-name.iam.gserviceaccount.com';