security_settings.proto 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  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.dialogflow.cx.v3beta1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/protobuf/empty.proto";
  21. import "google/protobuf/field_mask.proto";
  22. option cc_enable_arenas = true;
  23. option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "SecuritySettingsProto";
  27. option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
  28. option objc_class_prefix = "DF";
  29. option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1";
  30. option (google.api.resource_definition) = {
  31. type: "dlp.googleapis.com/InspectTemplate"
  32. pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}"
  33. pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}"
  34. };
  35. option (google.api.resource_definition) = {
  36. type: "dlp.googleapis.com/DeidentifyTemplate"
  37. pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}"
  38. pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}"
  39. };
  40. // Service for managing security settings for Dialogflow.
  41. service SecuritySettingsService {
  42. option (google.api.default_host) = "dialogflow.googleapis.com";
  43. option (google.api.oauth_scopes) =
  44. "https://www.googleapis.com/auth/cloud-platform,"
  45. "https://www.googleapis.com/auth/dialogflow";
  46. // Create security settings in the specified location.
  47. rpc CreateSecuritySettings(CreateSecuritySettingsRequest) returns (SecuritySettings) {
  48. option (google.api.http) = {
  49. post: "/v3beta1/{parent=projects/*/locations/*}/securitySettings"
  50. body: "security_settings"
  51. };
  52. option (google.api.method_signature) = "parent,security_settings";
  53. }
  54. // Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].
  55. // The returned settings may be stale by up to 1 minute.
  56. rpc GetSecuritySettings(GetSecuritySettingsRequest) returns (SecuritySettings) {
  57. option (google.api.http) = {
  58. get: "/v3beta1/{name=projects/*/locations/*/securitySettings/*}"
  59. };
  60. option (google.api.method_signature) = "name";
  61. }
  62. // Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].
  63. rpc UpdateSecuritySettings(UpdateSecuritySettingsRequest) returns (SecuritySettings) {
  64. option (google.api.http) = {
  65. patch: "/v3beta1/{security_settings.name=projects/*/locations/*/securitySettings/*}"
  66. body: "security_settings"
  67. };
  68. option (google.api.method_signature) = "security_settings,update_mask";
  69. }
  70. // Returns the list of all security settings in the specified location.
  71. rpc ListSecuritySettings(ListSecuritySettingsRequest) returns (ListSecuritySettingsResponse) {
  72. option (google.api.http) = {
  73. get: "/v3beta1/{parent=projects/*/locations/*}/securitySettings"
  74. };
  75. option (google.api.method_signature) = "parent";
  76. }
  77. // Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].
  78. rpc DeleteSecuritySettings(DeleteSecuritySettingsRequest) returns (google.protobuf.Empty) {
  79. option (google.api.http) = {
  80. delete: "/v3beta1/{name=projects/*/locations/*/securitySettings/*}"
  81. };
  82. option (google.api.method_signature) = "name";
  83. }
  84. }
  85. // The request message for [SecuritySettingsService.GetSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.GetSecuritySettings].
  86. message GetSecuritySettingsRequest {
  87. // Required. Resource name of the settings.
  88. // Format: `projects/<Project ID>/locations/<Location
  89. // ID>/securitySettings/<security settings ID>`.
  90. string name = 1 [
  91. (google.api.field_behavior) = REQUIRED,
  92. (google.api.resource_reference) = {
  93. type: "dialogflow.googleapis.com/SecuritySettings"
  94. }
  95. ];
  96. }
  97. // The request message for [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings].
  98. message UpdateSecuritySettingsRequest {
  99. // Required. [SecuritySettings] object that contains values for each of the
  100. // fields to update.
  101. SecuritySettings security_settings = 1 [(google.api.field_behavior) = REQUIRED];
  102. // Required. The mask to control which fields get updated. If the mask is not present,
  103. // all fields will be updated.
  104. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  105. }
  106. // The request message for [SecuritySettings.ListSecuritySettings][].
  107. message ListSecuritySettingsRequest {
  108. // Required. The location to list all security settings for.
  109. // Format: `projects/<Project ID>/locations/<Location ID>`.
  110. string parent = 1 [
  111. (google.api.field_behavior) = REQUIRED,
  112. (google.api.resource_reference) = {
  113. child_type: "dialogflow.googleapis.com/SecuritySettings"
  114. }
  115. ];
  116. // The maximum number of items to return in a single page. By default 20 and
  117. // at most 100.
  118. int32 page_size = 2;
  119. // The next_page_token value returned from a previous list request.
  120. string page_token = 3;
  121. }
  122. // The response message for [SecuritySettings.ListSecuritySettings][].
  123. message ListSecuritySettingsResponse {
  124. // The list of security settings.
  125. repeated SecuritySettings security_settings = 1;
  126. // Token to retrieve the next page of results, or empty if there are no more
  127. // results in the list.
  128. string next_page_token = 2;
  129. }
  130. // The request message for [SecuritySettings.CreateSecuritySettings][].
  131. message CreateSecuritySettingsRequest {
  132. // Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] for.
  133. // Format: `projects/<Project ID>/locations/<Location ID>`.
  134. string parent = 1 [
  135. (google.api.field_behavior) = REQUIRED,
  136. (google.api.resource_reference) = {
  137. child_type: "dialogflow.googleapis.com/SecuritySettings"
  138. }
  139. ];
  140. // Required. The security settings to create.
  141. SecuritySettings security_settings = 2 [(google.api.field_behavior) = REQUIRED];
  142. }
  143. // The request message for [SecuritySettings.DeleteSecuritySettings][].
  144. message DeleteSecuritySettingsRequest {
  145. // Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] to delete.
  146. // Format: `projects/<Project ID>/locations/<Location
  147. // ID>/securitySettings/<Security Settings ID>`.
  148. string name = 1 [
  149. (google.api.field_behavior) = REQUIRED,
  150. (google.api.resource_reference) = {
  151. type: "dialogflow.googleapis.com/SecuritySettings"
  152. }
  153. ];
  154. }
  155. // Represents the settings related to security issues, such as data redaction
  156. // and data retention. It may take hours for updates on the settings to
  157. // propagate to all the related components and take effect.
  158. message SecuritySettings {
  159. option (google.api.resource) = {
  160. type: "dialogflow.googleapis.com/SecuritySettings"
  161. pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}"
  162. };
  163. // Defines how we redact data.
  164. enum RedactionStrategy {
  165. // Do not redact.
  166. REDACTION_STRATEGY_UNSPECIFIED = 0;
  167. // Call redaction service to clean up the data to be persisted.
  168. REDACT_WITH_SERVICE = 1;
  169. }
  170. // Defines what types of data to redact.
  171. enum RedactionScope {
  172. // Don't redact any kind of data.
  173. REDACTION_SCOPE_UNSPECIFIED = 0;
  174. // On data to be written to disk or similar devices that are capable of
  175. // holding data even if power is disconnected. This includes data that are
  176. // temporarily saved on disk.
  177. REDACT_DISK_STORAGE = 2;
  178. }
  179. // Type of data we purge after retention settings triggers purge.
  180. enum PurgeDataType {
  181. // Unspecified. Do not use.
  182. PURGE_DATA_TYPE_UNSPECIFIED = 0;
  183. // Dialogflow history. This does not include Cloud logging, which is
  184. // owned by the user - not Dialogflow.
  185. DIALOGFLOW_HISTORY = 1;
  186. }
  187. // Settings for exporting audio.
  188. message AudioExportSettings {
  189. // File format for exported audio file. Currently only in telephony
  190. // recordings.
  191. enum AudioFormat {
  192. // Unspecified. Do not use.
  193. AUDIO_FORMAT_UNSPECIFIED = 0;
  194. // G.711 mu-law PCM with 8kHz sample rate.
  195. MULAW = 1;
  196. // MP3 file format.
  197. MP3 = 2;
  198. // OGG Vorbis.
  199. OGG = 3;
  200. }
  201. // Cloud Storage bucket to export audio record to.
  202. // Setting this field would grant the Storage Object Creator role to
  203. // the Dialogflow Service Agent.
  204. // API caller that tries to modify this field should have the permission of
  205. // storage.buckets.setIamPolicy.
  206. string gcs_bucket = 1;
  207. // Filename pattern for exported audio.
  208. string audio_export_pattern = 2;
  209. // Enable audio redaction if it is true.
  210. bool enable_audio_redaction = 3;
  211. // File format for exported audio file. Currently only in telephony
  212. // recordings.
  213. AudioFormat audio_format = 4;
  214. }
  215. // Settings for exporting conversations to
  216. // [Insights](https://cloud.google.com/contact-center/insights/docs).
  217. message InsightsExportSettings {
  218. // If enabled, we will automatically exports
  219. // conversations to Insights and Insights runs its analyzers.
  220. bool enable_insights_export = 1;
  221. }
  222. // Resource name of the settings.
  223. // Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method.
  224. // [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name
  225. // automatically.
  226. // Format: `projects/<Project ID>/locations/<Location
  227. // ID>/securitySettings/<Security Settings ID>`.
  228. string name = 1;
  229. // Required. The human-readable name of the security settings, unique within the
  230. // location.
  231. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  232. // Strategy that defines how we do redaction.
  233. RedactionStrategy redaction_strategy = 3;
  234. // Defines the data for which Dialogflow applies redaction. Dialogflow does
  235. // not redact data that it does not have access to – for example, Cloud
  236. // logging.
  237. RedactionScope redaction_scope = 4;
  238. // [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this
  239. // template to define inspect base settings.
  240. //
  241. // The `DLP Inspect Templates Reader` role is needed on the Dialogflow
  242. // service identity service account (has the form
  243. // `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`)
  244. // for your agent's project.
  245. //
  246. // If empty, we use the default DLP inspect config.
  247. //
  248. // The template name will have one of the following formats:
  249. // `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
  250. // ID>` OR `organizations/<Organization ID>/locations/<Location
  251. // ID>/inspectTemplates/<Template ID>`
  252. //
  253. // Note: `inspect_template` must be located in the same region as the
  254. // `SecuritySettings`.
  255. string inspect_template = 9 [(google.api.resource_reference) = {
  256. type: "dlp.googleapis.com/InspectTemplate"
  257. }];
  258. // [DLP](https://cloud.google.com/dlp/docs) deidentify template name. Use this
  259. // template to define de-identification configuration for the content.
  260. //
  261. // The `DLP De-identify Templates Reader` role is needed on the Dialogflow
  262. // service identity service account (has the form
  263. // `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`)
  264. // for your agent's project.
  265. //
  266. // If empty, Dialogflow replaces sensitive info with `[redacted]` text.
  267. //
  268. // The template name will have one of the following formats:
  269. // `projects/<Project ID>/locations/<Location
  270. // ID>/deidentifyTemplates/<Template ID>` OR `organizations/<Organization
  271. // ID>/locations/<Location ID>/deidentifyTemplates/<Template ID>`
  272. //
  273. // Note: `deidentify_template` must be located in the same region as the
  274. // `SecuritySettings`.
  275. string deidentify_template = 17 [(google.api.resource_reference) = {
  276. type: "dlp.googleapis.com/DeidentifyTemplate"
  277. }];
  278. // Specifies how data is retained. Note that even if the data is
  279. // purged due to retention policy, we may still hold it in backup storage for
  280. // a few days without allowing direct readings.
  281. oneof data_retention {
  282. // Retains data in interaction logging for the specified number of days.
  283. // This does not apply to Cloud logging, which is owned by the user - not
  284. // Dialogflow.
  285. // User must set a value lower than Dialogflow's default 365d TTL (30 days
  286. // for Agent Assist traffic), higher value will be ignored and use default.
  287. // Setting a value higher than that has no effect. A missing value or
  288. // setting to 0 also means we use default TTL.
  289. int32 retention_window_days = 6;
  290. }
  291. // List of types of data to remove when retention settings triggers purge.
  292. repeated PurgeDataType purge_data_types = 8;
  293. // Controls audio export settings for post-conversation analytics when
  294. // ingesting audio to conversations via [Participants.AnalyzeContent][] or
  295. // [Participants.StreamingAnalyzeContent][].
  296. //
  297. // If [retention_strategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION or
  298. // [audio_export_settings.gcs_bucket][] is empty, audio export is disabled.
  299. //
  300. // If audio export is enabled, audio is recorded and saved to
  301. // [audio_export_settings.gcs_bucket][], subject to retention policy of
  302. // [audio_export_settings.gcs_bucket][].
  303. //
  304. // This setting won't effect audio input for implicit sessions via
  305. // [Sessions.DetectIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.DetectIntent] or [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.StreamingDetectIntent].
  306. AudioExportSettings audio_export_settings = 12;
  307. // Controls conversation exporting settings to Insights after conversation is
  308. // completed.
  309. //
  310. // If [retention_strategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
  311. // Insights export is disabled no matter what you configure here.
  312. InsightsExportSettings insights_export_settings = 13;
  313. }