client_tls_policy.proto 6.7 KB

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