Skip to content

Commit b66054d

Browse files
google-genai-botcopybara-github
authored andcommitted
fix: Add Spanner admin scope to Spanner tool default Oauth scopes
PiperOrigin-RevId: 795519063
1 parent 8a9a271 commit b66054d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/google/adk/tools/spanner/spanner_credentials.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
from .._google_credentials import BaseGoogleCredentialsConfig
1919

2020
SPANNER_TOKEN_CACHE_KEY = "spanner_token_cache"
21-
SPANNER_DEFAULT_SCOPE = ["https://www.googleapis.com/auth/spanner.data"]
21+
SPANNER_DEFAULT_SCOPE = [
22+
"https://www.googleapis.com/auth/spanner.admin",
23+
"https://www.googleapis.com/auth/spanner.data",
24+
]
2225

2326

2427
@experimental

tests/unittests/tools/spanner/test_spanner_credentials.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def test_valid_credentials_object_oauth2_credentials(self):
4848
assert config.client_id == "test_client_id"
4949
assert config.client_secret == "test_client_secret"
5050
assert config.scopes == [
51+
"https://www.googleapis.com/auth/spanner.admin",
5152
"https://www.googleapis.com/auth/spanner.data",
5253
]
5354

0 commit comments

Comments
 (0)