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 // Sync protocol datatype extension for nigori keys. | 5 // Sync protocol datatype extension for nigori keys. |
6 | 6 |
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change |
8 // any fields in this file. | 8 // any fields in this file. |
9 | 9 |
10 syntax = "proto2"; | 10 syntax = "proto2"; |
11 | 11 |
12 option optimize_for = LITE_RUNTIME; | 12 option optimize_for = LITE_RUNTIME; |
13 option retain_unknown_fields = true; | 13 option retain_unknown_fields = true; |
14 | 14 |
15 package sync_pb; | 15 package sync_pb; |
16 | 16 |
17 import "encryption.proto"; | 17 import "encryption.proto"; |
18 | 18 |
19 message NigoriKey { | 19 message NigoriKey { |
20 optional string name = 1; | 20 optional string name = 1; |
21 optional bytes user_key = 2; | 21 optional bytes user_key = 2; |
22 optional bytes encryption_key = 3; | 22 optional bytes encryption_key = 3; |
23 optional bytes mac_key = 4; | 23 optional bytes mac_key = 4; |
24 } | 24 } |
25 | 25 |
26 message NigoriKeyBag { | 26 message NigoriKeyBag { |
27 repeated NigoriKey key = 2; | 27 repeated NigoriKey key = 2; |
28 } | 28 } |
29 | 29 |
30 // Information about a device that is running a sync-enabled Chrome browser. | |
31 // We are mapping the unique per-device cache guid to more specific information | |
32 // about the device. | |
33 message DeviceInformation { | |
34 optional string cache_guid = 1; | |
35 | |
36 // The name of the device is dependent on the OS running the Chrome instance. | |
37 // On a Chromebook this is "Chromebook", on Linux the distribution name, on | |
38 // Mac OSX the hadware model name and on Windows the computer name. | |
39 optional string name = 2; | |
40 | |
41 // The platform of the device (ChromeOS, Linux, Mac, or Windows). | |
42 optional string platform = 3; | |
43 | |
44 // The Chrome version of the sync-enabled Chrome browser. | |
45 optional string chrome_version = 4; | |
46 } | |
47 | |
48 // Properties of nigori sync object. | 30 // Properties of nigori sync object. |
49 message NigoriSpecifics { | 31 message NigoriSpecifics { |
50 optional EncryptedData encryption_keybag = 1; | 32 optional EncryptedData encryption_keybag = 1; |
51 // Once keystore migration is performed, we have to freeze the keybag so that | 33 // Once keystore migration is performed, we have to freeze the keybag so that |
52 // older clients (that don't support keystore encryption) do not attempt to | 34 // older clients (that don't support keystore encryption) do not attempt to |
53 // update the keybag. | 35 // update the keybag. |
54 // Previously |using_explicit_passphrase|. | 36 // Previously |using_explicit_passphrase|. |
55 optional bool keybag_is_frozen = 2; | 37 optional bool keybag_is_frozen = 2; |
56 | 38 |
57 // Obsolete encryption fields. These were deprecated due to legacy versions | 39 // Obsolete encryption fields. These were deprecated due to legacy versions |
(...skipping 27 matching lines...) Expand all Loading... |
85 | 67 |
86 // If true, all current and future datatypes will be encrypted. | 68 // If true, all current and future datatypes will be encrypted. |
87 optional bool encrypt_everything = 24; | 69 optional bool encrypt_everything = 24; |
88 | 70 |
89 optional bool encrypt_extension_settings = 25; | 71 optional bool encrypt_extension_settings = 25; |
90 optional bool encrypt_app_notifications = 26; | 72 optional bool encrypt_app_notifications = 26; |
91 optional bool encrypt_app_settings = 27; | 73 optional bool encrypt_app_settings = 27; |
92 | 74 |
93 // User device information. Contains information about each device that has a | 75 // User device information. Contains information about each device that has a |
94 // sync-enabled Chrome browser connected to the user account. | 76 // sync-enabled Chrome browser connected to the user account. |
95 repeated DeviceInformation device_information = 28; | 77 // This has been moved to the DeviceInfo message. |
| 78 // repeated DeviceInformation deprecated_device_information = 28; |
96 | 79 |
97 // Enable syncing favicons as part of tab sync. | 80 // Enable syncing favicons as part of tab sync. |
98 optional bool sync_tab_favicons = 29; | 81 optional bool sync_tab_favicons = 29; |
99 | 82 |
100 // The state of the passphrase required to decrypt |encryption_keybag|. | 83 // The state of the passphrase required to decrypt |encryption_keybag|. |
101 enum PassphraseType { | 84 enum PassphraseType { |
102 // Gaia-based encryption passphrase. Deprecated. | 85 // Gaia-based encryption passphrase. Deprecated. |
103 IMPLICIT_PASSPHRASE = 1; | 86 IMPLICIT_PASSPHRASE = 1; |
104 // Keystore key encryption passphrase. Uses |keystore_bootstrap| to | 87 // Keystore key encryption passphrase. Uses |keystore_bootstrap| to |
105 // decrypt |encryption_keybag|. | 88 // decrypt |encryption_keybag|. |
106 KEYSTORE_PASSPHRASE = 2; | 89 KEYSTORE_PASSPHRASE = 2; |
107 // Previous Gaia-based passphrase frozen and treated as a custom passphrase. | 90 // Previous Gaia-based passphrase frozen and treated as a custom passphrase. |
108 FROZEN_IMPLICIT_PASSPHRASE = 3; | 91 FROZEN_IMPLICIT_PASSPHRASE = 3; |
109 // User provided custom passphrase. | 92 // User provided custom passphrase. |
110 CUSTOM_PASSPHRASE = 4; | 93 CUSTOM_PASSPHRASE = 4; |
111 } | 94 } |
112 optional PassphraseType passphrase_type = 30 | 95 optional PassphraseType passphrase_type = 30 |
113 [default = IMPLICIT_PASSPHRASE]; | 96 [default = IMPLICIT_PASSPHRASE]; |
114 | 97 |
115 // The keystore decryptor token blob. Encrypted with the keystore key, and | 98 // The keystore decryptor token blob. Encrypted with the keystore key, and |
116 // contains the encryption key used to decrypt |encryption_keybag|. | 99 // contains the encryption key used to decrypt |encryption_keybag|. |
117 // Only set if passphrase_state == KEYSTORE_PASSPHRASE. | 100 // Only set if passphrase_state == KEYSTORE_PASSPHRASE. |
118 optional EncryptedData keystore_decryptor_token = 31; | 101 optional EncryptedData keystore_decryptor_token = 31; |
119 | 102 |
120 // The time (in epoch milliseconds) at which the keystore migration was | 103 // The time (in epoch milliseconds) at which the keystore migration was |
121 // performed. | 104 // performed. |
122 optional int64 keystore_migration_time = 32; | 105 optional int64 keystore_migration_time = 32; |
123 } | 106 } |
124 | 107 |
OLD | NEW |