| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This proto file includes: | 5 // This proto file includes: |
| 6 // (1) Client side phishing and malware detection request and response | 6 // (1) Client side phishing and malware detection request and response |
| 7 // protocol buffers. Those protocol messages should be kept in sync | 7 // protocol buffers. Those protocol messages should be kept in sync |
| 8 // with the server implementation. | 8 // with the server implementation. |
| 9 // | 9 // |
| 10 // (2) Safe Browsing reporting protocol buffers. | 10 // (2) Safe Browsing reporting protocol buffers. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 optional int32 resource_type = 5; | 143 optional int32 resource_type = 5; |
| 144 } | 144 } |
| 145 | 145 |
| 146 // List of resource urls that match the malware IP list. | 146 // List of resource urls that match the malware IP list. |
| 147 repeated UrlInfo bad_ip_url_info = 7; | 147 repeated UrlInfo bad_ip_url_info = 7; |
| 148 | 148 |
| 149 // Population that the reporting user is part of. | 149 // Population that the reporting user is part of. |
| 150 optional ChromeUserPopulation population = 9; | 150 optional ChromeUserPopulation population = 9; |
| 151 } | 151 } |
| 152 | 152 |
| 153 // The message is used for client request to determine whether the provided URL |
| 154 // is safe for the purposes of entering user credentials for logging in. |
| 155 message LoginReputationClientRequest { |
| 156 // The top level frame URL of the webpage that hosts the login form. |
| 157 // The client will strip CGI parameters. |
| 158 optional string page_url = 1; |
| 159 |
| 160 // Type for the request. |
| 161 // It could be low reputation request or password reuse request. |
| 162 enum TriggerType { |
| 163 TRIGGER_TYPE_UNSPECIFIED = 0; |
| 164 UNFAMILIAR_LOGIN_PAGE = 1; |
| 165 PASSWORD_REUSE_EVENT = 2; |
| 166 } |
| 167 optional TriggerType trigger_type = 2; |
| 168 |
| 169 // The message contains features which can describe a frame. A frame can be |
| 170 // a top level web page or an iframe. |
| 171 message Frame { |
| 172 // Id of a frame. The frame whose index = 0 is the top level web page. |
| 173 optional int32 frame_index = 1; |
| 174 |
| 175 // Id of the parent frame. |
| 176 optional int32 parent_frame_index = 2; |
| 177 |
| 178 // Url of the frame. If could be top level url (from web page) or url of |
| 179 // the iframe. |
| 180 optional string url = 3; |
| 181 |
| 182 // Whether the frame contains password field. |
| 183 optional bool has_password_field = 4; |
| 184 |
| 185 // URLs transitions in reverse chronological order, i.e. the top level url |
| 186 // or the url of the iframe comes first in the list. |
| 187 repeated ReferrerChainEntry referrer_chain = 5; |
| 188 |
| 189 // The message contains features of a form. |
| 190 message Form { |
| 191 // Action url of the form. |
| 192 optional string action_url = 1; |
| 193 |
| 194 // Whether the form contains password field. |
| 195 optional bool has_password_field = 2; |
| 196 } |
| 197 |
| 198 repeated Form forms = 6; |
| 199 } |
| 200 |
| 201 repeated Frame frames = 3; |
| 202 |
| 203 // The message contains fields needed for a password reuse event. |
| 204 message PasswordReuseEvent { |
| 205 // Origins that the reused password had been used on. The origins are |
| 206 // maintained by Chrome password manager. |
| 207 // The field is filled in only when TriggerType is PASSWORD_REUSE_EVENT. |
| 208 repeated string password_reused_original_origins = 1; |
| 209 |
| 210 // The frame that the password reuse is detected. |
| 211 optional int32 frame_id = 2; |
| 212 } |
| 213 |
| 214 optional PasswordReuseEvent password_reuse_event = 4; |
| 215 |
| 216 // The number of verdicts stored on the client. |
| 217 optional int32 stored_verdict_cnt = 5; |
| 218 } |
| 219 |
| 220 // The message is used for client response for login reputation requests. |
| 221 message LoginReputationClientResponse { |
| 222 // Type of verdicts issued by the server. |
| 223 enum VerdictType { |
| 224 VERDICT_TYPE_UNSPECIFIED = 0; |
| 225 // No warning will be displayed. |
| 226 SAFE = 1; |
| 227 // The site has low reputation or low popularity. |
| 228 LOW_REPUTATION = 2; |
| 229 // The url matches with blacklist entries. |
| 230 PHISHING = 3; |
| 231 } |
| 232 optional VerdictType verdict_type = 1; |
| 233 |
| 234 // TTL of the verdict in seconds. |
| 235 optional int64 cache_duration_sec = 2; |
| 236 |
| 237 // A host-suffix/path-prefix expression which defines a collections of pages |
| 238 // with common ownership from the same domain. |
| 239 // Generally, the pattern is defined on the granularity of domains. |
| 240 // For domains managed by multiple parties, especially in the case of large |
| 241 // hosting sites (e.g., geocities.com), we further divide the domains. |
| 242 // |
| 243 // Examples: |
| 244 // www.google.com/foo/bar?param=val -> google.com |
| 245 // www.geocities.com/foo/bar.html -> geocities.com/foo |
| 246 // adwords.blogspot.com/index.html -> adwords.blogspot.com |
| 247 // |
| 248 // The pattern will always match the page_url of the request, and will be |
| 249 // a substring of page_url. |
| 250 optional string cache_expression = 3; |
| 251 } |
| 252 |
| 153 message ClientMalwareResponse { | 253 message ClientMalwareResponse { |
| 154 required bool blacklist = 1; | 254 required bool blacklist = 1; |
| 155 // The confirmed blacklisted bad IP and its url, which will be shown in | 255 // The confirmed blacklisted bad IP and its url, which will be shown in |
| 156 // malware warning, if the blacklist verdict is true. | 256 // malware warning, if the blacklist verdict is true. |
| 157 // This IP string could be either in IPv4 or IPv6 format, which is the same | 257 // This IP string could be either in IPv4 or IPv6 format, which is the same |
| 158 // as the ones client sent to server. | 258 // as the ones client sent to server. |
| 159 optional string bad_ip = 2; | 259 optional string bad_ip = 2; |
| 160 optional string bad_url = 3; | 260 optional string bad_url = 3; |
| 161 } | 261 } |
| 162 | 262 |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 // There is no response (an empty body) to this request. | 1010 // There is no response (an empty body) to this request. |
| 911 message NotificationImageReportRequest { | 1011 message NotificationImageReportRequest { |
| 912 optional string notification_origin = 1; // Src-origin of the notification. | 1012 optional string notification_origin = 1; // Src-origin of the notification. |
| 913 optional ImageData image = 2; // The bitmap of the image. | 1013 optional ImageData image = 2; // The bitmap of the image. |
| 914 | 1014 |
| 915 // Note that the image URL is deliberately omitted as it would be untrusted, | 1015 // Note that the image URL is deliberately omitted as it would be untrusted, |
| 916 // since the notification image fetch may be intercepted by a Service Worker | 1016 // since the notification image fetch may be intercepted by a Service Worker |
| 917 // (even if the image URL is cross-origin). Otherwise a website could mislead | 1017 // (even if the image URL is cross-origin). Otherwise a website could mislead |
| 918 // Safe Browsing into associating phishing image bitmaps with safe image URLs. | 1018 // Safe Browsing into associating phishing image bitmaps with safe image URLs. |
| 919 } | 1019 } |
| OLD | NEW |