Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit c194a00

Browse files
fix: disable always_use_jwt_access (#171)
Committer: @busunkim96 PiperOrigin-RevId: 382142900 Source-Link: googleapis/googleapis@513440f Source-Link: https://github.com/googleapis/googleapis-gen/commit/7b1e2c31233f79a704ec21ca410bf661d6bc68d0
1 parent 556b7fe commit c194a00

File tree

28 files changed

+217
-136
lines changed

28 files changed

+217
-136
lines changed

google/cloud/monitoring_v3/services/alert_policy_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(
104104
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
105105

106106
# Save the scopes.
107-
self._scopes = scopes or self.AUTH_SCOPES
107+
self._scopes = scopes
108108

109109
# If no credentials are provided, then determine the appropriate
110110
# defaults.

google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __init__(
6767
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
6868
quota_project_id: Optional[str] = None,
6969
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
70+
always_use_jwt_access: Optional[bool] = False,
7071
) -> None:
7172
"""Instantiate the transport.
7273
@@ -107,6 +108,8 @@ def __init__(
107108
API requests. If ``None``, then default info will be used.
108109
Generally, you only need to set this if you're developing
109110
your own client library.
111+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
112+
be used for service account credentials.
110113
111114
Raises:
112115
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -159,7 +162,7 @@ def __init__(
159162
scopes=scopes,
160163
quota_project_id=quota_project_id,
161164
client_info=client_info,
162-
always_use_jwt_access=True,
165+
always_use_jwt_access=always_use_jwt_access,
163166
)
164167

165168
if not self._grpc_channel:

google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def __init__(
113113
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
114114
quota_project_id=None,
115115
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
116+
always_use_jwt_access: Optional[bool] = False,
116117
) -> None:
117118
"""Instantiate the transport.
118119
@@ -154,6 +155,8 @@ def __init__(
154155
API requests. If ``None``, then default info will be used.
155156
Generally, you only need to set this if you're developing
156157
your own client library.
158+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
159+
be used for service account credentials.
157160
158161
Raises:
159162
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -205,7 +208,7 @@ def __init__(
205208
scopes=scopes,
206209
quota_project_id=quota_project_id,
207210
client_info=client_info,
208-
always_use_jwt_access=True,
211+
always_use_jwt_access=always_use_jwt_access,
209212
)
210213

211214
if not self._grpc_channel:

google/cloud/monitoring_v3/services/group_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __init__(
105105
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
106106

107107
# Save the scopes.
108-
self._scopes = scopes or self.AUTH_SCOPES
108+
self._scopes = scopes
109109

110110
# If no credentials are provided, then determine the appropriate
111111
# defaults.

google/cloud/monitoring_v3/services/group_service/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def __init__(
7171
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
7272
quota_project_id: Optional[str] = None,
7373
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
74+
always_use_jwt_access: Optional[bool] = False,
7475
) -> None:
7576
"""Instantiate the transport.
7677
@@ -111,6 +112,8 @@ def __init__(
111112
API requests. If ``None``, then default info will be used.
112113
Generally, you only need to set this if you're developing
113114
your own client library.
115+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
116+
be used for service account credentials.
114117
115118
Raises:
116119
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -163,7 +166,7 @@ def __init__(
163166
scopes=scopes,
164167
quota_project_id=quota_project_id,
165168
client_info=client_info,
166-
always_use_jwt_access=True,
169+
always_use_jwt_access=always_use_jwt_access,
167170
)
168171

169172
if not self._grpc_channel:

google/cloud/monitoring_v3/services/group_service/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def __init__(
117117
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
118118
quota_project_id=None,
119119
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
120+
always_use_jwt_access: Optional[bool] = False,
120121
) -> None:
121122
"""Instantiate the transport.
122123
@@ -158,6 +159,8 @@ def __init__(
158159
API requests. If ``None``, then default info will be used.
159160
Generally, you only need to set this if you're developing
160161
your own client library.
162+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
163+
be used for service account credentials.
161164
162165
Raises:
163166
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -209,7 +212,7 @@ def __init__(
209212
scopes=scopes,
210213
quota_project_id=quota_project_id,
211214
client_info=client_info,
212-
always_use_jwt_access=True,
215+
always_use_jwt_access=always_use_jwt_access,
213216
)
214217

215218
if not self._grpc_channel:

google/cloud/monitoring_v3/services/metric_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __init__(
106106
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
107107

108108
# Save the scopes.
109-
self._scopes = scopes or self.AUTH_SCOPES
109+
self._scopes = scopes
110110

111111
# If no credentials are provided, then determine the appropriate
112112
# defaults.

google/cloud/monitoring_v3/services/metric_service/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def __init__(
6161
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
6262
quota_project_id: Optional[str] = None,
6363
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
64+
always_use_jwt_access: Optional[bool] = False,
6465
) -> None:
6566
"""Instantiate the transport.
6667
@@ -101,6 +102,8 @@ def __init__(
101102
API requests. If ``None``, then default info will be used.
102103
Generally, you only need to set this if you're developing
103104
your own client library.
105+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
106+
be used for service account credentials.
104107
105108
Raises:
106109
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -153,7 +156,7 @@ def __init__(
153156
scopes=scopes,
154157
quota_project_id=quota_project_id,
155158
client_info=client_info,
156-
always_use_jwt_access=True,
159+
always_use_jwt_access=always_use_jwt_access,
157160
)
158161

159162
if not self._grpc_channel:

google/cloud/monitoring_v3/services/metric_service/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ def __init__(
107107
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
108108
quota_project_id=None,
109109
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
110+
always_use_jwt_access: Optional[bool] = False,
110111
) -> None:
111112
"""Instantiate the transport.
112113
@@ -148,6 +149,8 @@ def __init__(
148149
API requests. If ``None``, then default info will be used.
149150
Generally, you only need to set this if you're developing
150151
your own client library.
152+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
153+
be used for service account credentials.
151154
152155
Raises:
153156
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -199,7 +202,7 @@ def __init__(
199202
scopes=scopes,
200203
quota_project_id=quota_project_id,
201204
client_info=client_info,
202-
always_use_jwt_access=True,
205+
always_use_jwt_access=always_use_jwt_access,
203206
)
204207

205208
if not self._grpc_channel:

google/cloud/monitoring_v3/services/notification_channel_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(
104104
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
105105

106106
# Save the scopes.
107-
self._scopes = scopes or self.AUTH_SCOPES
107+
self._scopes = scopes
108108

109109
# If no credentials are provided, then determine the appropriate
110110
# defaults.

0 commit comments

Comments
 (0)