Skip to content

Commit 2867a80

Browse files
gcf-owl-bot[bot]bcoe
andauthored
feat: turns on self-signed JWT feature flag (#1455)
PiperOrigin-RevId: 392067151 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: bcoe <bencoe@google.com>
1 parent b22dd87 commit 2867a80

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

.kokoro/pre-system-test.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/v1/database_admin_client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ export class DatabaseAdminClient {
138138
// Save the auth object to the client, for use by other methods.
139139
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
140140

141+
// Set useJWTAccessWithScope on the auth object.
142+
this.auth.useJWTAccessWithScope = true;
143+
144+
// Set defaultServicePath on the auth object.
145+
this.auth.defaultServicePath = staticMembers.servicePath;
146+
141147
// Set the default scopes in auth client if needed.
142148
if (servicePath === staticMembers.servicePath) {
143149
this.auth.defaultScopes = staticMembers.scopes;
@@ -3370,6 +3376,7 @@ export class DatabaseAdminClient {
33703376
return this.databaseAdminStub!.then(stub => {
33713377
this._terminated = true;
33723378
stub.close();
3379+
this.operationsClient.close();
33733380
});
33743381
}
33753382
return Promise.resolve();

src/v1/instance_admin_client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ export class InstanceAdminClient {
153153
// Save the auth object to the client, for use by other methods.
154154
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
155155

156+
// Set useJWTAccessWithScope on the auth object.
157+
this.auth.useJWTAccessWithScope = true;
158+
159+
// Set defaultServicePath on the auth object.
160+
this.auth.defaultServicePath = staticMembers.servicePath;
161+
156162
// Set the default scopes in auth client if needed.
157163
if (servicePath === staticMembers.servicePath) {
158164
this.auth.defaultScopes = staticMembers.scopes;
@@ -1926,6 +1932,7 @@ export class InstanceAdminClient {
19261932
return this.instanceAdminStub!.then(stub => {
19271933
this._terminated = true;
19281934
stub.close();
1935+
this.operationsClient.close();
19291936
});
19301937
}
19311938
return Promise.resolve();

src/v1/spanner_client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ export class SpannerClient {
134134
// Save the auth object to the client, for use by other methods.
135135
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
136136

137+
// Set useJWTAccessWithScope on the auth object.
138+
this.auth.useJWTAccessWithScope = true;
139+
140+
// Set defaultServicePath on the auth object.
141+
this.auth.defaultServicePath = staticMembers.servicePath;
142+
137143
// Set the default scopes in auth client if needed.
138144
if (servicePath === staticMembers.servicePath) {
139145
this.auth.defaultScopes = staticMembers.scopes;

0 commit comments

Comments
 (0)