Skip to content

Commit ffadce2

Browse files
docs(mcp): clarify untrusted dotenv env-loading behavior in load_secrets
Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent 3d0946a commit ffadce2

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

airbyte/mcp/_config.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,16 @@ def load_secrets_to_env_vars() -> None:
4343
4444
When trusted execution is disabled (`airbyte.mcp._guards.is_trusted_execution_enabled`),
4545
the dotenv and Google Secret Manager backends are *not* registered as secret sources.
46-
This prevents an untrusted (for example hosted HTTP) deployment from resolving
47-
server-side secrets into connector config via `config_secret_name` /
48-
`secret_reference::`. Ordinary environment variables are still loaded from any
49-
referenced dotenv file so that safe, non-secret-manager configuration continues to
50-
work.
46+
This stops an untrusted (for example hosted HTTP) deployment from resolving server-side
47+
secrets into connector config via `config_secret_name` / `secret_reference::`.
48+
49+
The dotenv file itself is still loaded into `os.environ` even when untrusted, so ordinary
50+
environment-variable configuration keeps working. Note this loads *every* key from the
51+
file (secret values included) into the process environment; that is acceptable because
52+
both dotenv sources are server-owned (a server-side `.envrc` or the operator-set
53+
`AIRBYTE_MCP_ENV_FILE`) and are never caller-controllable, and the function-layer guards
54+
in `airbyte.mcp._arg_resolvers.resolve_connector_config` are what actually block an
55+
untrusted caller from resolving those values.
5156
"""
5257
trusted = is_trusted_execution_enabled()
5358

0 commit comments

Comments
 (0)