1// Copyright 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4// 5// This file contains the definition of protocol buffers for native browser 6// fingerprinting. 7 8syntax = "proto2"; 9 10option optimize_for = LITE_RUNTIME; 11 12package autofill.risk; 13 14message Fingerprint { 15 // A simple protocol message to represent objects with width and height. 16 message Dimension { 17 optional int32 width = 1; 18 optional int32 height = 2; 19 } 20 21 // Characteristics of the user's machine that are relatively durable, 22 // i.e. that are expected to change relatively infrequently. 23 message MachineCharacteristics { 24 // A simple protocol message that represents a plugin. 25 // e.g. flash, shockwave, acrobat reader, gears, picasa 26 message Plugin { 27 optional string name = 1; 28 optional string description = 2; 29 repeated string mime_type = 3; 30 optional string version = 4; 31 } 32 33 // Information on the CPU. 34 message Cpu { 35 // e.g. "GenuineIntel" 36 optional string vendor_name = 1; 37 // e.g. "Intel(R) Xeon(R) CPU X5650 @ 2.67GHz\000" 38 optional string brand = 2; 39 } 40 41 // Information on the GPU. 42 message Graphics { 43 // The GPU manufacturer's vendor id. 44 optional uint32 vendor_id = 1; 45 46 // The GPU manufacturer's device id for the chip set. 47 optional uint32 device_id = 2; 48 49 // The driver version on the GPU. 50 optional string driver_version = 3; 51 52 // The driver date on the GPU. 53 optional string driver_date = 4; 54 55 // The GPU performance statistics. 56 message PerformanceStatistics { 57 optional float graphics_score = 1; 58 optional float gaming_score = 2; 59 optional float overall_score = 3; 60 } 61 optional PerformanceStatistics performance_statistics = 5; 62 } 63 64 // Browser features that integrate with Risk. 65 enum BrowserFeature { 66 FEATURE_UNKNOWN = 0; // Should not be reachable. 67 DEPRECATED_FEATURE_AUTOCHECKOUT = 1; 68 FEATURE_REQUEST_AUTOCOMPLETE = 2; 69 } 70 71 // A hash of the concatenatation of: 72 // * The username of the user currently logged into computer / device. 73 // * The user-assigned computer or device name. 74 optional fixed64 user_and_device_name_hash = 1; 75 76 // Build version string for the current operating system. 77 optional string operating_system_build = 2; 78 79 // Browser install time (hours since epoch). 80 optional int64 browser_install_time_hours = 3; 81 82 // Fonts installed on the machine. 83 repeated string font = 4; 84 85 // Plug-ins installed on the machine. 86 repeated Plugin plugin = 5; 87 88 // Delta in ms of the device's time zone from UTC. 89 optional int64 utc_offset_ms = 6; 90 91 // IETF-formatted language tag. e.g. "en", "en-US", "es-419", etc. 92 // http://en.wikipedia.org/wiki/IETF_language_tag 93 optional string browser_language = 7; 94 95 // User-requested language code of viewed sites. Languages in 96 // accept-languages. 97 repeated string requested_language = 8; 98 99 // Default charset of the browser. (e.g. ISO-8859-1, obtained from 100 // document.defaultCharset) 101 optional string charset = 9; 102 103 // The number of physical screens. 104 optional int32 screen_count = 10; 105 106 // Information about the user's monitor's physical screen size. 107 // (e.g. 1024 x 768) 108 optional Dimension screen_size = 11; 109 110 // The color depth of the user's screen (obtained from screen.colorDepth 111 // or screen.pixelDepth) 112 optional int32 screen_color_depth = 12; 113 114 // Information about the size of the portion of the screen that is unusable 115 // to a program (i.e. on Windows, the portion of the screen that is taken 116 // up by the taskbar) 117 optional Dimension unavailable_screen_size = 13; 118 119 optional string user_agent = 14; 120 121 // Total size of each hard drive partition. 122 repeated int32 partition_size = 15; 123 124 optional Cpu cpu = 16; 125 126 // Total RAM in bytes. 127 optional int64 ram = 17; 128 129 // Graphics card being used. 130 optional Graphics graphics_card = 18; 131 132 // Build version string for browser. 133 optional string browser_build = 19; 134 135 // The client-side feature corresponding to this request. 136 optional BrowserFeature browser_feature = 20; 137 } 138 139 // Contains properties relating to more transient computer / browser state. 140 message TransientState { 141 // Corresponds to window.innerWidth / innerHeight 142 optional Dimension inner_window_size = 1; 143 144 // Corresponds to window.outerWidth / outerHeight 145 optional Dimension outer_window_size = 2; 146 } 147 148 // Measures computer / network performance. 149 message Performance { 150 // Bandwidth in MB/s. network.connection.bandwidth 151 optional float bandwidth = 1; 152 // Whether bandwidth cost is metered. network.connection.metered 153 optional bool metered = 2; 154 // Whether it's wifi, 3g, 2g, etc. network.connection.type 155 optional string network_type = 3; 156 } 157 158 // Properties describing the user -- especially the user's state in the 159 // physical world. 160 message UserCharacteristics { 161 message Vector { 162 optional int32 x = 1; 163 optional int32 y = 2; 164 optional int32 z = 3; 165 } 166 167 message Location { 168 // Meters above sea level. 169 optional double altitude = 1; 170 // Latitude in degrees. 171 optional double latitude = 2; 172 // Longitude in degrees. 173 optional double longitude = 3; 174 // Accuracy in meters. 95% probability of being in this radius of 175 // lat / long. 176 optional double accuracy = 4; 177 // Milliseconds since epoch since measurement. 178 optional int64 time_in_ms = 5; 179 } 180 181 // Average force by finger presses. TouchEvent.force 182 optional float force = 1; 183 // Average finger width. TouchEvent.radiusX 184 optional float touch_width = 2; 185 // Average finger height. TouchEvent.radiusY 186 optional float touch_height = 3; 187 // TouchEvent.rotationAngle 188 optional int32 touch_rotation = 4; 189 // Orientation while user is navigating flow and the device is roughly 190 // stable. x for alpha, y for beta, z for gamma 191 // TODO(isherman): Orientation data is only available asynchronously in 192 // Chrome. 193 optional Vector device_orientation = 5; 194 // Acceleration while measuring orientation. 195 // TODO(isherman): Acceleration data is not available in Chrome. 196 optional Vector device_acceleration = 6; 197 optional Location location = 7; 198 } 199 200 // Metadata associated with data collection or the user that doesn't actually 201 // fingerprint the device. 202 message Metadata { 203 // When this data was collected / received, in milliseconds since the epoch. 204 optional int64 timestamp_ms = 1; 205 // Obfuscated Gaia id associated with transaction. 206 optional uint64 obfuscated_gaia_id = 2; 207 // Version of the native library generating this proto. 208 // This may be manually bumped when the code populating the proto has 209 // significantly changed. 210 optional int32 fingerprinter_version = 3; 211 } 212 213 // Computer / browser fingerprint. 214 optional MachineCharacteristics machine_characteristics = 1; 215 216 optional Performance performance = 2; 217 218 optional UserCharacteristics user_characteristics = 3; 219 220 optional TransientState transient_state = 4; 221 222 // Metadata associated with data collection. 223 optional Metadata metadata = 5; 224} 225