# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # Example provider profile. OpenShell does not load it; import it explicitly: # openshell provider profile lint -f providers/google-cloud.yaml # openshell provider profile import -f providers/google-cloud.yaml --global # # Copy and edit this file rather than importing it unchanged. `binaries` is the # least-privilege control that decides which processes may reach the endpoints # below, so it has to name the paths in *your* image. # # Client binaries: none declared — this profile grants no egress. # Reference layout: any image whose GCP SDKs honour the metadata server. The # sandbox reaches credentials through OpenShell's GCE metadata # emulator, so gcloud, google-cloud-* libraries and anything # else using Application Default Credentials work unmodified. # Credential scope: a gateway-refreshed GCP access token, as GCP_SA_ACCESS_TOKEN # (service-account JWT flow) or GCP_ADC_ACCESS_TOKEN (gcloud # ADC flow). Configure the refresh material with # `openshell provider refresh configure`; the private key and # refresh token stay at the gateway and are never injected. # Endpoint access: none. The profile declares no endpoints, so it grants no # network access on its own. Add the Google API hosts your # workload needs to the sandbox policy, or import a profile # that declares them. # Smoke test: openshell sandbox create --provider -- \ # gcloud auth print-access-token id: google-cloud display_name: Google Cloud (GCP APIs) description: Native GCP SDK credentials for sandboxes via metadata emulator category: other inference_capable: false credentials: # Service account JWT flow: gateway signs a JWT and exchanges it for an # access token. Configure with `openshell provider refresh configure`. - name: service_account_token description: GCP access token minted from service account JWT env_vars: [GCP_SA_ACCESS_TOKEN] required: false auth_style: bearer header_name: authorization refresh: strategy: google_service_account_jwt token_url: https://oauth2.googleapis.com/token scopes: [https://www.googleapis.com/auth/cloud-platform] refresh_before_seconds: 300 max_lifetime_seconds: 3600 material: - name: client_email description: Service account email address required: true - name: private_key description: Service account RSA private key (PEM) required: true secret: true - name: subject description: Email for domain-wide delegation (optional) # ADC OAuth2 flow: gateway exchanges a gcloud ADC refresh token for an # access token. Configure with `openshell provider refresh configure`. - name: adc_token description: GCP access token from gcloud application default credentials env_vars: [GCP_ADC_ACCESS_TOKEN] required: false auth_style: bearer header_name: authorization refresh: strategy: oauth2_refresh_token token_url: https://oauth2.googleapis.com/token scopes: [https://www.googleapis.com/auth/cloud-platform] refresh_before_seconds: 300 max_lifetime_seconds: 3600 material: - name: client_id description: OAuth2 client ID from ADC JSON required: true - name: client_secret description: OAuth2 client secret from ADC JSON required: true secret: true - name: refresh_token description: OAuth2 refresh token from ADC JSON required: true secret: true discovery: credentials: [service_account_token, adc_token]