Skip to content

Commit 3ffbc32

Browse files
authored
Add SPA fields to beyondcorp_security_gateway (#15322)
1 parent 06d0745 commit 3ffbc32

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed

mmv1/products/beyondcorp/SecurityGateway.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ examples:
3737
region_override: 'global'
3838
vars:
3939
security_gateway_name: default
40+
- name: beyondcorp_security_gateway_spa
41+
primary_resource_id: example-spa
42+
primary_resource_name: 'fmt.Sprintf("default-spa%s", context["random_suffix"])'
43+
region_override: 'global'
44+
vars:
45+
security_gateway_name: default-spa
4046
autogen_async: true
4147
async:
4248
operation:
@@ -144,3 +150,87 @@ properties:
144150
description: |-
145151
Service account used for operations that involve resources in consumer projects.
146152
output: true
153+
- name: proxyProtocolConfig
154+
type: NestedObject
155+
description: Shared proxy configuration for all apps.
156+
properties:
157+
- name: allowedClientHeaders
158+
type: Array
159+
description: The configuration for the proxy.
160+
item_type:
161+
type: string
162+
- name: contextualHeaders
163+
type: NestedObject
164+
description: Configuration for the contextual headers.
165+
properties:
166+
- name: userInfo
167+
type: NestedObject
168+
description: User info configuration.
169+
properties:
170+
- name: outputType
171+
type: Enum
172+
description: The output type of the delegated user info.
173+
enum_values:
174+
- 'PROTOBUF'
175+
- 'JSON'
176+
- 'NONE'
177+
- name: groupInfo
178+
type: NestedObject
179+
description: Group info configuration.
180+
properties:
181+
- name: outputType
182+
type: Enum
183+
description: The output type of the delegated group info.
184+
enum_values:
185+
- 'PROTOBUF'
186+
- 'JSON'
187+
- 'NONE'
188+
- name: deviceInfo
189+
type: NestedObject
190+
description: Device info configuration.
191+
properties:
192+
- name: outputType
193+
type: Enum
194+
description: The output type of the delegated device info.
195+
enum_values:
196+
- 'PROTOBUF'
197+
- 'JSON'
198+
- 'NONE'
199+
- name: outputType
200+
type: Enum
201+
description: Default output type for all enabled headers.
202+
enum_values:
203+
- 'PROTOBUF'
204+
- 'JSON'
205+
- 'NONE'
206+
- name: metadataHeaders
207+
type: KeyValuePairs
208+
description: |-
209+
Custom resource specific headers along with the values.
210+
The names should conform to RFC 9110:
211+
> Field names SHOULD constrain themselves to alphanumeric characters, "-",
212+
and ".", and SHOULD begin with a letter.
213+
> Field values SHOULD contain only ASCII printable characters and tab.
214+
- name: gatewayIdentity
215+
type: Enum
216+
description: Gateway identity configuration.
217+
enum_values:
218+
- 'RESOURCE_NAME'
219+
- name: clientIp
220+
type: Boolean
221+
description: Client IP configuration. The client IP address is included if true.
222+
- name: serviceDiscovery
223+
type: NestedObject
224+
description: Settings related to the Service Discovery.
225+
properties:
226+
- name: apiGateway
227+
type: NestedObject
228+
description: External API configuration.
229+
properties:
230+
- name: resourceOverride
231+
type: NestedObject
232+
description: Enables fetching resource model updates to alter service behavior per Chrome profile.
233+
properties:
234+
- name: path
235+
type: String
236+
description: Contains uri path fragment where HTTP request is sent.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
resource "google_beyondcorp_security_gateway" "{{$.PrimaryResourceId}}" {
2+
security_gateway_id = "{{index $.Vars "security_gateway_name"}}"
3+
display_name = "My SPA Security Gateway resource"
4+
proxy_protocol_config {
5+
allowed_client_headers = ["header1", "header2"]
6+
contextual_headers {
7+
user_info {
8+
output_type = "PROTOBUF"
9+
}
10+
group_info {
11+
output_type = "JSON"
12+
}
13+
device_info {
14+
output_type = "NONE"
15+
}
16+
output_type = "NONE"
17+
}
18+
metadata_headers = {
19+
metadata-header1 = "value1"
20+
metadata-header2 = "value2"
21+
}
22+
gateway_identity = "RESOURCE_NAME"
23+
client_ip = true
24+
}
25+
service_discovery {
26+
api_gateway {
27+
resource_override {
28+
path = "/api/v1/routes"
29+
}
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)