Skip to content

Commit c37bf21

Browse files
fix: disable always_use_jwt_access (#395)
fix: disable always_use_jwt_access Committer: @busunkim96 PiperOrigin-RevId: 382142900 Source-Link: googleapis/googleapis@513440f Source-Link: googleapis/googleapis-gen@7b1e2c3
1 parent aaf154b commit c37bf21

File tree

16 files changed

+120
-51
lines changed

16 files changed

+120
-51
lines changed

google/cloud/spanner_admin_database_v1/services/database_admin/transports/base.py

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

110110
# Save the scopes.
111-
self._scopes = scopes or self.AUTH_SCOPES
111+
self._scopes = scopes
112112

113113
# If no credentials are provided, then determine the appropriate
114114
# defaults.

google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def __init__(
6969
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
7070
quota_project_id: Optional[str] = None,
7171
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
72+
always_use_jwt_access: Optional[bool] = False,
7273
) -> None:
7374
"""Instantiate the transport.
7475
@@ -109,6 +110,8 @@ def __init__(
109110
API requests. If ``None``, then default info will be used.
110111
Generally, you only need to set this if you're developing
111112
your own client library.
113+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
114+
be used for service account credentials.
112115
113116
Raises:
114117
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -162,7 +165,7 @@ def __init__(
162165
scopes=scopes,
163166
quota_project_id=quota_project_id,
164167
client_info=client_info,
165-
always_use_jwt_access=True,
168+
always_use_jwt_access=always_use_jwt_access,
166169
)
167170

168171
if not self._grpc_channel:

google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def __init__(
115115
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
116116
quota_project_id=None,
117117
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
118+
always_use_jwt_access: Optional[bool] = False,
118119
) -> None:
119120
"""Instantiate the transport.
120121
@@ -156,6 +157,8 @@ def __init__(
156157
API requests. If ``None``, then default info will be used.
157158
Generally, you only need to set this if you're developing
158159
your own client library.
160+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
161+
be used for service account credentials.
159162
160163
Raises:
161164
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -208,7 +211,7 @@ def __init__(
208211
scopes=scopes,
209212
quota_project_id=quota_project_id,
210213
client_info=client_info,
211-
always_use_jwt_access=True,
214+
always_use_jwt_access=always_use_jwt_access,
212215
)
213216

214217
if not self._grpc_channel:

google/cloud/spanner_admin_database_v1/types/spanner_database_admin.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ class Database(proto.Message):
121121
sure to account for the time from the moment
122122
when the value is queried to the moment when you
123123
initiate the recovery.
124+
default_leader (str):
125+
Output only. The read-write region which contains the
126+
database's leader replicas.
127+
128+
This is the same as the value of default_leader database
129+
option set using DatabaseAdmin.CreateDatabase or
130+
DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this
131+
is empty.
124132
"""
125133

126134
class State(proto.Enum):
@@ -144,6 +152,7 @@ class State(proto.Enum):
144152
earliest_version_time = proto.Field(
145153
proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp,
146154
)
155+
default_leader = proto.Field(proto.STRING, number=9,)
147156

148157

149158
class ListDatabasesRequest(proto.Message):

google/cloud/spanner_admin_instance_v1/services/instance_admin/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/spanner_admin_instance_v1/services/instance_admin/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def __init__(
8282
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
8383
quota_project_id: Optional[str] = None,
8484
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
85+
always_use_jwt_access: Optional[bool] = False,
8586
) -> None:
8687
"""Instantiate the transport.
8788
@@ -122,6 +123,8 @@ def __init__(
122123
API requests. If ``None``, then default info will be used.
123124
Generally, you only need to set this if you're developing
124125
your own client library.
126+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
127+
be used for service account credentials.
125128
126129
Raises:
127130
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -175,7 +178,7 @@ def __init__(
175178
scopes=scopes,
176179
quota_project_id=quota_project_id,
177180
client_info=client_info,
178-
always_use_jwt_access=True,
181+
always_use_jwt_access=always_use_jwt_access,
179182
)
180183

181184
if not self._grpc_channel:

google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc_asyncio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def __init__(
128128
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
129129
quota_project_id=None,
130130
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
131+
always_use_jwt_access: Optional[bool] = False,
131132
) -> None:
132133
"""Instantiate the transport.
133134
@@ -169,6 +170,8 @@ def __init__(
169170
API requests. If ``None``, then default info will be used.
170171
Generally, you only need to set this if you're developing
171172
your own client library.
173+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
174+
be used for service account credentials.
172175
173176
Raises:
174177
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
@@ -221,7 +224,7 @@ def __init__(
221224
scopes=scopes,
222225
quota_project_id=quota_project_id,
223226
client_info=client_info,
224-
always_use_jwt_access=True,
227+
always_use_jwt_access=always_use_jwt_access,
225228
)
226229

227230
if not self._grpc_channel:

google/cloud/spanner_admin_instance_v1/types/spanner_instance_admin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,15 @@ class InstanceConfig(proto.Message):
8888
The geographic placement of nodes in this
8989
instance configuration and their replication
9090
properties.
91+
leader_options (Sequence[str]):
92+
Allowed values of the “default_leader” schema option for
93+
databases in instances that use this instance configuration.
9194
"""
9295

9396
name = proto.Field(proto.STRING, number=1,)
9497
display_name = proto.Field(proto.STRING, number=2,)
9598
replicas = proto.RepeatedField(proto.MESSAGE, number=3, message="ReplicaInfo",)
99+
leader_options = proto.RepeatedField(proto.STRING, number=4,)
96100

97101

98102
class Instance(proto.Message):

google/cloud/spanner_v1/services/spanner/transports/base.py

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

105105
# Save the scopes.
106-
self._scopes = scopes or self.AUTH_SCOPES
106+
self._scopes = scopes
107107

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

google/cloud/spanner_v1/services/spanner/transports/grpc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __init__(
6363
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
6464
quota_project_id: Optional[str] = None,
6565
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
66+
always_use_jwt_access: Optional[bool] = False,
6667
) -> None:
6768
"""Instantiate the transport.
6869
@@ -103,6 +104,8 @@ def __init__(
103104
API requests. If ``None``, then default info will be used.
104105
Generally, you only need to set this if you're developing
105106
your own client library.
107+
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
108+
be used for service account credentials.
106109
107110
Raises:
108111
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
@@ -155,7 +158,7 @@ def __init__(
155158
scopes=scopes,
156159
quota_project_id=quota_project_id,
157160
client_info=client_info,
158-
always_use_jwt_access=True,
161+
always_use_jwt_access=always_use_jwt_access,
159162
)
160163

161164
if not self._grpc_channel:

0 commit comments

Comments
 (0)