Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 // Definitions for CryptAuth API calls. | |
| 6 // Generated from server definitions. Do not edit. | |
| 7 syntax = "proto2"; | |
| 8 | |
| 9 package cryptauth; | |
| 10 | |
| 11 option optimize_for = LITE_RUNTIME; | |
| 12 | |
| 13 // Wait for the specified transaction to change state. | |
| 14 message AwaitTxRequest { | |
| 15 // An opaque (random) identifier for this transaction. | |
| 16 optional bytes tx_id = 1; | |
| 17 } | |
| 18 | |
| 19 // If the transaction has completed, a token will be returned encapsulating the | |
| 20 // result of the transaction. The token is opaque, and can be decoded by using | |
| 21 // the CompleteTx backend query. | |
| 22 message AwaitTxResponse { | |
| 23 // An opaque token encoding the transaction result. | |
| 24 optional bytes tx_token = 1; | |
| 25 | |
| 26 // Identifies what kind of resource this is. Value: the fixed string | |
| 27 // <code>"cryptauth#awaitTxResponse"</code>. | |
| 28 optional string kind = 2; | |
| 29 } | |
| 30 | |
| 31 // Device information provided to external clients that need to sync device | |
| 32 // state. | |
| 33 message ExternalDeviceInfo { | |
| 34 // A cryptographic public key associated with the device. | |
| 35 optional bytes public_key = 1; | |
| 36 | |
| 37 // A user friendly (human readable) name for this device. | |
| 38 optional string friendly_device_name = 2; | |
| 39 | |
| 40 // If available, the device's bluetooth MAC address | |
| 41 optional string bluetooth_address = 3; | |
| 42 | |
| 43 // Whether or not this device can be used as an unlock key | |
| 44 optional bool unlock_key = 4; | |
| 45 | |
| 46 // Whether or not this device can be unlocked | |
| 47 optional bool unlockable = 5; | |
| 48 } | |
| 49 | |
| 50 // Request for a list of devices that could be used as Unlock Keys, optionally | |
| 51 // requesting a callback over bluetooth (for proximity detection). | |
| 52 message FindEligibleUnlockDevicesRequest { | |
| 53 // A bluetooth MAC address to be contacted if a device that may be eligible | |
| 54 // for unlock is nearby. If set, a message will be pushed to all eligible | |
| 55 // unlock devices requesting that they contact the specified MAC address. If | |
| 56 // this field is left unset, no callback will be made, and no message will be | |
| 57 // pushed to the user's devices. | |
| 58 optional string callback_bluetooth_address = 2; | |
| 59 | |
| 60 // Identifies what kind of resource this is. Value: the fixed string | |
| 61 // <code>"cryptauth#findEligibleUnlockDevicesRequest"</code>. | |
| 62 optional string kind = 3; | |
| 63 } | |
| 64 | |
| 65 // Response containing a list of devices that could be made Unlock Keys | |
| 66 message FindEligibleUnlockDevicesResponse { | |
| 67 // Devices that could be made Unlock Keys (even if they aren't enabled yet) | |
| 68 repeated ExternalDeviceInfo eligible_devices = 1; | |
| 69 | |
| 70 // Devices that cannot be made unlock keys, and reasons for this. This list | |
| 71 // will not contain any non-gms core devices, even though these are also not | |
| 72 // eligible to be unlock keys. | |
| 73 repeated IneligibleDevice ineligible_devices = 2; | |
| 74 | |
| 75 // Identifies what kind of resource this is. Value: the fixed string | |
| 76 // <code>"cryptauth#findEligibleUnlockDevicesResponse"</code>. | |
| 77 optional string kind = 3; | |
| 78 } | |
| 79 | |
| 80 // Request to complete a device enrollment. | |
| 81 message FinishEnrollmentRequest { | |
| 82 // The enrollment session identifer from the <code>setup</code> response. | |
| 83 optional bytes enrollment_session_id = 2; | |
| 84 | |
| 85 // An encrypted payload containing enrollment information for the device. | |
| 86 optional bytes enrollment_message = 3; | |
| 87 | |
| 88 // A Diffie-Hellman public key for the device, to complete the key exchange. | |
| 89 optional bytes device_ephemeral_key = 4; | |
| 90 } | |
| 91 | |
| 92 // Response indicating whether a device enrollment completed successfully. | |
| 93 message FinishEnrollmentResponse { | |
| 94 // Status should be OK if the request was successful. | |
| 95 optional string status = 1; | |
| 96 | |
| 97 // A detailed error message if there was a failure. | |
| 98 optional string error_message = 2; | |
| 99 | |
| 100 // Identifies what kind of resource this is. Value: the fixed string | |
| 101 // <code>"cryptauth#finishEnrollmentResponse"</code>. | |
| 102 optional string kind = 5; | |
| 103 } | |
| 104 | |
| 105 // Used to request devices that have a specific feature. | |
| 106 message GetDevicesForFeatureRequest { | |
| 107 // Requests those devices that support the specified DeviceFeature | |
| 108 optional string device_feature = 2; | |
| 109 } | |
| 110 | |
| 111 // Devices that have a certain feature, as returned by the GetDevicesForFeature | |
| 112 // RPC. | |
| 113 message GetDevicesForFeatureResponse { | |
| 114 // A (possibly empty) list of devices supporting the requested feature. | |
| 115 repeated ExternalDeviceInfo result_sets = 1; | |
| 116 | |
| 117 // Identifies what kind of resource this is. Value: the fixed string | |
| 118 // <code>"cryptauth#getDevicesForFeatureResponse"</code>. | |
| 119 optional string kind = 2; | |
| 120 } | |
| 121 | |
| 122 // This request is sent by the login page to obtain one challenge session for | |
| 123 // each of the user's devices. Challenges can be signed by the user's device as | |
| 124 // part of a login assertion. | |
| 125 message GetLoginChallengesRequest { | |
| 126 // Protocol type to be used with the requested login challenges. | |
| 127 optional string protocol_type = 3; | |
| 128 | |
| 129 // Used to request a login challenge for a particular device, specified by | |
| 130 // its public key | |
|
Ilya Sherman
2014/10/07 01:09:09
nit: Why did you rewrap this? It seemed fine befo
Tim Song
2014/10/07 17:05:42
I just did a vim autoformat (gq) on all comments,
Ilya Sherman
2014/10/07 20:46:41
It looks like that tool reformatted everything to
Tim Song
2014/10/14 00:30:24
I'm not following. The comments looks fine to me =
Ilya Sherman
2014/10/14 00:38:10
Sorry, typing fail. It looks like the tool reform
Tim Song
2014/10/15 17:30:10
Done.
| |
| 131 optional bytes user_public_key = 5; | |
| 132 } | |
| 133 | |
| 134 // Response encapsulating a list of login challenges (together with their | |
| 135 // metadata). | |
| 136 message GetLoginChallengesResponse { | |
| 137 // List of login challenges (with associated metadata) | |
| 138 repeated LoginChallengeInfo login_challenge_infos = 3; | |
| 139 | |
| 140 // Identifies what kind of resource this is. Value: the fixed string | |
| 141 // <code>"cryptauth#getLoginChallengesResponse"</code>. | |
| 142 optional string kind = 4; | |
| 143 } | |
| 144 | |
| 145 // Request for a listing of a user's own devices | |
| 146 message GetMyDevicesRequest { | |
| 147 // Return only devices that can act as EasyUnlock keys. | |
| 148 optional bool approved_for_unlock_required = 2; | |
| 149 | |
| 150 // Identifies what kind of resource this is. Value: the fixed string | |
| 151 // <code>"cryptauth#getMyDevicesRequest"</code>. | |
| 152 optional string kind = 3; | |
| 153 } | |
| 154 | |
| 155 // Response containing a listing of the users device's | |
| 156 message GetMyDevicesResponse { | |
| 157 // A listing of all sync-able devices | |
| 158 repeated ExternalDeviceInfo devices = 1; | |
| 159 | |
| 160 // Identifies what kind of resource this is. Value: the fixed string | |
| 161 // <code>"cryptauth#getMyDevicesResponse"</code>. | |
| 162 optional string kind = 2; | |
| 163 } | |
| 164 | |
| 165 // A device that the server thinks is not eligible to be an unlock key, and the | |
| 166 // reason for this. | |
| 167 message IneligibleDevice { | |
| 168 // The device that is not eligible to be an unlock key. | |
| 169 optional ExternalDeviceInfo device = 1; | |
| 170 | |
| 171 // The reasons why the server thinks it is not an unlock key. NOTE: for now, | |
| 172 // this list of reasons will contain exactly one element. It is a repeated | |
| 173 // field because, in principle, there can be more than one reason that makes | |
| 174 // a device not eligible to be an unlock key, and we want to be able to add | |
|
Ilya Sherman
2014/10/07 01:09:08
Ditto.
Tim Song
2014/10/07 17:05:42
Same.
| |
| 175 // multiple reasons in the future. | |
| 176 repeated string reasons = 2; | |
| 177 } | |
| 178 | |
| 179 // A login challenge together with its metadata | |
| 180 message LoginChallengeInfo { | |
| 181 // Protocol type to be used with this login challenge | |
| 182 optional string type = 1; | |
| 183 | |
| 184 // Challenge to be signed by the device | |
| 185 optional bytes challenge = 2; | |
| 186 | |
| 187 // Key handle that the device registered with | |
| 188 optional bytes key_handle = 3; | |
| 189 | |
| 190 // Used to identify this challenge to the server | |
| 191 optional bytes challenge_session_id = 7; | |
| 192 | |
| 193 // Application id for which the device key is supposed to work | |
| 194 optional string application_id = 8; | |
| 195 } | |
| 196 | |
| 197 // Encapsulates a transaction reply, sent from the user's device. The details of | |
| 198 // the transaction and the reply are encrypted. | |
| 199 message ReplyTxRequest { | |
| 200 // Encrypted transaction ledger, containing the original prompt request and | |
| 201 // the user's response. | |
| 202 optional bytes secure_tx_ledger = 1; | |
| 203 } | |
| 204 | |
| 205 // Requests to send a "tickle" requesting to sync all of a user's devices now | |
| 206 message SendDeviceSyncTickleRequest { | |
| 207 // Identifies what kind of resource this is. Value: the fixed string | |
| 208 // <code>"cryptauth#sendDeviceSyncTickleRequest"</code>. | |
| 209 optional string kind = 2; | |
| 210 } | |
| 211 | |
| 212 // Contains information needed to begin a device enrollment. | |
| 213 message SetupEnrollmentInfo { | |
| 214 // Type of protocol this setup information was requested for | |
| 215 optional string type = 1; | |
| 216 | |
| 217 // A session identifier to be used for this enrollment session. | |
| 218 optional bytes enrollment_session_id = 2; | |
| 219 | |
| 220 // A Diffie-Hellman public key used perform a key exchange during enrollment. | |
|
Ilya Sherman
2014/10/07 01:09:09
nit: "used perform" -> "used to perform"
Tim Song
2014/10/07 17:05:43
Done. Sorry forgot to edit this file after editing
| |
| 221 optional bytes server_ephemeral_key = 3; | |
| 222 } | |
| 223 | |
| 224 // Requests information needed to begin a device enrollment. | |
| 225 message SetupEnrollmentRequest { | |
| 226 // Deprecated. See <code>application_id</code> | |
| 227 optional string origin = 2; | |
| 228 | |
| 229 // Type(s) of protocol supported by this enrolling device (e.g. "gcmV1") | |
| 230 repeated string types = 3; | |
| 231 | |
| 232 // Indicates whether a legacy crypto suite must be used with this device. | |
| 233 optional bool use_legacy_crypto = 4; | |
| 234 | |
| 235 // A URL describing which application facets this enrollment can be used (see | |
| 236 // http://go/appid). | |
| 237 optional string application_id = 5; | |
| 238 } | |
| 239 | |
| 240 // Contains information needed to begin a device enrollment. | |
| 241 message SetupEnrollmentResponse { | |
| 242 // Should return OK if the request was well formed. | |
| 243 optional string status = 1; | |
| 244 | |
| 245 // Information for each of the requested protocol <code>type</code>s. | |
| 246 repeated SetupEnrollmentInfo infos = 2; | |
| 247 | |
| 248 // Identifies what kind of resource this is. Value: the fixed string | |
| 249 // <code>"cryptauth#setupEnrollmentResponse"</code>. | |
| 250 optional string kind = 3; | |
| 251 } | |
| 252 | |
| 253 // Encapsulates a sync request from the user's device, in encrypted form. This | |
| 254 // is used to inform the server when the user's device has received a | |
| 255 // transaction, as well as to provide additional client state information | |
| 256 // useful for updating device records, debugging, UI indications, etc. | |
| 257 message SyncTxRequest { | |
| 258 // Encrypted sync request, containing state of the user's device at the time | |
| 259 // the sync request was sent, as well as indicating whether a specific | |
| 260 // transaction is desired to be sync'd, or if a list of all pending | |
| 261 // transactions should be sent back in the response. | |
| 262 optional bytes secure_sync_request = 1; | |
| 263 } | |
| 264 message SyncTxResponse { | |
| 265 // Encrypted sync response, containing any additional transaction information | |
| 266 // requested by the device for a specific transaction, or a list of all | |
| 267 // currently pending transactions if none was specified in the request. | |
| 268 optional bytes secure_sync_response = 1; | |
| 269 | |
| 270 // Identifies what kind of resource this is. Value: the fixed string | |
| 271 // <code>"cryptauth#syncTxResponse"</code>. | |
| 272 optional string kind = 2; | |
| 273 } | |
| 274 | |
| 275 // Used to enable or disable EasyUnlock features on a specified device, and | |
| 276 // also causes other devices to sync the new EasyUnlock state. | |
|
Ilya Sherman
2014/10/07 01:09:08
nit: Unnecessary rewrap
Tim Song
2014/10/07 17:05:43
Same.
| |
| 277 message ToggleEasyUnlockRequest { | |
| 278 // If true, Easyunlock will be enabled for the device with public key equal | |
|
Ilya Sherman
2014/10/07 01:09:08
nit: "Easyunlock" -> "EasyUnlock"
Tim Song
2014/10/07 17:05:42
Done.
| |
| 279 // to public_key. Otherwise, it will be disabled for that device. | |
| 280 optional bool enable = 1; | |
| 281 | |
| 282 // Encoded public key of the device to enable/disable (here you must use the | |
| 283 // same exact encoding that was sent during device enrollment). | |
| 284 optional bytes public_key = 2; | |
| 285 | |
| 286 // If true, EasyUnlock enabled state will be set to the value of "enable" for | |
| 287 // all of a user's devices. This is the same as calling the toggle RPC for | |
| 288 // every device. However, this removes the need for calling GetMyDevices, so | |
| 289 // it reduces network overhead. If this field is set "public_key" must not be | |
| 290 // set. NOTE: the case enable=true is not yet supported, so this option can | |
| 291 // only disable EasyUnlock for all devices. | |
| 292 optional bool apply_to_all = 3; | |
| 293 | |
| 294 // Identifies what kind of resource this is. Value: the fixed string | |
| 295 // <code>"cryptauth#toggleEasyUnlockRequest"</code>. | |
| 296 optional string kind = 4; | |
| 297 } | |
| OLD | NEW |