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
refactor(auth): rename ADC secret from GOOGLE_APPLICATION_CREDENTIALS to gcloud-adc
The GOOGLE_APPLICATION_CREDENTIALS name was ambiguous — it collides with
the standard GCP env var of the same name (which holds a path to a file),
making it confusing when used as a secret key whose value is file contents.
Rename the special file-type secret to "gcloud-adc". This secret writes
ADC contents to ~/.config/gcloud/application_default_credentials.json
inside the container, where the GCP SDK auto-discovers it. Scion no
longer sets the GOOGLE_APPLICATION_CREDENTIALS env var for vertex-ai
auth, since the well-known path suffices.
Users who need conventional GOOGLE_APPLICATION_CREDENTIALS usage can set
up both an environment-type secret (with the path value) and a file
secret (that writes the credential file) independently.
Also removes the now-unused GoogleAppCredentialsExplicit field from
AuthConfig, since no harness conditionally sets the env var anymore.
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/advanced-local/agent-credentials.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ scion hub secret set GEMINI_API_KEY "AIza..."
77
77
Uses Google Cloud's Vertex AI endpoints with Application Default Credentials (ADC).
78
78
79
79
**Required Sources:**
80
-
-`GOOGLE_APPLICATION_CREDENTIALS`: Path to the ADC JSON file (automatically discovered at `~/.config/gcloud/application_default_credentials.json` if present locally).
80
+
- ADC JSON file: Automatically discovered at `~/.config/gcloud/application_default_credentials.json` if present locally. In Hub mode, upload via the `gcloud-adc` file secret.
81
81
-`GOOGLE_CLOUD_PROJECT`: Your Google Cloud project ID.
82
82
-`GOOGLE_CLOUD_REGION`: The region (e.g., `us-east5`). Required for Claude, optional but recommended for Gemini.
83
83
@@ -90,18 +90,22 @@ scion start --harness claude my-agent
90
90
```
91
91
92
92
**Hub Setup:**
93
-
For Hub mode, you must upload the ADC file as a file-type secret and set the environment variables via the Web Interface or CLI:
93
+
For Hub mode, you must upload the ADC file as the `gcloud-adc` file secret and set the environment variables via the Web Interface or CLI:
94
94
```bash
95
-
# 1. Upload the credential file
95
+
# 1. Upload the ADC credential file (written to ~/.config/gcloud/application_default_credentials.json in container)
scion hub secret set GOOGLE_CLOUD_PROJECT "my-project"
102
102
scion hub secret set GOOGLE_CLOUD_REGION "us-east5"
103
103
```
104
104
105
+
:::note
106
+
The `gcloud-adc` secret writes the ADC file to the well-known GCP path inside the container. The GCP SDK auto-discovers it there, so Scion does **not** set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable. If you need to use `GOOGLE_APPLICATION_CREDENTIALS` for other purposes (e.g., pointing to a non-standard path), set it up as a separate environment-type secret alongside a file secret that writes the credential file.
107
+
:::
108
+
105
109
### Harness specific credential file (`auth-file`)
106
110
107
111
Some harnesses support their own specific credential files, such as OAuth tokens.
returnnil, fmt.Errorf("claude: no valid auth method found; set ANTHROPIC_API_KEY for direct API access, or provide GOOGLE_APPLICATION_CREDENTIALS + GOOGLE_CLOUD_PROJECT + GOOGLE_CLOUD_REGION for Vertex AI")
365
+
returnnil, fmt.Errorf("claude: no valid auth method found; set ANTHROPIC_API_KEY for direct API access, or provide ADC (gcloud-adc secret or ~/.config/gcloud/application_default_credentials.json) + GOOGLE_CLOUD_PROJECT + GOOGLE_CLOUD_REGION for Vertex AI")
0 commit comments