1 // Copyright 2018 Google Inc.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 package google.cloud.websecurityscanner.v1alpha;
19 import "google/api/annotations.proto";
20 import "google/protobuf/timestamp.proto";
22 option go_package = "google.golang.org/genproto/googleapis/cloud/websecurityscanner/v1alpha;websecurityscanner";
23 option java_multiple_files = true;
24 option java_outer_classname = "ScanConfigProto";
25 option java_package = "com.google.cloud.websecurityscanner.v1alpha";
27 // A ScanConfig resource contains the configurations to launch a scan.
29 // Scan authentication configuration.
30 message Authentication {
31 // Describes authentication configuration that uses a Google account.
32 message GoogleAccount {
34 // The user name of the Google account.
39 // The password of the Google account. The credential is stored encrypted
40 // and not returned in any response.
44 // Describes authentication configuration that uses a custom account.
45 message CustomAccount {
47 // The user name of the custom account.
52 // The password of the custom account. The credential is stored encrypted
53 // and not returned in any response.
57 // The login form URL of the website.
62 // Authentication configuration
63 oneof authentication {
64 // Authentication using a Google account.
65 GoogleAccount google_account = 1;
67 // Authentication using a custom account.
68 CustomAccount custom_account = 2;
72 // Scan schedule configuration.
74 // A timestamp indicates when the next run will be scheduled. The value is
75 // refreshed by the server after each run. If unspecified, it will default
76 // to current server time, which means the scan will be scheduled to start
78 google.protobuf.Timestamp schedule_time = 1;
81 // The duration of time between executions in days.
82 int32 interval_duration_days = 2;
85 // Type of user agents used for scanning.
87 // The user agent is unknown. Service will default to CHROME_LINUX.
88 USER_AGENT_UNSPECIFIED = 0;
90 // Chrome on Linux. This is the service default if unspecified.
100 // Cloud platforms supported by Cloud Web Security Scanner.
101 enum TargetPlatform {
102 // The target platform is unknown. Requests with this enum value will be
103 // rejected with INVALID_ARGUMENT error.
104 TARGET_PLATFORM_UNSPECIFIED = 0;
106 // Google App Engine service.
109 // Google Compute Engine service.
113 // The resource name of the ScanConfig. The name follows the format of
114 // 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
115 // generated by the system.
119 // The user provided display name of the ScanConfig.
120 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.
129 // The starting URLs from which the scanner finds site pages.
130 repeated string starting_urls = 4;
132 // The authentication configuration. If specified, service will use the
133 // authentication configuration during scanning.
134 Authentication authentication = 5;
136 // The user agent used during scanning.
137 UserAgent user_agent = 6;
139 // The blacklist URL patterns as described in
140 // https://cloud.google.com/security-scanner/docs/excluded-urls
141 repeated string blacklist_patterns = 7;
143 // The schedule of the ScanConfig.
144 Schedule schedule = 8;
146 // Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
147 // used as a default.
148 repeated TargetPlatform target_platforms = 9;