OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Client side phishing and malware detection request and response | 5 // Client side phishing and malware detection request and response |
6 // protocol buffers. Those protocol messages should be kept in sync | 6 // protocol buffers. Those protocol messages should be kept in sync |
7 // with the server implementation. | 7 // with the server implementation. |
8 // | 8 // |
9 // If you want to change this protocol definition or you have questions | 9 // If you want to change this protocol definition or you have questions |
10 // regarding its format please contact chrome-anti-phishing@googlegroups.com. | 10 // regarding its format please contact chrome-anti-phishing@googlegroups.com. |
11 | 11 |
12 syntax = "proto2"; | 12 syntax = "proto2"; |
13 | 13 |
14 option optimize_for = LITE_RUNTIME; | 14 option optimize_for = LITE_RUNTIME; |
15 | 15 |
16 package safe_browsing; | 16 package safe_browsing; |
17 | 17 |
18 message ClientPhishingRequest { | 18 message ClientPhishingRequest { |
19 // URL that the client visited. The CGI parameters are stripped by the | 19 // URL that the client visited. The CGI parameters are stripped by the |
20 // client. This field is ONLY set for UMA-enabled users. | 20 // client. This field is ONLY set for UMA-enabled users. |
21 optional string url = 1; | 21 optional string url = 1; |
22 | 22 |
23 // A 5-byte SHA-256 hash prefix of the URL. Before hashing the URL is | 23 // A 5-byte SHA-256 hash prefix of the URL. Before hashing the URL is |
24 // canonicalized, converted to a suffix-prefix expression and broadened | 24 // canonicalized, converted to a suffix-prefix expression and broadened |
25 // (www prefix is removed and everything past the last '/' is stripped). | 25 // (www prefix is removed and everything past the last '/' is stripped). |
26 // Unlike "url", this is sent for all users. | 26 // |
27 optional bytes hash_prefix = 10; | 27 // Marked OBSOLETE because the URL is sent for all users, making the hash |
| 28 // prefix unnecessary. |
| 29 optional bytes OBSOLETE_hash_prefix = 10; |
28 | 30 |
29 // Score that was computed on the client. Value is between 0.0 and 1.0. | 31 // Score that was computed on the client. Value is between 0.0 and 1.0. |
30 // The larger the value the more likely the url is phishing. | 32 // The larger the value the more likely the url is phishing. |
31 required float client_score = 2; | 33 required float client_score = 2; |
32 | 34 |
33 // Note: we're skipping tag 3 because it was previously used. | 35 // Note: we're skipping tag 3 because it was previously used. |
34 | 36 |
35 // Is true if the features for this URL were classified as phishing. | 37 // Is true if the features for this URL were classified as phishing. |
36 // Currently, this will always be true for all client-phishing requests | 38 // Currently, this will always be true for all client-phishing requests |
37 // that are sent to the server. | 39 // that are sent to the server. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 required bool phishy = 1; | 72 required bool phishy = 1; |
71 | 73 |
72 // A list of SafeBrowsing host-suffix / path-prefix expressions that | 74 // A list of SafeBrowsing host-suffix / path-prefix expressions that |
73 // are whitelisted. The client must match the current top-level URL | 75 // are whitelisted. The client must match the current top-level URL |
74 // against these whitelisted expressions and only apply a positive | 76 // against these whitelisted expressions and only apply a positive |
75 // phishing verdict above if the URL does not match any expression | 77 // phishing verdict above if the URL does not match any expression |
76 // on this whitelist. The client must not cache these whitelisted | 78 // on this whitelist. The client must not cache these whitelisted |
77 // expressions. This whitelist will be empty for the vast majority | 79 // expressions. This whitelist will be empty for the vast majority |
78 // of the responses but might contain up to 100 entries in emergency | 80 // of the responses but might contain up to 100 entries in emergency |
79 // situations. | 81 // situations. |
80 repeated string whitelist_expression = 2; | 82 // |
| 83 // Marked OBSOLETE because the URL is sent for all users, so the server |
| 84 // can do whitelist matching. |
| 85 repeated string OBSOLETE_whitelist_expression = 2; |
81 } | 86 } |
82 | 87 |
83 message ClientDownloadRequest { | 88 message ClientDownloadRequest { |
84 // The final URL of the download (after all redirects). | 89 // The final URL of the download (after all redirects). |
85 required string url = 1; | 90 required string url = 1; |
86 | 91 |
87 // This message contains various binary digests of the download payload. | 92 // This message contains various binary digests of the download payload. |
88 message Digests { | 93 message Digests { |
89 optional bytes sha256 = 1; | 94 optional bytes sha256 = 1; |
90 optional bytes sha1 = 2; | 95 optional bytes sha1 = 2; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 message ClientDownloadResponse { | 162 message ClientDownloadResponse { |
158 enum Verdict { | 163 enum Verdict { |
159 // Download is considered safe. | 164 // Download is considered safe. |
160 SAFE = 0; | 165 SAFE = 0; |
161 // Download is considered dangerous. Chrome should show a warning to the | 166 // Download is considered dangerous. Chrome should show a warning to the |
162 // user. | 167 // user. |
163 DANGEROUS = 1; | 168 DANGEROUS = 1; |
164 } | 169 } |
165 required Verdict verdict = 1; | 170 required Verdict verdict = 1; |
166 } | 171 } |
OLD | NEW |