• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 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
16syntax = "proto3";
17
18package google.cloud.websecurityscanner.v1beta;
19
20option csharp_namespace = "Google.Cloud.WebSecurityScanner.V1Beta";
21option go_package = "cloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb";
22option java_multiple_files = true;
23option java_outer_classname = "ScanConfigErrorProto";
24option java_package = "com.google.cloud.websecurityscanner.v1beta";
25option php_namespace = "Google\\Cloud\\WebSecurityScanner\\V1beta";
26option ruby_package = "Google::Cloud::WebSecurityScanner::V1beta";
27
28// Defines a custom error message used by CreateScanConfig and UpdateScanConfig
29// APIs when scan configuration validation fails. It is also reported as part of
30// a ScanRunErrorTrace message if scan validation fails due to a scan
31// configuration error.
32message ScanConfigError {
33  // Output only.
34  // Defines an error reason code.
35  // Next id: 44
36  enum Code {
37    option allow_alias = true;
38
39    // There is no error.
40    CODE_UNSPECIFIED = 0;
41
42    // There is no error.
43    OK = 0;
44
45    // Indicates an internal server error.
46    // Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown.
47    INTERNAL_ERROR = 1;
48
49    // One of the seed URLs is an App Engine URL but we cannot validate the scan
50    // settings due to an App Engine API backend error.
51    APPENGINE_API_BACKEND_ERROR = 2;
52
53    // One of the seed URLs is an App Engine URL but we cannot access the
54    // App Engine API to validate scan settings.
55    APPENGINE_API_NOT_ACCESSIBLE = 3;
56
57    // One of the seed URLs is an App Engine URL but the Default Host of the
58    // App Engine is not set.
59    APPENGINE_DEFAULT_HOST_MISSING = 4;
60
61    // Google corporate accounts can not be used for scanning.
62    CANNOT_USE_GOOGLE_COM_ACCOUNT = 6;
63
64    // The account of the scan creator can not be used for scanning.
65    CANNOT_USE_OWNER_ACCOUNT = 7;
66
67    // This scan targets Compute Engine, but we cannot validate scan settings
68    // due to a Compute Engine API backend error.
69    COMPUTE_API_BACKEND_ERROR = 8;
70
71    // This scan targets Compute Engine, but we cannot access the Compute Engine
72    // API to validate the scan settings.
73    COMPUTE_API_NOT_ACCESSIBLE = 9;
74
75    // The Custom Login URL does not belong to the current project.
76    CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10;
77
78    // The Custom Login URL is malformed (can not be parsed).
79    CUSTOM_LOGIN_URL_MALFORMED = 11;
80
81    // The Custom Login URL is mapped to a non-routable IP address in DNS.
82    CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12;
83
84    // The Custom Login URL is mapped to an IP address which is not reserved for
85    // the current project.
86    CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13;
87
88    // The Custom Login URL has a non-routable IP address.
89    CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14;
90
91    // The Custom Login URL has an IP address which is not reserved for the
92    // current project.
93    CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15;
94
95    // Another scan with the same name (case-sensitive) already exists.
96    DUPLICATE_SCAN_NAME = 16;
97
98    // A field is set to an invalid value.
99    INVALID_FIELD_VALUE = 18;
100
101    // There was an error trying to authenticate to the scan target.
102    FAILED_TO_AUTHENTICATE_TO_TARGET = 19;
103
104    // Finding type value is not specified in the list findings request.
105    FINDING_TYPE_UNSPECIFIED = 20;
106
107    // Scan targets Compute Engine, yet current project was not whitelisted for
108    // Google Compute Engine Scanning Alpha access.
109    FORBIDDEN_TO_SCAN_COMPUTE = 21;
110
111    // User tries to update managed scan
112    FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43;
113
114    // The supplied filter is malformed. For example, it can not be parsed, does
115    // not have a filter type in expression, or the same filter type appears
116    // more than once.
117    MALFORMED_FILTER = 22;
118
119    // The supplied resource name is malformed (can not be parsed).
120    MALFORMED_RESOURCE_NAME = 23;
121
122    // The current project is not in an active state.
123    PROJECT_INACTIVE = 24;
124
125    // A required field is not set.
126    REQUIRED_FIELD = 25;
127
128    // Project id, scanconfig id, scanrun id, or finding id are not consistent
129    // with each other in resource name.
130    RESOURCE_NAME_INCONSISTENT = 26;
131
132    // The scan being requested to start is already running.
133    SCAN_ALREADY_RUNNING = 27;
134
135    // The scan that was requested to be stopped is not running.
136    SCAN_NOT_RUNNING = 28;
137
138    // One of the seed URLs does not belong to the current project.
139    SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29;
140
141    // One of the seed URLs is malformed (can not be parsed).
142    SEED_URL_MALFORMED = 30;
143
144    // One of the seed URLs is mapped to a non-routable IP address in DNS.
145    SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31;
146
147    // One of the seed URLs is mapped to an IP address which is not reserved
148    // for the current project.
149    SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32;
150
151    // One of the seed URLs has on-routable IP address.
152    SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33;
153
154    // One of the seed URLs has an IP address that is not reserved
155    // for the current project.
156    SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35;
157
158    // The Cloud Security Scanner service account is not configured under the
159    // project.
160    SERVICE_ACCOUNT_NOT_CONFIGURED = 36;
161
162    // A project has reached the maximum number of scans.
163    TOO_MANY_SCANS = 37;
164
165    // Resolving the details of the current project fails.
166    UNABLE_TO_RESOLVE_PROJECT_INFO = 38;
167
168    // One or more blacklist patterns were in the wrong format.
169    UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39;
170
171    // The supplied filter is not supported.
172    UNSUPPORTED_FILTER = 40;
173
174    // The supplied finding type is not supported. For example, we do not
175    // provide findings of the given finding type.
176    UNSUPPORTED_FINDING_TYPE = 41;
177
178    // The URL scheme of one or more of the supplied URLs is not supported.
179    UNSUPPORTED_URL_SCHEME = 42;
180  }
181
182  // Indicates the reason code for a configuration failure.
183  Code code = 1;
184
185  // Indicates the full name of the ScanConfig field that triggers this error,
186  // for example "scan_config.max_qps". This field is provided for
187  // troubleshooting purposes only and its actual value can change in the
188  // future.
189  string field_name = 2;
190}
191