@@ -20,7 +20,6 @@ import "google/api/field_behavior.proto";
2020import "google/api/resource.proto" ;
2121import "google/protobuf/field_mask.proto" ;
2222import "google/protobuf/timestamp.proto" ;
23- import "google/api/annotations.proto" ;
2423
2524option csharp_namespace = "Google.Cloud.NetworkSecurity.V1Beta1" ;
2625option go_package = "google.golang.org/genproto/googleapis/cloud/networksecurity/v1beta1;networksecurity" ;
@@ -44,25 +43,25 @@ message AuthorizationPolicy {
4443 message Rule {
4544 // Specification of traffic source attributes.
4645 message Source {
47- // Optional. List of peer identities to match for authorization. At least one
48- // principal should match. Each peer can be an exact match, or a prefix
49- // match (example, "namespace/*") or a suffix match (example, //
50- // */service-account") or a presence match "*". Authorization based on the
51- // principal name without certificate validation (configured by
46+ // Optional. List of peer identities to match for authorization. At least
47+ // one principal should match. Each peer can be an exact match, or a
48+ // prefix match (example, "namespace/*") or a suffix match (example,
49+ // " */service-account") or a presence match "*". Authorization based on
50+ // the principal name without certificate validation (configured by
5251 // ServerTlsPolicy resource) is considered insecure.
5352 repeated string principals = 1 [(google.api.field_behavior ) = OPTIONAL ];
5453
55- // Optional. List of CIDR ranges to match based on source IP address. At least one
56- // IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g.,
57- // "1.2.3.0/24") are supported. Authorization based on source IP alone
58- // should be avoided. The IP addresses of any load balancers or proxies
59- // should be considered untrusted.
54+ // Optional. List of CIDR ranges to match based on source IP address. At
55+ // least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR
56+ // (e.g., "1.2.3.0/24") are supported. Authorization based on source IP
57+ // alone should be avoided. The IP addresses of any load balancers or
58+ // proxies should be considered untrusted.
6059 repeated string ip_blocks = 2 [(google.api.field_behavior ) = OPTIONAL ];
6160 }
6261
6362 // Specification of traffic destination attributes.
6463 message Destination {
65- // Specification of HTTP header match atrributes .
64+ // Specification of HTTP header match attributes .
6665 message HttpHeaderMatch {
6766 oneof type {
6867 // Required. The value of the header must match the regular expression
@@ -82,39 +81,42 @@ message AuthorizationPolicy {
8281 string header_name = 1 [(google.api.field_behavior ) = REQUIRED ];
8382 }
8483
85- // Required. List of host names to match. Matched against the ":authority" header in
86- // http requests. At least one host should match. Each host can be an
87- // exact match, or a prefix match (example "mydomain.*") or a suffix
88- // match (example // *.myorg.com") or a presence(any) match "*".
84+ // Required. List of host names to match. Matched against the ":authority"
85+ // header in http requests. At least one host should match. Each host can
86+ // be an exact match, or a prefix match (example "mydomain.*") or a suffix
87+ // match (example " *.myorg.com") or a presence (any) match "*".
8988 repeated string hosts = 1 [(google.api.field_behavior ) = REQUIRED ];
9089
91- // Required. List of destination ports to match. At least one port should match.
90+ // Required. List of destination ports to match. At least one port should
91+ // match.
9292 repeated uint32 ports = 2 [(google.api.field_behavior ) = REQUIRED ];
9393
9494 // Optional. A list of HTTP methods to match. At least one method should
9595 // match. Should not be set for gRPC services.
9696 repeated string methods = 4 [(google.api.field_behavior ) = OPTIONAL ];
9797
98- // Optional. Match against key:value pair in http header. Provides a flexible match
99- // based on HTTP headers, for potentially advanced use cases. At least one
100- // header should match. Avoid using header matches to make authorization
101- // decisions unless there is a strong guarantee that requests arrive
102- // through a trusted client or proxy.
103- HttpHeaderMatch http_header_match = 5 [(google.api.field_behavior ) = OPTIONAL ];
98+ // Optional. Match against key:value pair in http header. Provides a
99+ // flexible match based on HTTP headers, for potentially advanced use
100+ // cases. At least one header should match. Avoid using header matches to
101+ // make authorization decisions unless there is a strong guarantee that
102+ // requests arrive through a trusted client or proxy.
103+ HttpHeaderMatch http_header_match = 5
104+ [(google.api.field_behavior ) = OPTIONAL ];
104105 }
105106
106- // Optional. List of attributes for the traffic source. All of the sources must match.
107- // A source is a match if both principals and ip_blocks match. If not set,
108- // the action specified in the 'action' field will be applied without any
109- // rule checks for the source.
107+ // Optional. List of attributes for the traffic source. All of the sources
108+ // must match. A source is a match if both principals and ip_blocks match.
109+ // If not set, the action specified in the 'action' field will be applied
110+ // without any rule checks for the source.
110111 repeated Source sources = 1 [(google.api.field_behavior ) = OPTIONAL ];
111112
112- // Optional. List of attributes for the traffic destination. All of the destinations
113- // must match. A destination is a match if a request matches all the
114- // specified hosts, ports, methods and headers. If not set, the
113+ // Optional. List of attributes for the traffic destination. All of the
114+ // destinations must match. A destination is a match if a request matches
115+ // all the specified hosts, ports, methods and headers. If not set, the
115116 // action specified in the 'action' field will be applied without any rule
116117 // checks for the destination.
117- repeated Destination destinations = 2 [(google.api.field_behavior ) = OPTIONAL ];
118+ repeated Destination destinations = 2
119+ [(google.api.field_behavior ) = OPTIONAL ];
118120 }
119121
120122 // Possible values that define what action to take.
@@ -139,22 +141,26 @@ message AuthorizationPolicy {
139141 string description = 2 [(google.api.field_behavior ) = OPTIONAL ];
140142
141143 // Output only. The timestamp when the resource was created.
142- google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
144+ google.protobuf.Timestamp create_time = 3
145+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
143146
144147 // Output only. The timestamp when the resource was updated.
145- google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
148+ google.protobuf.Timestamp update_time = 4
149+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
146150
147- // Optional. Set of label tags associated with the AuthorizationPolicy resource.
151+ // Optional. Set of label tags associated with the AuthorizationPolicy
152+ // resource.
148153 map <string , string > labels = 5 [(google.api.field_behavior ) = OPTIONAL ];
149154
150155 // Required. The action to take when a rule match is found. Possible values
151156 // are "ALLOW" or "DENY".
152157 Action action = 6 [(google.api.field_behavior ) = REQUIRED ];
153158
154- // Optional. List of rules to match. Note that at least one of the rules must match in
155- // order for the action specified in the 'action' field to be taken. A rule is
156- // a match if there is a matching source and destination. If left blank, the
157- // action specified in the `action` field will be applied on every request.
159+ // Optional. List of rules to match. Note that at least one of the rules must
160+ // match in order for the action specified in the 'action' field to be taken.
161+ // A rule is a match if there is a matching source and destination. If left
162+ // blank, the action specified in the `action` field will be applied on every
163+ // request.
158164 repeated Rule rules = 7 [(google.api.field_behavior ) = OPTIONAL ];
159165}
160166
@@ -210,7 +216,7 @@ message CreateAuthorizationPolicyRequest {
210216 string parent = 1 [
211217 (google.api.field_behavior ) = REQUIRED ,
212218 (google.api.resource_reference ) = {
213- type : "networksecurity.googleapis.com/AuthorizationPolicy"
219+ child_type : "networksecurity.googleapis.com/AuthorizationPolicy"
214220 }
215221 ];
216222
@@ -221,7 +227,8 @@ message CreateAuthorizationPolicyRequest {
221227 string authorization_policy_id = 2 [(google.api.field_behavior ) = REQUIRED ];
222228
223229 // Required. AuthorizationPolicy resource to be created.
224- AuthorizationPolicy authorization_policy = 3 [(google.api.field_behavior ) = REQUIRED ];
230+ AuthorizationPolicy authorization_policy = 3
231+ [(google.api.field_behavior ) = REQUIRED ];
225232}
226233
227234// Request used by the UpdateAuthorizationPolicy method.
@@ -231,16 +238,18 @@ message UpdateAuthorizationPolicyRequest {
231238 // The fields specified in the update_mask are relative to the resource, not
232239 // the full request. A field will be overwritten if it is in the mask. If the
233240 // user does not provide a mask then all fields will be overwritten.
234- google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior ) = OPTIONAL ];
241+ google.protobuf.FieldMask update_mask = 1
242+ [(google.api.field_behavior ) = OPTIONAL ];
235243
236244 // Required. Updated AuthorizationPolicy resource.
237- AuthorizationPolicy authorization_policy = 2 [(google.api.field_behavior ) = REQUIRED ];
245+ AuthorizationPolicy authorization_policy = 2
246+ [(google.api.field_behavior ) = REQUIRED ];
238247}
239248
240249// Request used by the DeleteAuthorizationPolicy method.
241250message DeleteAuthorizationPolicyRequest {
242- // Required. A name of the AuthorizationPolicy to delete. Must be in the format
243- // `projects/{project}/locations/{location}/authorizationPolicies/*`.
251+ // Required. A name of the AuthorizationPolicy to delete. Must be in the
252+ // format `projects/{project}/locations/{location}/authorizationPolicies/*`.
244253 string name = 1 [
245254 (google.api.field_behavior ) = REQUIRED ,
246255 (google.api.resource_reference ) = {
0 commit comments