Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 23 matching lines...) Expand all Loading... | |
| 34 optional string machine_id = 3; | 34 optional string machine_id = 3; |
| 35 | 35 |
| 36 // Machine model name, such as "ZGA", "Cr-48", "Nexus One". If the | 36 // Machine model name, such as "ZGA", "Cr-48", "Nexus One". If the |
| 37 // model name is not available, client SHOULD send generic name like | 37 // model name is not available, client SHOULD send generic name like |
| 38 // "Android", or "Chrome OS". | 38 // "Android", or "Chrome OS". |
| 39 optional string machine_model = 4; | 39 optional string machine_model = 4; |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Response from server to device register request. | 42 // Response from server to device register request. |
| 43 message DeviceRegisterResponse { | 43 message DeviceRegisterResponse { |
| 44 // Device mangement token for this registration. This token MUST be | 44 // Device management token for this registration. This token MUST be |
| 45 // part of HTTP Authorization header for all future requests from | 45 // part of HTTP Authorization header for all future requests from |
| 46 // device to server. | 46 // device to server. |
| 47 required string device_management_token = 1; | 47 required string device_management_token = 1; |
| 48 | 48 |
| 49 // Device display name. By default, server generates the name in | 49 // Device display name. By default, server generates the name in |
| 50 // the format of "Machine Model - Machine Id". However, domain | 50 // the format of "Machine Model - Machine Id". However, domain |
| 51 // admin can update it using CPanel, so do NOT treat it as constant. | 51 // admin can update it using CPanel, so do NOT treat it as constant. |
| 52 optional string machine_name = 2; | 52 optional string machine_name = 2; |
| 53 } | 53 } |
| 54 | 54 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 optional int64 timestamp = 2; | 114 optional int64 timestamp = 2; |
| 115 | 115 |
| 116 // The DM token that was used by the client in the HTTP POST header | 116 // The DM token that was used by the client in the HTTP POST header |
| 117 // for authenticating the request. It is included here again so that | 117 // for authenticating the request. It is included here again so that |
| 118 // the client can verify that the response is meant for him (and not | 118 // the client can verify that the response is meant for him (and not |
| 119 // issued by a replay or man-in-the-middle attack). | 119 // issued by a replay or man-in-the-middle attack). |
| 120 optional string request_token = 3; | 120 optional string request_token = 3; |
| 121 | 121 |
| 122 // The serialized value of the actual policy protobuf. This can be | 122 // The serialized value of the actual policy protobuf. This can be |
| 123 // deserialized to an instance of, for example, ChromeSettingsProto | 123 // deserialized to an instance of, for example, ChromeSettingsProto |
| 124 // or ChromeUserSettingsProto. | 124 // or ChromeDeviceSettingsProto. |
| 125 optional bytes policy_value = 4; | 125 optional bytes policy_value = 4; |
| 126 | 126 |
| 127 // The device display name assigned by the server. It is only | 127 // The device display name assigned by the server. It is only |
| 128 // filled if the display name is available. | 128 // filled if the display name is available. |
| 129 // | 129 // |
| 130 // The display name of the machine as generated by the server or set | 130 // The display name of the machine as generated by the server or set |
| 131 // by the Administrator in the CPanel GUI. This is the same thing as | 131 // by the Administrator in the CPanel GUI. This is the same thing as |
| 132 // |machine_name| in DeviceRegisterResponse but it might have | 132 // |machine_name| in DeviceRegisterResponse but it might have |
| 133 // changed since then. | 133 // changed since then. |
| 134 optional string machine_name = 5; | 134 optional string machine_name = 5; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 156 UNMANAGED = 1; | 156 UNMANAGED = 1; |
| 157 } | 157 } |
| 158 optional AssociationState state = 9 [default = ACTIVE]; | 158 optional AssociationState state = 9 [default = ACTIVE]; |
| 159 } | 159 } |
| 160 | 160 |
| 161 message PolicyFetchResponse { | 161 message PolicyFetchResponse { |
| 162 // Since a single policy request may ask for multiple policies, we | 162 // Since a single policy request may ask for multiple policies, we |
| 163 // provide separate error code for each individual policy fetch. | 163 // provide separate error code for each individual policy fetch. |
| 164 | 164 |
| 165 // We will use standard HTTP Status Code as error code. | 165 // We will use standard HTTP Status Code as error code. |
| 166 optional int32 error_code = 1; | 166 optional int32 error_code = 1; |
| 167 | 167 |
| 168 // Human readable error message for customer support purpose. | 168 // Human readable error message for customer support purpose. |
| 169 optional string error_message = 2; | 169 optional string error_message = 2; |
| 170 | 170 |
| 171 // This is a serialized |PolicyData| protobuf (defined above). | 171 // This is a serialized |PolicyData| protobuf (defined above). |
| 172 optional bytes policy_data = 3; | 172 optional bytes policy_data = 3; |
| 173 | 173 |
| 174 // Signature of the policy data above. | 174 // Signature of the policy data above. |
| 175 optional bytes policy_data_signature = 4; | 175 optional bytes policy_data_signature = 4; |
| 176 | 176 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 198 // request multiple policies for better performance. | 198 // request multiple policies for better performance. |
| 199 repeated PolicyFetchRequest request = 3; | 199 repeated PolicyFetchRequest request = 3; |
| 200 } | 200 } |
| 201 | 201 |
| 202 // Response from server to device for reading policies. | 202 // Response from server to device for reading policies. |
| 203 message DevicePolicyResponse { | 203 message DevicePolicyResponse { |
| 204 // The policy fetch response. | 204 // The policy fetch response. |
| 205 repeated PolicyFetchResponse response = 3; | 205 repeated PolicyFetchResponse response = 3; |
| 206 } | 206 } |
| 207 | 207 |
| 208 // Request from device to server to determine whether the device is eligible | |
| 209 // for enterprise enrollment. Unlike the other requests, this request is not | |
| 210 // authenticated. | |
| 211 message DeviceAutoEnrollmentRequest { | |
| 212 // SHA-256 hash of the device's serial number, mod 2^|modulus|. | |
| 213 // Only the lower |modulus| bits are valid, and the size in bytes is | |
| 214 // ceil(modulus/8). The first byte has the highest order bits, and the last | |
| 215 // byte has the lower bits. | |
| 216 required bytes hash = 1; | |
| 217 | |
| 218 // Exponent of the power-of-2 modulus. Indicates the number of valid bits in | |
| 219 // |hash|, up to 256. | |
| 220 required int32 modulus = 2; | |
| 221 } | |
| 222 | |
| 223 // Response from server to auto-enrollment detection request. | |
| 224 message DeviceAutoEnrollmentResponse { | |
| 225 // If this field is present, all the other fields are empty and the client | |
| 226 // should send a new DeviceAutoEnrollmentRequest with a new |hash| computed | |
| 227 // using this new |modulus|. If this field is empty, the client's request | |
| 228 // was accepted. | |
| 229 optional int32 modulus = 1; | |
| 230 | |
| 231 // List of hashes in the client's hash bucket. If the client's hash matches | |
| 232 // any in this list, the client device should do enterprise enrollment. | |
| 233 // If it matches none, enrollment should be optional. | |
| 234 // Each entry has exactly 256 bits (32 bytes). | |
| 235 // This field is only valid if the |modulus| field is not set. | |
| 236 repeated bytes hashes = 2; | |
| 237 } | |
| 238 | |
| 208 // Request from the DMAgent on the device to the DMServer. This is | 239 // Request from the DMAgent on the device to the DMServer. This is |
| 209 // container for all requests from device to server. The overall HTTP | 240 // container for all requests from device to server. The overall HTTP |
| 210 // request MUST be in the following format: | 241 // request MUST be in the following format: |
| 211 // | 242 // |
| 212 // * HTTP method is POST | 243 // * HTTP method is POST |
| 213 // * Data mime type is application/x-protobuffer | 244 // * Data mime type is application/x-protobuffer |
| 214 // * HTTP parameters are (all required, all case sensitive): | 245 // * HTTP parameters are (all required, all case sensitive): |
| 215 // * request: MUST BE one of register/unregister/policy/ping | 246 // * request: MUST BE one of register/unregister/policy/ping/autoenrollment |
| 216 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. | 247 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. |
| 217 // * apptype: MUST BE Android or Chrome. | 248 // * apptype: MUST BE Android or Chrome. |
| 218 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. | 249 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. |
| 219 // * agent: MUST BE no more than 64-char long. | 250 // * agent: MUST BE no more than 64-char long. |
| 220 // * HTTP Authorization header MUST be in the following formats: | 251 // * HTTP Authorization header MUST be in the following formats: |
| 221 // * For register and ping requests | 252 // * For register and ping requests |
| 222 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> | 253 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> |
| 223 // | 254 // |
| 224 // * For unregister and policy requests | 255 // * For unregister and policy requests |
| 225 // Authorization: GoogleDMToken token=<dm token from register> | 256 // Authorization: GoogleDMToken token=<dm token from register> |
| 226 // | 257 // |
| 258 // * For autoenrollment requests the Authorization header isn't used. | |
| 259 // | |
| 227 // * OAuth is NOT supported yet. | 260 // * OAuth is NOT supported yet. |
| 228 message DeviceManagementRequest { | 261 message DeviceManagementRequest { |
| 229 // Register request. | 262 // Register request. |
| 230 optional DeviceRegisterRequest register_request = 1; | 263 optional DeviceRegisterRequest register_request = 1; |
| 231 | 264 |
| 232 // Unregister request. | 265 // Unregister request. |
| 233 optional DeviceUnregisterRequest unregister_request = 2; | 266 optional DeviceUnregisterRequest unregister_request = 2; |
| 234 | 267 |
| 235 // Policy request. | 268 // Policy request. |
| 236 optional DevicePolicyRequest policy_request = 3; | 269 optional DevicePolicyRequest policy_request = 3; |
| 270 | |
| 271 // Update status. | |
| 272 //optional DeviceStatusReportRequest device_status_report_request = 4; | |
| 273 //optional SessionStatusReportRequest session_status_report_request = 5; | |
|
Joao da Silva
2011/11/16 14:36:06
These comments are placeholders for the field IDs
| |
| 274 | |
| 275 // Auto-enrollment detection. | |
| 276 optional DeviceAutoEnrollmentRequest device_auto_enrollment_request = 6; | |
| 237 } | 277 } |
| 238 | 278 |
| 239 // Response from server to device. | 279 // Response from server to device. |
| 240 // | 280 // |
| 241 // The server uses the following numbers as HTTP status codes | 281 // The server uses the following numbers as HTTP status codes |
| 242 // to report top-level errors. | 282 // to report top-level errors. |
| 243 // | 283 // |
| 244 // 200 OK: valid response is returned to client. | 284 // 200 OK: valid response is returned to client. |
| 245 // 400 Bad Request: invalid argument. | 285 // 400 Bad Request: invalid argument. |
| 246 // 401 Unauthorized: invalid auth cookie or DM token. | 286 // 401 Unauthorized: invalid auth cookie or DM token. |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 257 optional string error_message = 2; | 297 optional string error_message = 2; |
| 258 | 298 |
| 259 // Register response | 299 // Register response |
| 260 optional DeviceRegisterResponse register_response = 3; | 300 optional DeviceRegisterResponse register_response = 3; |
| 261 | 301 |
| 262 // Unregister response | 302 // Unregister response |
| 263 optional DeviceUnregisterResponse unregister_response = 4; | 303 optional DeviceUnregisterResponse unregister_response = 4; |
| 264 | 304 |
| 265 // Policy response. | 305 // Policy response. |
| 266 optional DevicePolicyResponse policy_response = 5; | 306 optional DevicePolicyResponse policy_response = 5; |
| 307 | |
| 308 // Device status report response. | |
| 309 //optional DeviceStatusReportResponse device_status_report_response = 6; | |
| 310 | |
| 311 // Session status report response. | |
| 312 //optional SessionStatusReportResponse session_status_report_response = 7; | |
|
Joao da Silva
2011/11/16 14:36:06
These comments are placeholders for the field IDs
| |
| 313 | |
| 314 // Auto-enrollment detection response. | |
| 315 optional DeviceAutoEnrollmentResponse device_auto_enrollment_response = 8; | |
| 267 } | 316 } |
| OLD | NEW |