Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 23:30 UTC
docs(changelog): mask tokens for Composio-managed auth configs
Customer-facing changelog entry for SEC-331. Explains the behavior change, the shared-OAuth-app rationale, affected endpoints, and the migration path (bring-your-own auth config) for anyone reading raw tokens from connected-account responses today.
Anshu Garg committed
Apr 21, 2026 at 01:29 UTC
ba245bd3e51d658b9099956b69389b5e0aaef085
1 file changed
+81
docs/content/changelog/04-21-26-composio-managed-credentials-masking.mdx
new
+81
@@ -0,0 +1,81 @@
1
+---
2
+title: "Composio-Managed Auth Configs Always Mask Access and Refresh Tokens"
3
+description: "API responses no longer return raw access or refresh tokens for connections on Composio-managed auth configs, regardless of project masking settings. Connections on your own auth config are unchanged."
4
+date: "2026-04-21"
5
+---
6
+
7
+Access tokens, refresh tokens, and the `Authorization` header returned by the connected-accounts API are now always masked for connections created through **Composio-managed auth configs**, regardless of the project's `mask_secret_keys_in_connected_account` setting. Connections created through your own auth config are unchanged.
8
+
9
+## What is a Composio-managed auth config?
10
+
11
+When you use a toolkit's default integration — for example, connecting a user to Gmail or Slack without registering your own OAuth application — the connection runs through an OAuth app that **Composio owns and shares across every customer on that default**. The access and refresh tokens the provider issues against that connection are bound to Composio's shared OAuth client, not to any credentials of yours.
12
+
13
+You can tell a connection is Composio-managed by the `auth_config.is_composio_managed: true` field on the connected-account resource.
14
+
15
+## Why this change
16
+
17
+Because the OAuth application is shared, any enforcement the provider applies to it — rate limits, scope restrictions, or app-level bans — lands on **every** customer using that default integration. A single token used in ways that violate a provider's terms of service can degrade or break the default Gmail, Slack, or any other managed integration for every other customer on it.
18
+
19
+Returning the raw tokens to the caller invited that risk. From now on, the connected-accounts API never exposes them. Composio continues to hold and use the tokens server-side to execute tools on your behalf.
20
+
21
+## What's changing in the API
22
+
23
+| Auth config | `mask_secret_keys_in_connected_account` | Tokens returned |
24
+|---|---|---|
25
+| Composio-managed | on | masked (unchanged) |
26
+| Composio-managed | **off** | **masked (new)** |
27
+| Your own auth config | on | masked (unchanged) |
28
+| Your own auth config | off | raw (unchanged) |
29
+
30
+### Example
31
+
32
+Before (project masking off, Composio-managed Gmail connection):
33
+
34
+```json
35
+{
36
+ "state": {
37
+ "val": {
38
+ "access_token": "ya29.a0ARrdaM9_full_secret_token",
39
+ "refresh_token": "1//04_full_refresh_secret"
40
+ }
41
+ }
42
+}
43
+```
44
+
45
+After:
46
+
47
+```json
48
+{
49
+ "state": {
50
+ "val": {
51
+ "access_token": "ya29...",
52
+ "refresh_token": "1//0..."
53
+ }
54
+ }
55
+}
56
+```
57
+
58
+The same masking is applied wherever the same values appear in the response, including the `data`, `params`, and merged `headers.Authorization` fields.
59
+
60
+### Affected endpoints
61
+
62
+- [`GET /api/v3/connected_accounts/{id}`](https://docs.composio.dev/rest-api/connected-accounts/get-connected-accounts-by-nanoid)
63
+- [`GET /api/v3/connected_accounts`](https://docs.composio.dev/rest-api/connected-accounts/get-connected-accounts)
64
+- [`POST /api/v3/connected_accounts`](https://docs.composio.dev/rest-api/connected-accounts/post-connected-accounts)
65
+
66
+### What's not affected
67
+
68
+- **Tool execution** — `POST /api/v3/tools/execute/*`, Tool Router, and MCP continue to work. Composio uses the tokens server-side; your agents do not need to see them.
69
+- **Connections on your own auth config** — token visibility still follows your project's masking setting exactly as before.
70
+
71
+## Need raw tokens? Bring your own auth config
72
+
73
+Tokens issued against your own OAuth application belong to you, and the connected-accounts API returns them in the clear (subject to your project's masking setting). To move a connection off the shared default:
74
+
75
+1. Register an OAuth application with the provider (e.g., in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials) for Gmail).
76
+2. [Create a custom auth config](https://docs.composio.dev/rest-api/auth-configs/post-auth-configs) with your credentials.
77
+3. Initiate new connections against that auth config.
78
+
79
+<Callout type="warn">
80
+**Action required only if you read `access_token` or `refresh_token` from the connected-accounts API for Composio-managed connections.** Existing tool-execution flows (the SDK, Tool Router, MCP) do not look at those fields and continue to work without changes. If your code path does depend on raw tokens, migrate those connections to your own auth config.
81
+</Callout>