OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 syntax = "proto2"; | 5 syntax = "proto2"; |
6 | 6 |
7 option optimize_for = LITE_RUNTIME; | 7 option optimize_for = LITE_RUNTIME; |
8 | 8 |
9 package enterprise_management; | 9 package enterprise_management; |
10 | 10 |
11 // Generic value container. | 11 // Generic value container. |
(...skipping 28 matching lines...) Expand all Loading... | |
40 message GenericNamedValue { | 40 message GenericNamedValue { |
41 required string name = 1; | 41 required string name = 1; |
42 optional GenericValue value = 2; | 42 optional GenericValue value = 2; |
43 } | 43 } |
44 | 44 |
45 // A setting is a set of generic name value pairs. | 45 // A setting is a set of generic name value pairs. |
46 message GenericSetting { | 46 message GenericSetting { |
47 repeated GenericNamedValue named_value = 1; | 47 repeated GenericNamedValue named_value = 1; |
48 } | 48 } |
49 | 49 |
50 // Identify a single device policy setting key/blob pair. | |
51 message NewDevicePolicySetting { | |
danno
2011/01/13 12:09:53
s/NewDevicePolicy/DevicePolicySettings everywhere
danno
2011/01/13 12:09:53
For consistency, move this right before NewDeviceP
| |
52 // key that specifies the policy | |
53 required string policy_key = 1; | |
54 // setting of the policy that was specified by the key | |
55 optional string policy_value = 2; | |
danno
2011/01/13 12:09:53
maybe "serialized_policy_proto"?
| |
56 // watermark for setting value. | |
57 optional string watermark = 3; | |
58 | |
59 // policy_key will specify which of the following messages is contained in | |
60 // policy_value. (That is, policy_value is a protobuf message sent in a string | |
61 // blob.) Examples of possible messages encoded in policy_value: | |
62 // | |
63 // policy_key = "Homepage" | |
64 // policy_value --> message HomepageProto { | |
65 // optional string HomepageLocation = X; | |
66 // optional bool HomepageIsNewTabPage = X; | |
67 // } | |
68 // | |
69 // policy_key = "JavascriptEnabled" | |
70 // policy_value --> message JavascriptEnabledProto { | |
71 // optional bool JavascriptEnabled = X; | |
72 // } | |
73 // etc... | |
74 // | |
75 // Each top-level policy in policy_templates.json will have its own key, that | |
76 // will equal to its name. Lower-level policies (that are parts of groups) | |
77 // will be bundled in the message that is identified by the key of their | |
78 // groups. | |
79 } | |
80 | |
50 // Identify a single device policy setting key/value pair. | 81 // Identify a single device policy setting key/value pair. |
51 message DevicePolicySetting { | 82 message DevicePolicySetting { |
52 // key of the policy setting | 83 // key of the policy setting |
53 required string policy_key = 1; | 84 required string policy_key = 1; |
54 // value of the setting | 85 // value of the setting |
55 optional GenericSetting policy_value = 2; | 86 optional GenericSetting policy_value = 2; |
56 // watermark for setting value. | 87 // watermark for setting value. |
57 optional string watermark = 3; | 88 optional string watermark = 3; |
58 } | 89 } |
59 | 90 |
(...skipping 27 matching lines...) Expand all Loading... | |
87 } | 118 } |
88 | 119 |
89 // Request from device to server to read device policies. | 120 // Request from device to server to read device policies. |
90 message DevicePolicyRequest { | 121 message DevicePolicyRequest { |
91 // identify request scope: CrOS settings or other type of settings. | 122 // identify request scope: CrOS settings or other type of settings. |
92 optional string policy_scope = 1; | 123 optional string policy_scope = 1; |
93 // identify key to the settings: proxy etc. | 124 // identify key to the settings: proxy etc. |
94 repeated DevicePolicySettingRequest setting_request = 2; | 125 repeated DevicePolicySettingRequest setting_request = 2; |
95 } | 126 } |
96 | 127 |
128 // Request from device to server to read device policies. | |
129 // The use of this message instead of DevicePolicyRequest indicates that | |
130 // the client is expecting a response of type NewDevicePolicyResponse. | |
131 message NewDevicePolicyRequest { | |
132 // identify key to the settings: proxy etc. | |
danno
2011/01/13 12:09:53
Add the policy scope here, too.
| |
133 repeated DevicePolicySettingRequest setting_request = 2; | |
134 } | |
135 | |
97 // Response from server to agent for reading policies. | 136 // Response from server to agent for reading policies. |
98 message DevicePolicyResponse { | 137 message DevicePolicyResponse { |
99 // the result of the settings. | 138 // the result of the settings. |
100 repeated DevicePolicySetting setting = 1; | 139 repeated DevicePolicySetting setting = 1; |
101 } | 140 } |
102 | 141 |
142 // Response from server to agent for reading policies. | |
143 message NewDevicePolicyResponse { | |
144 // the result of the settings. | |
145 repeated NewDevicePolicySetting setting = 1; | |
146 } | |
147 | |
103 // Request from the DMAgent on the device to the DMServer. | 148 // Request from the DMAgent on the device to the DMServer. |
104 // This is container for all requests from client. | 149 // This is container for all requests from client. |
105 // | 150 // |
106 // Authorization: | 151 // Authorization: |
107 // 1. If request is register_request, client must pass in GoogleLogin auth | 152 // 1. If request is register_request, client must pass in GoogleLogin auth |
108 // cookie in Authorization header: | 153 // cookie in Authorization header: |
109 // Authorization: GoogleLogin auth=<auth cookie> | 154 // Authorization: GoogleLogin auth=<auth cookie> |
110 // The response will contain an unique DMToken for future requests. | 155 // The response will contain an unique DMToken for future requests. |
111 // Depending on domain policy, the request may need admin approval before | 156 // Depending on domain policy, the request may need admin approval before |
112 // DMToken is issued. | 157 // DMToken is issued. |
113 // 2. For other requests, client must pass in DMToken in Authorization header: | 158 // 2. For other requests, client must pass in DMToken in Authorization header: |
114 // Authorization: GoogleDMToken token=<google dm token> | 159 // Authorization: GoogleDMToken token=<google dm token> |
115 // | 160 // |
116 // Http Query parameters: | 161 // Http Query parameters: |
117 // Query parameters contain the following information in each request: | 162 // Query parameters contain the following information in each request: |
118 // request: register/unregister/policy etc. | 163 // request: register/unregister/policy etc. |
119 // devicetype: CrOS/Android/Iphone etc. | 164 // devicetype: CrOS/Android/Iphone etc. |
120 // apptype: CrOS/AndroidDM etc. | 165 // apptype: CrOS/AndroidDM etc. |
121 // deviceid: unique id that identify the device. | 166 // deviceid: unique id that identify the device. |
122 // agent: identify agent on device. | 167 // agent: identify agent on device. |
123 message DeviceManagementRequest { | 168 message DeviceManagementRequest { |
124 // Register request. | 169 // Register request. |
125 optional DeviceRegisterRequest register_request = 1; | 170 optional DeviceRegisterRequest register_request = 1; |
126 | 171 |
127 // Unregister request. | 172 // Unregister request. |
128 optional DeviceUnregisterRequest unregister_request = 2; | 173 optional DeviceUnregisterRequest unregister_request = 2; |
129 | 174 |
130 // Data request. | 175 // Data request. |
131 optional DevicePolicyRequest policy_request = 3; | 176 optional DevicePolicyRequest policy_request = 3; |
177 | |
178 // Data request (new protocol). | |
179 optional NewDevicePolicyRequest new_policy_request = 4; | |
132 } | 180 } |
133 | 181 |
134 // Response from server to device. | 182 // Response from server to device. |
135 message DeviceManagementResponse { | 183 message DeviceManagementResponse { |
136 // Error code to client. | 184 // Error code to client. |
137 enum ErrorCode { | 185 enum ErrorCode { |
138 SUCCESS = 0; | 186 SUCCESS = 0; |
139 // Returned for register request when device management is not supported | 187 // Returned for register request when device management is not supported |
140 // for the domain. | 188 // for the domain. |
141 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; | 189 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; |
(...skipping 15 matching lines...) Expand all Loading... | |
157 optional string error_message = 2; | 205 optional string error_message = 2; |
158 | 206 |
159 // Register response | 207 // Register response |
160 optional DeviceRegisterResponse register_response = 3; | 208 optional DeviceRegisterResponse register_response = 3; |
161 | 209 |
162 // Unregister response | 210 // Unregister response |
163 optional DeviceUnregisterResponse unregister_response = 4; | 211 optional DeviceUnregisterResponse unregister_response = 4; |
164 | 212 |
165 // Policy response. | 213 // Policy response. |
166 optional DevicePolicyResponse policy_response = 5; | 214 optional DevicePolicyResponse policy_response = 5; |
215 | |
216 // Policy response (new protocol). | |
217 optional NewDevicePolicyResponse new_policy_response = 6; | |
167 } | 218 } |
OLD | NEW |