Skip to content

Commit d2ed90d

Browse files
committed
fix: added missing validations in frontend module
1 parent 8f71d18 commit d2ed90d

File tree

2 files changed

+43
-10
lines changed

2 files changed

+43
-10
lines changed

modules/backend/metadata.display.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ spec:
5858
name: header_name
5959
title: Header Name
6060
regexValidation: ^[!#$%&'*+.^_\\`|~0-9A-Za-z-]+$
61-
validation: Must be a valid HTTP header name consisting of letters, digits, and these special characters: ! # $ % & ' * + . ^ _ \ | ~ -`. No spaces or other special characters allowed
61+
validation: Must contain letters (a–z, A–Z), numbers (0–9), and the special characters [! # $ % & ' * + . ^ _ ` | ~ -].
6262
cache_key_policy:
6363
name: cache_key_policy
6464
title: Cache Key Policy
@@ -67,17 +67,17 @@ spec:
6767
name: query_string_blacklist
6868
title: Query String Blacklist
6969
regexValidation: ^[a-zA-Z0-9_-]+$
70-
validation: Must be a valid query string parameter name.
70+
validation: Must only contain letters (a–z, A–Z), numbers (0–9), underscores (_), or hyphens (-)
7171
query_string_whitelist:
7272
name: query_string_whitelist
7373
title: Query String Whitelist
7474
regexValidation: ^[a-zA-Z0-9_-]+$
75-
validation: Must be a valid query string parameter name.
75+
validation: Must only contain letters (a–z, A–Z), numbers (0–9), underscores (_), or hyphens (-)
7676
include_http_headers:
7777
name: include_http_headers
7878
title: Include Http Headers
7979
regexValidation: ^[!#$%&'*+.^_\\`|~0-9A-Za-z-]+$
80-
validation: Must be a valid HTTP header name consisting of letters, digits, and these special characters: ! # $ % & ' * + . ^ _ \ | ~ -`. No spaces or other special characters allowed
80+
validation: Must contain letters (a–z, A–Z), numbers (0–9), and the special characters [! # $ % & ' * + . ^ _ ` | ~ -]
8181
include_named_cookies:
8282
name: include_named_cookies
8383
title: Include Named Cookies
@@ -98,12 +98,12 @@ spec:
9898
name: custom_request_headers
9999
title: Custom Request Headers
100100
regexValidation: ^[!#$%&'*+.^_\\`|~0-9A-Za-z-]+$
101-
validation: Must be a valid HTTP header name consisting of letters, digits, and these special characters: ! # $ % & ' * + . ^ _ \ | ~ -`. No spaces or other special characters allowed
101+
validation: Must contain letters (a–z, A–Z), numbers (0–9), and the special characters [! # $ % & ' * + . ^ _ ` | ~ -]
102102
custom_response_headers:
103103
name: custom_response_headers
104104
title: Custom Response Headers
105105
regexValidation: ^[!#$%&'*+.^_\\`|~0-9A-Za-z-]+$
106-
validation: Must be a valid HTTP header name consisting of letters, digits, and these special characters: ! # $ % & ' * + . ^ _ \ | ~ -`. No spaces or other special characters allowed
106+
validation: Must contain letters (a–z, A–Z), numbers (0–9), and the special characters [! # $ % & ' * + . ^ _ ` | ~ -]
107107
description:
108108
name: description
109109
title: Description
@@ -229,10 +229,6 @@ spec:
229229
value: EXTERNAL_MANAGED
230230
- label: INTERNAL_MANAGED
231231
value: INTERNAL_MANAGED
232-
- label: EXTERNAL
233-
value: EXTERNAL
234-
- label: INTERNAL_SELF_MANAGED
235-
value: INTERNAL_SELF_MANAGED
236232
locality_lb_policy:
237233
name: locality_lb_policy
238234
title: Locality Lb Policy

modules/frontend/metadata.display.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,16 @@ spec:
3131
address:
3232
name: address
3333
title: Address
34+
regexValidation: ^((([0-9]{1,3}\.){3}[0-9]{1,3})|(([0-9A-Fa-f]{1,4}:){1,7}[0-9A-Fa-f]{1,4}))$
35+
validation: Must be a valid IPv4 address.
3436
certificate:
3537
name: certificate
3638
title: Certificate
3739
certificate_map:
3840
name: certificate_map
3941
title: Certificate Map
42+
regexValidation: ^//certificatemanager\.googleapis\.com/projects/[a-z][a-z0-9-]{0,61}[a-z0-9]/locations/global/certificateMaps/[a-zA-Z][a-zA-Z0-9_-]{0,62}[a-zA-Z0-9]$
43+
validation: full resource path of a GCP CertificateMap resource
4044
create_address:
4145
name: create_address
4246
title: Create Address
@@ -70,6 +74,8 @@ spec:
7074
ipv6_address:
7175
name: ipv6_address
7276
title: Ipv6 Address
77+
regexValidation: ^(([0-9A-Fa-f]{1,4}:){1,7}[0-9A-Fa-f]{1,4}|::1|::)$
78+
validation: Must be a valid IPv6 address.
7379
labels:
7480
name: labels
7581
title: Labels
@@ -92,6 +98,8 @@ spec:
9298
network:
9399
name: network
94100
title: Network
101+
regexValidation: ^(projects\/[a-z0-9\-]+\/global\/networks\/[a-zA-Z0-9\-_]+|[a-zA-Z0-9\-_]+)$
102+
validation: Network must be a valid network name or a full resource path.
95103
private_key:
96104
name: private_key
97105
title: Private Key
@@ -101,24 +109,53 @@ spec:
101109
quic:
102110
name: quic
103111
title: Quic
112+
enumValueLabels:
113+
- label: ENABLE
114+
value: ENABLE
115+
- label: DISABLE
116+
value: DISABLE
117+
- label: NONE
118+
value: NONE
104119
random_certificate_suffix:
105120
name: random_certificate_suffix
106121
title: Random Certificate Suffix
107122
server_tls_policy:
108123
name: server_tls_policy
109124
title: Server Tls Policy
125+
regexValidation: ^projects\/[a-z0-9][-a-z0-9]{4,28}[a-z0-9]\/locations\/[a-z0-9-]+\/serverTlsPolicies\/[a-z]([-a-z0-9]{0,61}[a-z0-9])$
126+
validation: Must be a valid server TLS policy full resource URL.
110127
ssl:
111128
name: ssl
112129
title: Ssl
113130
ssl_certificates:
114131
name: ssl_certificates
115132
title: Ssl Certificates
133+
regexValidation: ^(https:\/\/www\.googleapis\.com\/compute\/v1\/)?projects\/[a-z0-9][-a-z0-9]{4,28}[a-z0-9]\/global\/sslCertificates\/[a-z]([-a-z0-9]{0,61}[a-z0-9])$|^[a-z]([-a-z0-9]{0,61}[a-z0-9])$
134+
validation: Must be a valid SSL certificate resource URL.
116135
ssl_policy:
117136
name: ssl_policy
118137
title: Ssl Policy
138+
regexValidation: ^(https:\/\/www\.googleapis\.com\/compute\/v1\/)?projects\/[a-z0-9][-a-z0-9]{4,28}[a-z0-9]\/global\/sslPolicies\/[a-z]([-a-z0-9]{0,61}[a-z0-9])$|^[a-z]([-a-z0-9]{0,61}[a-z0-9])$
139+
validation: Must be a valid SSL policy name or full resource URL.
119140
url_map_input:
120141
name: url_map_input
121142
title: Url Map Input
143+
properties:
144+
host:
145+
name: host
146+
title: Host
147+
regexValidation: ^([a-zA-Z0-9.-]+\.[a-zA-Z]{2,}|\\*)$
148+
validation: Host values must be valid domain names or "*"
149+
path:
150+
name: path
151+
title: Path
152+
regexValidation: ^(/.*)$
153+
validation: Path values must start with "/"
154+
backend_service:
155+
name: backend_service
156+
title: Backend Service
157+
regexValidation: ^https://www\.googleapis\.com/compute/v1/projects/[a-z][a-z0-9-]{0,61}[a-z0-9]/global/backendServices/[a-zA-Z0-9_-]+$
158+
validation: Must match URL format of GCP Backend Service selfLink
122159
url_map_resource_uri:
123160
name: url_map_resource_uri
124161
title: Url Map Resource Uri

0 commit comments

Comments
 (0)