@@ -20,7 +20,6 @@ import "google/api/field_behavior.proto";
20
20
import "google/api/resource.proto" ;
21
21
import "google/protobuf/field_mask.proto" ;
22
22
import "google/protobuf/timestamp.proto" ;
23
- import "google/api/annotations.proto" ;
24
23
25
24
option csharp_namespace = "Google.Cloud.NetworkSecurity.V1Beta1" ;
26
25
option go_package = "google.golang.org/genproto/googleapis/cloud/networksecurity/v1beta1;networksecurity" ;
@@ -44,25 +43,25 @@ message AuthorizationPolicy {
44
43
message Rule {
45
44
// Specification of traffic source attributes.
46
45
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
52
51
// ServerTlsPolicy resource) is considered insecure.
53
52
repeated string principals = 1 [(google.api.field_behavior ) = OPTIONAL ];
54
53
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.
60
59
repeated string ip_blocks = 2 [(google.api.field_behavior ) = OPTIONAL ];
61
60
}
62
61
63
62
// Specification of traffic destination attributes.
64
63
message Destination {
65
- // Specification of HTTP header match atrributes .
64
+ // Specification of HTTP header match attributes .
66
65
message HttpHeaderMatch {
67
66
oneof type {
68
67
// Required. The value of the header must match the regular expression
@@ -82,39 +81,42 @@ message AuthorizationPolicy {
82
81
string header_name = 1 [(google.api.field_behavior ) = REQUIRED ];
83
82
}
84
83
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 "*".
89
88
repeated string hosts = 1 [(google.api.field_behavior ) = REQUIRED ];
90
89
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.
92
92
repeated uint32 ports = 2 [(google.api.field_behavior ) = REQUIRED ];
93
93
94
94
// Optional. A list of HTTP methods to match. At least one method should
95
95
// match. Should not be set for gRPC services.
96
96
repeated string methods = 4 [(google.api.field_behavior ) = OPTIONAL ];
97
97
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 ];
104
105
}
105
106
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.
110
111
repeated Source sources = 1 [(google.api.field_behavior ) = OPTIONAL ];
111
112
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
115
116
// action specified in the 'action' field will be applied without any rule
116
117
// 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 ];
118
120
}
119
121
120
122
// Possible values that define what action to take.
@@ -139,22 +141,26 @@ message AuthorizationPolicy {
139
141
string description = 2 [(google.api.field_behavior ) = OPTIONAL ];
140
142
141
143
// 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 ];
143
146
144
147
// 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 ];
146
150
147
- // Optional. Set of label tags associated with the AuthorizationPolicy resource.
151
+ // Optional. Set of label tags associated with the AuthorizationPolicy
152
+ // resource.
148
153
map <string , string > labels = 5 [(google.api.field_behavior ) = OPTIONAL ];
149
154
150
155
// Required. The action to take when a rule match is found. Possible values
151
156
// are "ALLOW" or "DENY".
152
157
Action action = 6 [(google.api.field_behavior ) = REQUIRED ];
153
158
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.
158
164
repeated Rule rules = 7 [(google.api.field_behavior ) = OPTIONAL ];
159
165
}
160
166
@@ -210,7 +216,7 @@ message CreateAuthorizationPolicyRequest {
210
216
string parent = 1 [
211
217
(google.api.field_behavior ) = REQUIRED ,
212
218
(google.api.resource_reference ) = {
213
- type : "networksecurity.googleapis.com/AuthorizationPolicy"
219
+ child_type : "networksecurity.googleapis.com/AuthorizationPolicy"
214
220
}
215
221
];
216
222
@@ -221,7 +227,8 @@ message CreateAuthorizationPolicyRequest {
221
227
string authorization_policy_id = 2 [(google.api.field_behavior ) = REQUIRED ];
222
228
223
229
// 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 ];
225
232
}
226
233
227
234
// Request used by the UpdateAuthorizationPolicy method.
@@ -231,16 +238,18 @@ message UpdateAuthorizationPolicyRequest {
231
238
// The fields specified in the update_mask are relative to the resource, not
232
239
// the full request. A field will be overwritten if it is in the mask. If the
233
240
// 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 ];
235
243
236
244
// 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 ];
238
247
}
239
248
240
249
// Request used by the DeleteAuthorizationPolicy method.
241
250
message 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/*`.
244
253
string name = 1 [
245
254
(google.api.field_behavior ) = REQUIRED ,
246
255
(google.api.resource_reference ) = {
0 commit comments