Skip to content

Commit 234504a

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

File tree

2 files changed

+49
-6
lines changed

2 files changed

+49
-6
lines changed

modules/backend/metadata.display.yaml

Lines changed: 6 additions & 6 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

modules/frontend/metadata.display.yaml

Lines changed: 43 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
@@ -81,6 +87,12 @@ spec:
8187
value: EXTERNAL_MANAGED
8288
- label: INTERNAL_MANAGED
8389
value: INTERNAL_MANAGED
90+
- label: EXTERNAL
91+
value: EXTERNAL
92+
- label: INTERNAL
93+
value: INTERNAL
94+
- label: INTERNAL_SELF_MANAGED
95+
value: INTERNAL_SELF_MANAGED
8496
managed_ssl_certificate_domains:
8597
name: managed_ssl_certificate_domains
8698
title: Managed Ssl Certificate Domains
@@ -92,6 +104,8 @@ spec:
92104
network:
93105
name: network
94106
title: Network
107+
regexValidation: ^(projects\/[a-z0-9\-]+\/global\/networks\/[a-zA-Z0-9\-_]+|[a-zA-Z0-9\-_]+)$
108+
validation: Network must be a valid network name or a full resource path.
95109
private_key:
96110
name: private_key
97111
title: Private Key
@@ -101,24 +115,53 @@ spec:
101115
quic:
102116
name: quic
103117
title: Quic
118+
enumValueLabels:
119+
- label: ENABLE
120+
value: ENABLE
121+
- label: DISABLE
122+
value: DISABLE
123+
- label: NONE
124+
value: NONE
104125
random_certificate_suffix:
105126
name: random_certificate_suffix
106127
title: Random Certificate Suffix
107128
server_tls_policy:
108129
name: server_tls_policy
109130
title: Server Tls Policy
131+
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])$
132+
validation: Must be a valid server TLS policy full resource URL.
110133
ssl:
111134
name: ssl
112135
title: Ssl
113136
ssl_certificates:
114137
name: ssl_certificates
115138
title: Ssl Certificates
139+
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])$
140+
validation: Must be a valid SSL certificate resource URL.
116141
ssl_policy:
117142
name: ssl_policy
118143
title: Ssl Policy
144+
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])$
145+
validation: Must be a valid SSL policy name or full resource URL.
119146
url_map_input:
120147
name: url_map_input
121148
title: Url Map Input
149+
properties:
150+
host:
151+
name: host
152+
title: Host
153+
regexValidation: ^([a-zA-Z0-9.-]+\.[a-zA-Z]{2,}|\\*)$
154+
validation: Host values must be valid domain names or "*"
155+
path:
156+
name: path
157+
title: Path
158+
regexValidation: ^(/.*)$
159+
validation: Path values must start with "/"
160+
backend_service:
161+
name: backend_service
162+
title: Backend Service
163+
regexValidation: ^https://www\.googleapis\.com/compute/v1/projects/[a-z][a-z0-9-]{0,61}[a-z0-9]/global/backendServices/[a-zA-Z0-9_-]+$
164+
validation: Must match URL format of GCP Backend Service selfLink
122165
url_map_resource_uri:
123166
name: url_map_resource_uri
124167
title: Url Map Resource Uri

0 commit comments

Comments
 (0)