|
| 1 | +// Copyright 2026 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.ces.v1beta; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | +import "google/protobuf/timestamp.proto"; |
| 22 | + |
| 23 | +option go_package = "cloud.google.com/go/ces/apiv1beta/cespb;cespb"; |
| 24 | +option java_multiple_files = true; |
| 25 | +option java_outer_classname = "SecuritySettingsProto"; |
| 26 | +option java_package = "com.google.cloud.ces.v1beta"; |
| 27 | + |
| 28 | +// Project/Location level security settings for CES. |
| 29 | +message SecuritySettings { |
| 30 | + option (google.api.resource) = { |
| 31 | + type: "ces.googleapis.com/SecuritySettings" |
| 32 | + pattern: "projects/{project}/locations/{location}/securitySettings" |
| 33 | + plural: "securitySettings" |
| 34 | + singular: "securitySettings" |
| 35 | + }; |
| 36 | + |
| 37 | + // Identifier. The unique identifier of the security settings. |
| 38 | + // Format: `projects/{project}/locations/{location}/securitySettings` |
| 39 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 40 | + |
| 41 | + // Optional. Endpoint control related settings. |
| 42 | + EndpointControlPolicy endpoint_control_policy = 2 |
| 43 | + [(google.api.field_behavior) = OPTIONAL]; |
| 44 | + |
| 45 | + // Output only. Create time of the security settings. |
| 46 | + google.protobuf.Timestamp create_time = 3 |
| 47 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 48 | + |
| 49 | + // Output only. Last update time of the security settings. |
| 50 | + google.protobuf.Timestamp update_time = 4 |
| 51 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 52 | + |
| 53 | + // Output only. Etag of the security settings. |
| 54 | + string etag = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 55 | +} |
| 56 | + |
| 57 | +// Defines project/location level endpoint control policy. |
| 58 | +message EndpointControlPolicy { |
| 59 | + // Defines the scope in which this policy's allowed_origins list is |
| 60 | + // enforced. |
| 61 | + enum EnforcementScope { |
| 62 | + // Unspecified. This policy will be treated as VPCSC_ONLY. |
| 63 | + ENFORCEMENT_SCOPE_UNSPECIFIED = 0; |
| 64 | + |
| 65 | + // This policy applies only when VPC-SC is active. |
| 66 | + VPCSC_ONLY = 1; |
| 67 | + |
| 68 | + // This policy ALWAYS applies, regardless of VPC-SC status. |
| 69 | + ALWAYS = 2; |
| 70 | + } |
| 71 | + |
| 72 | + // Optional. The scope in which this policy's allowed_origins list is |
| 73 | + // enforced. |
| 74 | + EnforcementScope enforcement_scope = 1 |
| 75 | + [(google.api.field_behavior) = OPTIONAL]; |
| 76 | + |
| 77 | + // Optional. The allowed HTTP(s) origins that tools in the App are able to |
| 78 | + // directly call. The enforcement depends on the value of |
| 79 | + // enforcement_scope and the VPC-SC status of the project. |
| 80 | + // If a port number is not provided, all ports will be allowed. Otherwise, |
| 81 | + // the port number must match exactly. For example, "https://example.com" |
| 82 | + // will match "https://example.com:443" and any other port. |
| 83 | + // "https://example.com:443" will only match "https://example.com:443". |
| 84 | + repeated string allowed_origins = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 85 | +} |
0 commit comments