From cbce0e4bb825372582493e29cc5b4cdf7f45c356 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:30:15 +0000 Subject: [PATCH] feat: turns on self-signed JWT feature flag (#542) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- packages/google-cloud-asset/src/v1/asset_service_client.ts | 7 +++++++ .../src/v1p1beta1/asset_service_client.ts | 6 ++++++ .../src/v1p2beta1/asset_service_client.ts | 6 ++++++ .../src/v1p4beta1/asset_service_client.ts | 7 +++++++ .../src/v1p5beta1/asset_service_client.ts | 6 ++++++ 5 files changed, 32 insertions(+) diff --git a/packages/google-cloud-asset/src/v1/asset_service_client.ts b/packages/google-cloud-asset/src/v1/asset_service_client.ts index f6016afb811..8c115bb4b07 100644 --- a/packages/google-cloud-asset/src/v1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1/asset_service_client.ts @@ -133,6 +133,12 @@ export class AssetServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; @@ -3112,6 +3118,7 @@ export class AssetServiceClient { return this.assetServiceStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts index a749e2e655d..4ad954dd9b3 100644 --- a/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p1beta1/asset_service_client.ts @@ -130,6 +130,12 @@ export class AssetServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; diff --git a/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts index f3e6ca6b1a2..43e4ace69e8 100644 --- a/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p2beta1/asset_service_client.ts @@ -122,6 +122,12 @@ export class AssetServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; diff --git a/packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts index e9741134f50..8f682983863 100644 --- a/packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p4beta1/asset_service_client.ts @@ -128,6 +128,12 @@ export class AssetServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; @@ -576,6 +582,7 @@ export class AssetServiceClient { return this.assetServiceStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts b/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts index b4a12952a22..b3bafc68aa2 100644 --- a/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts +++ b/packages/google-cloud-asset/src/v1p5beta1/asset_service_client.ts @@ -131,6 +131,12 @@ export class AssetServiceClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = staticMembers.servicePath; + // Set the default scopes in auth client if needed. if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes;