You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/toolbox-llamaindex/README.md
+19-6Lines changed: 19 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -173,22 +173,31 @@ connecting to a Toolbox server instance that requires authentication. This is
173
173
crucial for securing your Toolbox server endpoint, especially when deployed on
174
174
platforms like Cloud Run, GKE, or any environment where unauthenticated access is restricted.
175
175
176
-
This client-to-server authentication ensures that the Toolbox server can verify the identity of the client making the request before any tool is loaded or called. It is different from [Authenticating Tools](#authenticating-tools), which deals with providing credentials for specific tools within an already connected Toolbox session.
176
+
This client-to-server authentication ensures that the Toolbox server can verify
177
+
the identity of the client making the request before any tool is loaded or
178
+
called. It is different from [Authenticating Tools](#authenticating-tools),
179
+
which deals with providing credentials for specific tools within an already
180
+
connected Toolbox session.
177
181
178
182
### When is Client-to-Server Authentication Needed?
179
183
180
-
You'll need this type of authentication if your Toolbox server is configured to deny unauthenticated requests. For example:
184
+
You'll need this type of authentication if your Toolbox server is configured to
185
+
deny unauthenticated requests. For example:
181
186
182
187
- Your Toolbox server is deployed on Cloud Run and configured to "Require authentication."
183
-
- Your server is behind an Identity-Aware Proxy (IAP) or a similar authentication layer.
188
+
- Your server is behind an Identity-Aware Proxy (IAP) or a similar
189
+
authentication layer.
184
190
- You have custom authentication middleware on your self-hosted Toolbox server.
185
191
186
192
Without proper client authentication in these scenarios, attempts to connect or
187
193
make calls (like `load_tool`) will likely fail with `Unauthorized` errors.
188
194
189
195
### How it works
190
196
191
-
The `ToolboxClient` (and `ToolboxSyncClient`) allows you to specify functions (or coroutines for the async client) that dynamically generate HTTP headers for every request sent to the Toolbox server. The most common use case is to add an Authorization header with a bearer token (e.g., a Google ID token).
197
+
The `ToolboxClient` allows you to specify functions (or coroutines for the async
198
+
client) that dynamically generate HTTP headers for every request sent to the
199
+
Toolbox server. The most common use case is to add an Authorization header with
200
+
a bearer token (e.g., a Google ID token).
192
201
193
202
These header-generating functions are called just before each request, ensuring
194
203
that fresh credentials or header values can be used.
@@ -202,7 +211,10 @@ You can configure these dynamic headers in two ways:
0 commit comments