Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / websecurityscanner / v1alpha / scan_config.proto
1 // Copyright 2018 Google Inc.
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 syntax = "proto3";
16
17 package google.cloud.websecurityscanner.v1alpha;
18
19 import "google/api/annotations.proto";
20 import "google/protobuf/timestamp.proto";
21
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";
26
27 // A ScanConfig resource contains the configurations to launch a scan.
28 message ScanConfig {
29   // Scan authentication configuration.
30   message Authentication {
31     // Describes authentication configuration that uses a Google account.
32     message GoogleAccount {
33       // Required.
34       // The user name of the Google account.
35       string username = 1;
36
37       // Input only.
38       // Required.
39       // The password of the Google account. The credential is stored encrypted
40       // and not returned in any response.
41       string password = 2;
42     }
43
44     // Describes authentication configuration that uses a custom account.
45     message CustomAccount {
46       // Required.
47       // The user name of the custom account.
48       string username = 1;
49
50       // Input only.
51       // Required.
52       // The password of the custom account. The credential is stored encrypted
53       // and not returned in any response.
54       string password = 2;
55
56       // Required.
57       // The login form URL of the website.
58       string login_url = 3;
59     }
60
61     // Required.
62     // Authentication configuration
63     oneof authentication {
64       // Authentication using a Google account.
65       GoogleAccount google_account = 1;
66
67       // Authentication using a custom account.
68       CustomAccount custom_account = 2;
69     }
70   }
71
72   // Scan schedule configuration.
73   message Schedule {
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
77     // immediately.
78     google.protobuf.Timestamp schedule_time = 1;
79
80     // Required.
81     // The duration of time between executions in days.
82     int32 interval_duration_days = 2;
83   }
84
85   // Type of user agents used for scanning.
86   enum UserAgent {
87     // The user agent is unknown. Service will default to CHROME_LINUX.
88     USER_AGENT_UNSPECIFIED = 0;
89
90     // Chrome on Linux. This is the service default if unspecified.
91     CHROME_LINUX = 1;
92
93     // Chrome on Android.
94     CHROME_ANDROID = 2;
95
96     // Safari on IPhone.
97     SAFARI_IPHONE = 3;
98   }
99
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;
105
106     // Google App Engine service.
107     APP_ENGINE = 1;
108
109     // Google Compute Engine service.
110     COMPUTE = 2;
111   }
112
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.
116   string name = 1;
117
118   // Required.
119   // The user provided display name of the ScanConfig.
120   string display_name = 2;
121
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
128   // Required.
129   // The starting URLs from which the scanner finds site pages.
130   repeated string starting_urls = 4;
131
132   // The authentication configuration. If specified, service will use the
133   // authentication configuration during scanning.
134   Authentication authentication = 5;
135
136   // The user agent used during scanning.
137   UserAgent user_agent = 6;
138
139   // The blacklist URL patterns as described in
140   // https://cloud.google.com/security-scanner/docs/excluded-urls
141   repeated string blacklist_patterns = 7;
142
143   // The schedule of the ScanConfig.
144   Schedule schedule = 8;
145
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;
149 }