Skip to content

Commit 73b63d5

Browse files
authored
fix: make universeDomain private (#1552)
* feat: adds universe_domain field to base external client * fix: make universeDomain private * fixing merge issue
1 parent 7412d7c commit 73b63d5

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

src/auth/baseexternalclient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ export abstract class BaseExternalAccountClient extends AuthClient {
136136
private readonly stsCredential: sts.StsCredentials;
137137
private readonly clientAuth?: ClientAuthentication;
138138
private readonly workforcePoolUserProject?: string;
139+
private universeDomain?: string;
139140
public projectId: string | null;
140141
public projectNumber: string | null;
141-
public universeDomain?: string;
142142
public readonly eagerRefreshThresholdMillis: number;
143143
public readonly forceRefreshOnFailure: boolean;
144144
/**

test/test.baseexternalclient.ts

+1-20
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ describe('BaseExternalAccountClient', () => {
7070
credential_source: {
7171
file: '/var/run/secrets/goog.id/token',
7272
},
73+
universe_domain: 'universe.domain.com',
7374
};
7475
const externalAccountOptionsWithCreds = {
7576
type: 'external_account',
@@ -283,26 +284,6 @@ describe('BaseExternalAccountClient', () => {
283284
});
284285
});
285286

286-
describe('universeDomain', () => {
287-
it('should be undefined if not set', () => {
288-
const client = new TestExternalAccountClient(externalAccountOptions);
289-
290-
assert(client.universeDomain === undefined);
291-
});
292-
293-
it('should be set if provided', () => {
294-
const universeDomain = 'universe.domain.com';
295-
const options: BaseExternalAccountClientOptions = Object.assign(
296-
{},
297-
externalAccountOptions
298-
);
299-
options.universe_domain = universeDomain;
300-
const client = new TestExternalAccountClient(options);
301-
302-
assert.equal(client.universeDomain, universeDomain);
303-
});
304-
});
305-
306287
describe('getServiceAccountEmail()', () => {
307288
it('should return the service account email when impersonation is used', () => {
308289
const saEmail = '[email protected]';

0 commit comments

Comments
 (0)