-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathgoogle-cloud.yaml
More file actions
89 lines (84 loc) · 3.85 KB
/
Copy pathgoogle-cloud.yaml
File metadata and controls
89 lines (84 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# 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 <name> -- \
# 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]