client_tls_policy.proto 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.networksecurity.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/networksecurity/v1/tls.proto";
  19. import "google/protobuf/field_mask.proto";
  20. import "google/protobuf/timestamp.proto";
  21. option csharp_namespace = "Google.Cloud.NetworkSecurity.V1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/networksecurity/v1;networksecurity";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "ClientTlsPolicyProto";
  25. option java_package = "com.google.cloud.networksecurity.v1";
  26. option php_namespace = "Google\\Cloud\\NetworkSecurity\\V1";
  27. option ruby_package = "Google::Cloud::NetworkSecurity::V1";
  28. // ClientTlsPolicy is a resource that specifies how a client should authenticate
  29. // connections to backends of a service. This resource itself does not affect
  30. // configuration unless it is attached to a backend service resource.
  31. message ClientTlsPolicy {
  32. option (google.api.resource) = {
  33. type: "networksecurity.googleapis.com/ClientTlsPolicy"
  34. pattern: "projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}"
  35. };
  36. // Required. Name of the ClientTlsPolicy resource. It matches the pattern
  37. // `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`
  38. string name = 1 [(google.api.field_behavior) = REQUIRED];
  39. // Optional. Free-text description of the resource.
  40. string description = 2 [(google.api.field_behavior) = OPTIONAL];
  41. // Output only. The timestamp when the resource was created.
  42. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  43. // Output only. The timestamp when the resource was updated.
  44. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  45. // Optional. Set of label tags associated with the resource.
  46. map<string, string> labels = 5 [(google.api.field_behavior) = OPTIONAL];
  47. // Optional. Server Name Indication string to present to the server during TLS
  48. // handshake. E.g: "secure.example.com".
  49. string sni = 6 [(google.api.field_behavior) = OPTIONAL];
  50. // Optional. Defines a mechanism to provision client identity (public and private keys)
  51. // for peer to peer authentication. The presence of this dictates mTLS.
  52. CertificateProvider client_certificate = 7 [(google.api.field_behavior) = OPTIONAL];
  53. // Optional. Defines the mechanism to obtain the Certificate Authority certificate to
  54. // validate the server certificate. If empty, client does not validate the
  55. // server certificate.
  56. repeated ValidationCA server_validation_ca = 8 [(google.api.field_behavior) = OPTIONAL];
  57. }
  58. // Request used by the ListClientTlsPolicies method.
  59. message ListClientTlsPoliciesRequest {
  60. // Required. The project and location from which the ClientTlsPolicies should
  61. // be listed, specified in the format `projects/*/locations/{location}`.
  62. string parent = 1 [
  63. (google.api.field_behavior) = REQUIRED,
  64. (google.api.resource_reference) = {
  65. type: "locations.googleapis.com/Location"
  66. }
  67. ];
  68. // Maximum number of ClientTlsPolicies to return per call.
  69. int32 page_size = 2;
  70. // The value returned by the last `ListClientTlsPoliciesResponse`
  71. // Indicates that this is a continuation of a prior
  72. // `ListClientTlsPolicies` call, and that the system
  73. // should return the next page of data.
  74. string page_token = 3;
  75. }
  76. // Response returned by the ListClientTlsPolicies method.
  77. message ListClientTlsPoliciesResponse {
  78. // List of ClientTlsPolicy resources.
  79. repeated ClientTlsPolicy client_tls_policies = 1;
  80. // If there might be more results than those appearing in this response, then
  81. // `next_page_token` is included. To get the next set of results, call this
  82. // method again using the value of `next_page_token` as `page_token`.
  83. string next_page_token = 2;
  84. }
  85. // Request used by the GetClientTlsPolicy method.
  86. message GetClientTlsPolicyRequest {
  87. // Required. A name of the ClientTlsPolicy to get. Must be in the format
  88. // `projects/*/locations/{location}/clientTlsPolicies/*`.
  89. string name = 1 [
  90. (google.api.field_behavior) = REQUIRED,
  91. (google.api.resource_reference) = {
  92. type: "networksecurity.googleapis.com/ClientTlsPolicy"
  93. }
  94. ];
  95. }
  96. // Request used by the CreateClientTlsPolicy method.
  97. message CreateClientTlsPolicyRequest {
  98. // Required. The parent resource of the ClientTlsPolicy. Must be in
  99. // the format `projects/*/locations/{location}`.
  100. string parent = 1 [
  101. (google.api.field_behavior) = REQUIRED,
  102. (google.api.resource_reference) = {
  103. child_type: "networksecurity.googleapis.com/ClientTlsPolicy"
  104. }
  105. ];
  106. // Required. Short name of the ClientTlsPolicy resource to be created. This value should
  107. // be 1-63 characters long, containing only letters, numbers, hyphens, and
  108. // underscores, and should not start with a number. E.g. "client_mtls_policy".
  109. string client_tls_policy_id = 2 [(google.api.field_behavior) = REQUIRED];
  110. // Required. ClientTlsPolicy resource to be created.
  111. ClientTlsPolicy client_tls_policy = 3 [(google.api.field_behavior) = REQUIRED];
  112. }
  113. // Request used by UpdateClientTlsPolicy method.
  114. message UpdateClientTlsPolicyRequest {
  115. // Optional. Field mask is used to specify the fields to be overwritten in the
  116. // ClientTlsPolicy resource by the update. The fields
  117. // specified in the update_mask are relative to the resource, not
  118. // the full request. A field will be overwritten if it is in the
  119. // mask. If the user does not provide a mask then all fields will be
  120. // overwritten.
  121. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
  122. // Required. Updated ClientTlsPolicy resource.
  123. ClientTlsPolicy client_tls_policy = 2 [(google.api.field_behavior) = REQUIRED];
  124. }
  125. // Request used by the DeleteClientTlsPolicy method.
  126. message DeleteClientTlsPolicyRequest {
  127. // Required. A name of the ClientTlsPolicy to delete. Must be in
  128. // the format `projects/*/locations/{location}/clientTlsPolicies/*`.
  129. string name = 1 [
  130. (google.api.field_behavior) = REQUIRED,
  131. (google.api.resource_reference) = {
  132. type: "networksecurity.googleapis.com/ClientTlsPolicy"
  133. }
  134. ];
  135. }