8000 fix: disable always_use_jwt_access (#72) · googleapis/python-workflows@2085463 · GitHub
[go: up one dir, main page]

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

Commit 2085463

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

File tree

16 files changed

+124
-28
lines changed

16 files changed

+124
-28
lines changed

google/cloud/workflows/executions_v1/services/executions/transports/base.py

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

9898
# Save the scopes.
99-
self._scopes = scopes or self.AUTH_SCOPES
99+
self._scopes = scopes
100100

101101
# If no credentials are provided, then determine the appropriate
102102
# defaults.

google/cloud/workflows/executions_v1/services/executions/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def __init__(
5858
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
5959
quota_project_id: Optional[str] = None,
6060
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
61+
always_use_jwt_access: Optional[bool] = False,
6162
) -> None:
6263
"""Instantiate the transport.
6364
@@ -98,6 +99,8 @@ def __init__(
9899
API requests. If ``None``, then default info will be used.
99100
Generally, you only need to set this if you're developing
100101
your own client library.
102+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
103+
be used for service account credentials.
101104
102105
Raises:
103106
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -150,7 +153,7 @@ def __init__(
150153
scopes=scopes,
151154
quota_project_id=quota_project_id,
152155
client_info=client_info,
153-
always_use_jwt_access=True,
156+
always_use_jwt_access=always_use_jwt_access,
154157
)
155158

156159
if not self._grpc_channel:

google/cloud/workflows/executions_v1/services/executions/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def __init__(
104104
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
105105
quota_project_id=None,
106106
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
107+
always_use_jwt_access: Optional[bool] = False,
107108
) -> None:
108109
"""Instantiate the transport.
109110
@@ -145,6 +146,8 @@ def __init__(
145146
API requests. If ``None``, then default info will be used.
146147
Generally, you only need to set this if you're developing
147148
your own client library.
149+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
150+
be used for service account credentials.
148151
149152
Raises:
150153
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -196,7 +199,7 @@ def __init__(
196199
scopes=scopes,
197200
quota_project_id=quota_project_id,
198201
client_info=client_info,
199-
always_use_jwt_access=True,
202+
always_use_jwt_access=always_use_jwt_access,
200203
)
201204

202205
if not self._grpc_channel:

Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def __init__(
9696
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
9797

9898
# Save the scopes.
99-
self._scopes = scopes or self.AUTH_SCOPES
99+
self._scopes = scopes
100100

101101
# If no credentials are provided, then determine the appropriate
102102
# defaults.

Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def __init__(
5959
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
6060
quota_project_id: Optional[str] = None,
6161
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
62+
always_use_jwt_access: Optional[bool] = False,
6263
) -> None:
6364
"""Instantiate the transport.
6465
@@ -99,6 +100,8 @@ def __init__(
99100
API requests. If ``None``, then default info will be used.
100101
Generally, you only need to set this if you're developing
101102
your own client library.
103+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
104+
be used for service account credentials.
102105
103106
Raises:
104107
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -151,7 +154,7 @@ def __init__(
151154
scopes=scopes,
152155
quota_project_id=quota_project_id,
153156
client_info=client_info,
154-
always_use_jwt_access=True,
157+
always_use_jwt_access=always_use_jwt_access,
155158
)
156159

157160
if not self._grpc_channel:

Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def __init__(
105105
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
106106
quota_project_id=None,
107107
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
108+
always_use_jwt_access: Optional[bool] = False,
108109
) -> None:
109110
"""Instantiate the transport.
110111
@@ -146,6 +147,8 @@ def __init__(
146147
API requests. If ``None``, then default info will be used.
147148
Generally, you only need to set this if you're developing
148149
your own client library.
150+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
151+
be used for service account credentials.
149152
150153
Raises:
151154
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -197,7 +200,7 @@ def __init__(
197200
scopes=scopes,
198201
quota_project_id=quota_project_id,
199202
client_info=client_info,
200-
always_use_jwt_access=True,
203+
always_use_jwt_access=always_use_jwt_access,
201204
)
202205

203206
if not self._grpc_channel:

Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(
9898
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
9999

100100
# Save the scopes.
101-
self._scopes = scopes or self.AUTH_SCOPES
101+
self._scopes = scopes
102102

103103
# If no credentials are provided, then determine the appropriate
104104
# defaults.

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
@@ -154,7 +157,7 @@ def __init__(
154157
scopes=scopes,
155158
quota_project_id=quota_project_id,
156159
client_info=client_info,
157-
always_use_jwt_access=True,
160+
always_use_jwt_access=always_use_jwt_access,
158161
)
159162

160163
if not self._grpc_channel:

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
@@ -200,7 +203,7 @@ def __init__(
200203
scopes=scopes,
201204
quota_project_id=quota_project_id,
202205
client_info=client_info,
203-
always_use_jwt_access=True,
206+
always_use_jwt_access=always_use_jwt_access,
204207
)
205208

206209
if not self._grpc_channel:

Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(
9898
scopes_kwargs = self._get_scopes_kwargs(self._host, scopes)
9999

100100
# Save the scopes.
101-
self._scopes = scopes or self.AUTH_SCOPES
101+
self._scopes = scopes
102102

103103
# If no credentials are provided, then determine the appropriate
104104
# defaults.