Skip to content

Commit f28ea49

Browse files
twishabansalAnujJhunjhunwala
authored andcommitted
docs: fix to include correct way to authenticate to cloud run instances (googleapis#896)
Corresponding to googleapis/mcp-toolbox-sdk-python#313
1 parent 7161ecc commit f28ea49

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

docs/en/how-to/deploy_toolbox.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,22 +133,16 @@ section.
133133

134134
## Connecting with Toolbox Client SDK
135135

136-
You can connect to Toolbox Cloud Run instances directly through the SDK
136+
You can connect to Toolbox Cloud Run instances directly through the SDK.
137137

138138
1. [Set up `Cloud Run Invoker` role
139139
access](https://cloud.google.com/run/docs/securing/managing-access#service-add-principals)
140140
to your Cloud Run service.
141141

142-
1. Set up [Application Default
142+
1. (Only for local runs) Set up [Application Default
143143
Credentials](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment)
144144
for the principle you set up the `Cloud Run Invoker` role access to.
145145

146-
{{< notice tip >}}
147-
If you're working in some other environment than local, set up [environment
148-
specific Default
149-
Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc).
150-
{{< /notice >}}
151-
152146
1. Run the following to retrieve a non-deterministic URL for the cloud run service:
153147

154148
```bash
@@ -160,9 +154,11 @@ You can connect to Toolbox Cloud Run instances directly through the SDK
160154
```python
161155
from toolbox_core import ToolboxClient, auth_methods
162156
163-
auth_token_provider = auth_methods.aget_google_id_token # can also use sync method
164-
165157
# Replace with the Cloud Run service URL generated in the previous step.
158+
URL = "https://cloud-run-url.app"
159+
160+
auth_token_provider = auth_methods.aget_google_id_token(URL) # can also use sync method
161+
166162
async with ToolboxClient(
167163
URL,
168164
client_headers={"Authorization": auth_token_provider},

0 commit comments

Comments
 (0)