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

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

Issue 6880031: Merge server-side changes of the cloud policy protocol (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 8 months 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
OLDNEW
1 // Copyright (c) 2011 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
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Request from the DMAgent on the device to the DMServer. This is 213 // Request from the DMAgent on the device to the DMServer. This is
214 // container for all requests from device to server. The overall HTTP 214 // container for all requests from device to server. The overall HTTP
215 // request MUST be in the following format: 215 // request MUST be in the following format:
216 // 216 //
217 // * HTTP method is POST 217 // * HTTP method is POST
218 // * Data mime type is application/x-protobuffer 218 // * Data mime type is application/x-protobuffer
219 // * HTTP parameters are (all required, all case sensitive): 219 // * HTTP parameters are (all required, all case sensitive):
220 // * request: MUST BE one of register/unregister/policy/ping 220 // * request: MUST BE one of register/unregister/policy/ping
221 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. 221 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS.
222 // * apptype: MUST BE Android or Chrome. 222 // * apptype: MUST BE Android or Chrome.
223 // * deviceid: MUST BE no more than 64-char in [\x20-\x7E]. 223 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E].
224 // * agent: MUST BE no more than 64-char long. 224 // * agent: MUST BE no more than 64-char long.
225 // * HTTP Authorization header MUST be in the following formats: 225 // * HTTP Authorization header MUST be in the following formats:
226 // * For register and ping requests 226 // * For register and ping requests
227 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> 227 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync>
228 // 228 //
229 // * For unregister and policy requests 229 // * For unregister and policy requests
230 // Authorization: GoogleDMToken token=<dm token from register> 230 // Authorization: GoogleDMToken token=<dm token from register>
231 // 231 //
232 // * OAuth is NOT supported yet. 232 // * OAuth is NOT supported yet.
233 message DeviceManagementRequest { 233 message DeviceManagementRequest {
234 // Register request. 234 // Register request.
235 optional DeviceRegisterRequest register_request = 1; 235 optional DeviceRegisterRequest register_request = 1;
236 236
237 // Unregister request. 237 // Unregister request.
238 optional DeviceUnregisterRequest unregister_request = 2; 238 optional DeviceUnregisterRequest unregister_request = 2;
239 239
240 // Policy request. 240 // Policy request.
241 optional DevicePolicyRequest policy_request = 3; 241 optional DevicePolicyRequest policy_request = 3;
242 } 242 }
243 243
244 // Response from server to device. 244 // Response from server to device.
245 //
246 // The server uses the following numbers as HTTP status codes
247 // to report top-level errors.
248 //
249 // 200 OK: valid response is returned to client.
250 // 400 Bad Request: invalid argument.
251 // 401 Unauthorized: invalid auth cookie or DM token.
252 // 403 Forbidden: device management is not allowed.
253 // 404 Not Found: the request URL is invalid.
254 // 491 Request Pending: the request is pending approval.
255 // 500 Internal Server Error: most likely a bug in DM server.
256 // 503 Service Unavailable: most likely a backend error.
257 // 901 Device Not Found: the device id is not found.
258 // 902 Policy Not Found: the policy is not found.
245 message DeviceManagementResponse { 259 message DeviceManagementResponse {
246 // Error code to client.
247 enum ErrorCode {
248 SUCCESS = 0;
249 // Returned for register request when device management is not supported
250 // for the domain.
251 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1;
252 // Returned when the device is not found.
253 DEVICE_NOT_FOUND = 2;
254 // Returned when passed in device management token doesn't match the token
255 // on server side.
256 DEVICE_MANAGEMENT_TOKEN_INVALID = 3;
257 // Returned when device registration is pending approval (if required).
258 ACTIVATION_PENDING = 4;
259 // Returned when the policy is not found.
260 POLICY_NOT_FOUND = 5;
261 }
262
263 // Error code for this request.
264 required ErrorCode error = 1;
265
266 // Error message. 260 // Error message.
267 optional string error_message = 2; 261 optional string error_message = 2;
268 262
269 // Register response 263 // Register response
270 optional DeviceRegisterResponse register_response = 3; 264 optional DeviceRegisterResponse register_response = 3;
271 265
272 // Unregister response 266 // Unregister response
273 optional DeviceUnregisterResponse unregister_response = 4; 267 optional DeviceUnregisterResponse unregister_response = 4;
274 268
275 // Policy response. 269 // Policy response.
276 optional DevicePolicyResponse policy_response = 5; 270 optional DevicePolicyResponse policy_response = 5;
277 } 271 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_management_service_unittest.cc ('k') | net/tools/testserver/device_management.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698