scan_config.proto 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. // Copyright 2020 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.websecurityscanner.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/protobuf/timestamp.proto";
  18. option csharp_namespace = "Google.Cloud.WebSecurityScanner.V1";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1;websecurityscanner";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "ScanConfigProto";
  22. option java_package = "com.google.cloud.websecurityscanner.v1";
  23. option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1";
  24. option ruby_package = "Google::Cloud::WebSecurityScanner::V1";
  25. // A ScanConfig resource contains the configurations to launch a scan.
  26. message ScanConfig {
  27. // Scan authentication configuration.
  28. message Authentication {
  29. // Describes authentication configuration that uses a Google account.
  30. message GoogleAccount {
  31. // Required. The user name of the Google account.
  32. string username = 1;
  33. // Required. Input only. The password of the Google account. The credential is stored encrypted
  34. // and not returned in any response nor included in audit logs.
  35. string password = 2;
  36. }
  37. // Describes authentication configuration that uses a custom account.
  38. message CustomAccount {
  39. // Required. The user name of the custom account.
  40. string username = 1;
  41. // Required. Input only. The password of the custom account. The credential is stored encrypted
  42. // and not returned in any response nor included in audit logs.
  43. string password = 2;
  44. // Required. The login form URL of the website.
  45. string login_url = 3;
  46. }
  47. // Describes authentication configuration for Identity-Aware-Proxy (IAP).
  48. message IapCredential {
  49. // Describes authentication configuration when Web-Security-Scanner
  50. // service account is added in Identity-Aware-Proxy (IAP) access policies.
  51. message IapTestServiceAccountInfo {
  52. // Required. Describes OAuth2 client id of resources protected by
  53. // Identity-Aware-Proxy (IAP).
  54. string target_audience_client_id = 1 [(google.api.field_behavior) = REQUIRED];
  55. }
  56. // Identity-Aware-Proxy (IAP) Authentication Configuration
  57. oneof iap_credentials {
  58. // Authentication configuration when Web-Security-Scanner service
  59. // account is added in Identity-Aware-Proxy (IAP) access policies.
  60. IapTestServiceAccountInfo iap_test_service_account_info = 1;
  61. }
  62. }
  63. // Required.
  64. // Authentication configuration
  65. oneof authentication {
  66. // Authentication using a Google account.
  67. GoogleAccount google_account = 1;
  68. // Authentication using a custom account.
  69. CustomAccount custom_account = 2;
  70. // Authentication using Identity-Aware-Proxy (IAP).
  71. IapCredential iap_credential = 4;
  72. }
  73. }
  74. // Scan schedule configuration.
  75. message Schedule {
  76. // A timestamp indicates when the next run will be scheduled. The value is
  77. // refreshed by the server after each run. If unspecified, it will default
  78. // to current server time, which means the scan will be scheduled to start
  79. // immediately.
  80. google.protobuf.Timestamp schedule_time = 1;
  81. // Required. The duration of time between executions in days.
  82. int32 interval_duration_days = 2;
  83. }
  84. // Type of user agents used for scanning.
  85. enum UserAgent {
  86. // The user agent is unknown. Service will default to CHROME_LINUX.
  87. USER_AGENT_UNSPECIFIED = 0;
  88. // Chrome on Linux. This is the service default if unspecified.
  89. CHROME_LINUX = 1;
  90. // Chrome on Android.
  91. CHROME_ANDROID = 2;
  92. // Safari on IPhone.
  93. SAFARI_IPHONE = 3;
  94. }
  95. // Scan risk levels supported by Web Security Scanner. LOW impact
  96. // scanning will minimize requests with the potential to modify data. To
  97. // achieve the maximum scan coverage, NORMAL risk level is recommended.
  98. enum RiskLevel {
  99. // Use default, which is NORMAL.
  100. RISK_LEVEL_UNSPECIFIED = 0;
  101. // Normal scanning (Recommended)
  102. NORMAL = 1;
  103. // Lower impact scanning
  104. LOW = 2;
  105. }
  106. // Controls export of scan configurations and results to Security
  107. // Command Center.
  108. enum ExportToSecurityCommandCenter {
  109. // Use default, which is ENABLED.
  110. EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0;
  111. // Export results of this scan to Security Command Center.
  112. ENABLED = 1;
  113. // Do not export results of this scan to Security Command Center.
  114. DISABLED = 2;
  115. }
  116. // The resource name of the ScanConfig. The name follows the format of
  117. // 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
  118. // generated by the system.
  119. string name = 1;
  120. // Required. The user provided display name of the ScanConfig.
  121. string display_name = 2;
  122. // The maximum QPS during scanning. A valid value ranges from 5 to 20
  123. // inclusively. If the field is unspecified or its value is set 0, server will
  124. // default to 15. Other values outside of [5, 20] range will be rejected with
  125. // INVALID_ARGUMENT error.
  126. int32 max_qps = 3;
  127. // Required. The starting URLs from which the scanner finds site pages.
  128. repeated string starting_urls = 4;
  129. // The authentication configuration. If specified, service will use the
  130. // authentication configuration during scanning.
  131. Authentication authentication = 5;
  132. // The user agent used during scanning.
  133. UserAgent user_agent = 6;
  134. // The excluded URL patterns as described in
  135. // https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls
  136. repeated string blacklist_patterns = 7;
  137. // The schedule of the ScanConfig.
  138. Schedule schedule = 8;
  139. // Controls export of scan configurations and results to Security
  140. // Command Center.
  141. ExportToSecurityCommandCenter export_to_security_command_center = 10;
  142. // The risk level selected for the scan
  143. RiskLevel risk_level = 12;
  144. // Whether the scan config is managed by Web Security Scanner, output
  145. // only.
  146. bool managed_scan = 13;
  147. // Whether the scan configuration has enabled static IP address scan feature.
  148. // If enabled, the scanner will access applications from static IP addresses.
  149. bool static_ip_scan = 14;
  150. }