Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1112)

Side by Side Diff: chrome/browser/policy/proto/device_management_backend.proto

Issue 4121003: Implement device token fetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final feedback Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/policy/mock_device_management_backend.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 syntax = "proto2";
6
7 option optimize_for = LITE_RUNTIME;
8
9 package enterprise_management;
10
11 // Generic value container.
12 message GenericValue {
13 enum ValueType {
14 VALUE_TYPE_BOOL = 1;
15 VALUE_TYPE_INT64 = 2;
16 VALUE_TYPE_STRING = 3;
17 VALUE_TYPE_DOUBLE = 4;
18 VALUE_TYPE_BYTES = 5;
19 VALUE_TYPE_BOOL_ARRAY = 6;
20 VALUE_TYPE_INT64_ARRAY_ = 7;
21 VALUE_TYPE_STRING_ARRAY = 8;
22 VALUE_TYPE_DOUBLE_ARRAY = 9;
23 }
24
25 optional ValueType value_type = 1 [default = VALUE_TYPE_STRING];
26
27 // basic value types
28 optional bool bool_value = 2;
29 optional int64 int64_value = 3;
30 optional string string_value = 4;
31 optional double double_value = 5;
32 optional bytes bytes_value = 6;
33 repeated bool bool_array = 7;
34 repeated int64 int64_array = 8;
35 repeated string string_array = 9;
36 repeated double double_array = 10;
37 }
38
39 // Generic name value pair container.
40 message GenericNamedValue {
41 required string name = 1;
42 optional GenericValue value = 2;
43 }
44
45 // A setting is a set of generic name value pairs.
46 message GenericSetting {
47 repeated GenericNamedValue named_value = 1;
48 }
49
50 // Identify a single device policy setting key/value pair.
51 message DevicePolicySetting {
52 // key of the policy setting
53 required string policy_key = 1;
54 // value of the setting
55 optional GenericSetting policy_value = 2;
56 // watermark for setting value.
57 optional string watermark = 3;
58 }
59
60 // Request from device to server to register device.
61 message DeviceRegisterRequest {
62 // reregister device without erasing server state.
63 // it can be used to refresh dmtoken etc.
64 optional bool reregister = 1;
65 }
66
67 // Response from server to device register request.
68 message DeviceRegisterResponse {
69 // device mangement toke for this registration.
70 required string device_management_token = 1;
71 }
72
73 // Request from device to server to unregister device.
74 message DeviceUnregisterRequest {
75 }
76
77 // Response from server to device unregister request.
78 message DeviceUnregisterResponse {
79 }
80
81 // Request for a setting or with optional watermark on client side.
82 message DevicePolicySettingRequest {
83 // setting key
84 required string key = 1;
85 // watermark last read from server if available.
86 optional string watermark = 2;
87 }
88
89 // Request from device to server to read device policies.
90 message DevicePolicyRequest {
91 // identify request scope: CrOS settings or other type of settings.
92 optional string policy_scope = 1;
93 // identify key to the settings: proxy etc.
94 repeated DevicePolicySettingRequest setting_request = 2;
95 }
96
97 // Response from server to agent for reading policies.
98 message DevicePolicyResponse {
99 // the result of the settings.
100 repeated DevicePolicySetting setting = 1;
101 }
102
103 // Request from the DMAgent on the device to the DMServer.
104 // This is container for all requests from client.
105 //
106 // Authorization:
107 // 1. If request is register_request, client must pass in GoogleLogin auth
108 // cookie in Authorization header:
109 // Authorization: GoogleLogin auth=<auth cookie>
110 // The response will contain an unique DMToken for future requests.
111 // Depending on domain policy, the request may need admin approval before
112 // DMToken is issued.
113 // 2. For other requests, client must pass in DMToken in Authorization header:
114 // Authorization: GoogleDMToken token=<google dm token>
115 //
116 // Http Query parameters:
117 // Query parameters contain the following information in each request:
118 // request: register/unregister/policy etc.
119 // devicetype: CrOS/Android/Iphone etc.
120 // apptype: CrOS/AndroidDM etc.
121 // deviceid: unique id that identify the device.
122 // agent: identify agent on device.
123 message DeviceManagementRequest {
124 // Register request.
125 optional DeviceRegisterRequest register_request = 1;
126
127 // Unregister request.
128 optional DeviceUnregisterRequest unregister_request = 2;
129
130 // Data request.
131 optional DevicePolicyRequest policy_request = 3;
132 }
133
134 // Response from server to device.
135 message DeviceManagementResponse {
136 // Error code to client.
137 enum ErrorCode {
138 SUCCESS = 0;
139 // Returned for register request when device management is not supported
140 // for the domain.
141 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1;
142 // Returned when the device is not found.
143 DEVICE_NOT_FOUND = 2;
144 // Returned when passed in device management token doesn't match the token
145 // on server side.
146 DEVICE_MANAGEMENT_TOKEN_INVALID = 3;
147 // Returned when device registration is pending approval (if required).
148 ACTIVATION_PENDING = 4;
149 }
150
151 // Error code for this request.
152 required ErrorCode error = 1;
153
154 // Error message.
155 optional string error_message = 2;
156
157 // Register response
158 optional DeviceRegisterResponse register_response = 3;
159
160 // Unregister response
161 optional DeviceUnregisterResponse unregister_response = 4;
162
163 // Policy response.
164 optional DevicePolicyResponse policy_response = 5;
165 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/mock_device_management_backend.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698