Correctly track texture cleared state for sharing
[chromium-blink-merge.git] / components / proximity_auth / cryptauth / proto / cryptauth_api.proto
blobcf3bc89188dcccdf98049452f0fd7451d2e232a0
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.
5 // Definitions for CryptAuth API calls.
6 // Generated from server definitions. Do not edit.
7 syntax = "proto2";
9 package cryptauth;
11 option optimize_for = LITE_RUNTIME;
13 // Device information provided to external clients that need to sync device
14 // state.
15 message ExternalDeviceInfo {
16   // A cryptographic public key associated with the device.
17   optional bytes public_key = 1;
19   // A user friendly (human readable) name for this device.
20   optional string friendly_device_name = 2;
22   // If available, the device's bluetooth MAC address
23   optional string bluetooth_address = 3;
25   // Whether or not this device can be used as an unlock key
26   optional bool unlock_key = 4;
28   // Whether or not this device can be unlocked
29   optional bool unlockable = 5;
32 // Request for a list of devices that could be used as Unlock Keys, optionally
33 // requesting a callback over bluetooth (for proximity detection).
34 message FindEligibleUnlockDevicesRequest {
35   // A bluetooth MAC address to be contacted if a device that may be eligible
36   // for unlock is nearby. If set, a message will be pushed to all eligible
37   // unlock devices requesting that they contact the specified MAC address. If
38   // this field is left unset, no callback will be made, and no message will be
39   // pushed to the user's devices.
40   optional string callback_bluetooth_address = 2;
43 // Response containing a list of devices that could be made Unlock Keys
44 message FindEligibleUnlockDevicesResponse {
45   // Devices that could be made Unlock Keys (even if they aren't enabled yet)
46   repeated ExternalDeviceInfo eligible_devices = 1;
48   // Devices that cannot be made unlock keys, and reasons for this. This list
49   // will not contain any non-gms core devices, even though these are also not
50   // eligible to be unlock keys.
51   repeated IneligibleDevice ineligible_devices = 2;
54 // Request to complete a device enrollment.
55 message FinishEnrollmentRequest {
56   // The enrollment session identifer from the <code>setup</code> response.
57   optional bytes enrollment_session_id = 2;
59   // An encrypted payload containing enrollment information for the device.
60   optional bytes enrollment_message = 3;
62   // A Diffie-Hellman public key for the device, to complete the key exchange.
63   optional bytes device_ephemeral_key = 4;
66 // Response indicating whether a device enrollment completed successfully.
67 message FinishEnrollmentResponse {
68   // Status should be OK if the request was successful.
69   optional string status = 1;
71   // A detailed error message if there was a failure.
72   optional string error_message = 2;
75 // Used to request devices that have a specific feature.
76 message GetDevicesForFeatureRequest {
77   // Requests those devices that support the specified DeviceFeature
78   optional string device_feature = 2;
81 // Devices that have a certain feature, as returned by the GetDevicesForFeature
82 // RPC.
83 message GetDevicesForFeatureResponse {
84   // A (possibly empty) list of devices supporting the requested feature.
85   repeated ExternalDeviceInfo result_sets = 1;
88 // Request for a listing of a user's own devices
89 message GetMyDevicesRequest {
90   // Return only devices that can act as EasyUnlock keys.
91   optional bool approved_for_unlock_required = 2;
93   // Allow the returned list to be somewhat out of date (read will be faster)
94   optional bool allow_stale_read = 3 [default = false];
97 // Response containing a listing of the users device's
98 message GetMyDevicesResponse {
99   // A listing of all sync-able devices
100   repeated ExternalDeviceInfo devices = 1;
103 // A device that the server thinks is not eligible to be an unlock key, and the
104 // reason for this.
105 message IneligibleDevice {
106   // The device that is not eligible to be an unlock key.
107   optional ExternalDeviceInfo device = 1;
109   // The reasons why the server thinks it is not an unlock key. NOTE: for now,
110   // this list of reasons will contain exactly one element. It is a repeated
111   // field because, in principle, there can be more than one reason that makes a
112   // device not eligible to be an unlock key, and we want to be able to add
113   // multiple reasons in the future.
114   repeated string reasons = 2;
117 // Requests to send a "tickle" requesting to sync all of a user's devices now
118 message SendDeviceSyncTickleRequest {
121 message SendDeviceSyncTickleResponse {
122   // empty for now
125 // Contains information needed to begin a device enrollment.
126 message SetupEnrollmentInfo {
127   // Type of protocol this setup information was requested for
128   optional string type = 1;
130   // A session identifier to be used for this enrollment session.
131   optional bytes enrollment_session_id = 2;
133   // A Diffie-Hellman public key used to perform a key exchange during
134   // enrollment.
135   optional bytes server_ephemeral_key = 3;
138 // Requests information needed to begin a device enrollment.
139 message SetupEnrollmentRequest {
140   // Deprecated. See <code>application_id</code>
141   optional string origin = 2;
143   // Type(s) of protocol supported by this enrolling device (e.g. "gcmV1")
144   repeated string types = 3;
146   // Indicates whether a legacy crypto suite must be used with this device.
147   optional bool use_legacy_crypto = 4;
149   // A URL describing which application facets this enrollment can be used (see
150   // http://go/appid).
151   optional string application_id = 5;
154 // Contains information needed to begin a device enrollment.
155 message SetupEnrollmentResponse {
156   // Should return OK if the request was well formed.
157   optional string status = 1;
159   // Information for each of the requested protocol <code>type</code>s.
160   repeated SetupEnrollmentInfo infos = 2;
163 // Used to enable or disable EasyUnlock features on a specified device, and also
164 // causes other devices to sync the new EasyUnlock state.
165 message ToggleEasyUnlockRequest {
166   // If true, Easy Unlock will be enabled for the device with public key equal
167   // to public_key. Otherwise, it will be disabled for that device.
168   optional bool enable = 1;
170   // Encoded public key of the device to enable/disable (here you must use the
171   // same exact encoding that was sent during device enrollment).
172   optional bytes public_key = 2;
174   // If true, EasyUnlock enabled state will be set to the value of "enable" for
175   // all of a user's devices. This is the same as calling the toggle RPC for
176   // every device. However, this removes the need for calling GetMyDevices, so
177   // it reduces network overhead. If this field is set "public_key" must not be
178   // set.  NOTE: the case enable=true is not yet supported, so this option can
179   // only disable EasyUnlock for all devices.
180   optional bool apply_to_all = 3;
183 message ToggleEasyUnlockResponse {
184   // empty for now