| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 // the certificate provided must be DER-encoded and may be supplied in binary | 1179 // the certificate provided must be DER-encoded and may be supplied in binary |
| 1180 // or printable (Base64) encoding. If the certificate is provided in Base64 | 1180 // or printable (Base64) encoding. If the certificate is provided in Base64 |
| 1181 // encoding, it must be bounded at the beginning by | 1181 // encoding, it must be bounded at the beginning by |
| 1182 // -----BEGIN CERTIFICATE-----, and must be bounded at the end by | 1182 // -----BEGIN CERTIFICATE-----, and must be bounded at the end by |
| 1183 // -----END CERTIFICATE-----. | 1183 // -----END CERTIFICATE-----. |
| 1184 optional bytes device_certificate = 2; | 1184 optional bytes device_certificate = 2; |
| 1185 // regular device registration request | 1185 // regular device registration request |
| 1186 optional DeviceRegisterRequest device_register_request = 3; | 1186 optional DeviceRegisterRequest device_register_request = 3; |
| 1187 } | 1187 } |
| 1188 | 1188 |
| 1189 // Gets an enrollment token to a managed Google Play account for using it with |
| 1190 // Active Directory. Sent when a new user logs in with Active Directory and |
| 1191 // opens Play Store for the first time. |
| 1192 message ActiveDirectoryEnrollPlayUserRequest {} |
| 1193 |
| 1194 // The result when a new user logs in to Play Store with Active Directory. |
| 1195 // 903 Arc Disabled HTTP error code is returned if the reason of the failure is |
| 1196 // that ARC is not enabled for the domain. |
| 1197 // 403 Forbidden HTTP error code is returned if the device can't get Managed |
| 1198 // Google Play accounts. |
| 1199 message ActiveDirectoryEnrollPlayUserResponse { |
| 1200 // The enrollment token which can be used to fetch a Managed Google Play |
| 1201 // account. |
| 1202 optional string enrollment_token = 1; |
| 1203 // The user id which identifies the user enrolled by this token. This user id |
| 1204 // is opaque to the client and is only used in the ActiveDirectoryPlayActivity |
| 1205 // requests. |
| 1206 optional string user_id = 2; |
| 1207 } |
| 1208 |
| 1209 // Reports that a managed Google Play account is used. This makes the garbage |
| 1210 // collection of accounts possible by reporting the ones which are still in use. |
| 1211 message ActiveDirectoryPlayActivityRequest { |
| 1212 // The user id received in ActiveDirectoryEnrollPlayUserResponse which |
| 1213 // identifies the user. |
| 1214 optional string user_id = 1; |
| 1215 } |
| 1216 |
| 1217 // Response to the Play account activity request. |
| 1218 message ActiveDirectoryPlayActivityResponse {} |
| 1219 |
| 1189 // Request from the DMAgent on the device to the DMServer. This is | 1220 // Request from the DMAgent on the device to the DMServer. This is |
| 1190 // container for all requests from device to server. The overall HTTP | 1221 // container for all requests from device to server. The overall HTTP |
| 1191 // request MUST be in the following format: | 1222 // request MUST be in the following format: |
| 1192 // | 1223 // |
| 1193 // * HTTP method is POST | 1224 // * HTTP method is POST |
| 1194 // * Data mime type is application/x-protobuffer | 1225 // * Data mime type is application/x-protobuffer |
| 1195 // * See GoogleContentTypeEnum.java | 1226 // * See GoogleContentTypeEnum.java |
| 1196 // * HTTP parameters are (all required, all case sensitive): | 1227 // * HTTP parameters are (all required, all case sensitive): |
| 1197 // * request: MUST BE one of | 1228 // * request: MUST BE one of |
| 1198 // * api_authorization | 1229 // * api_authorization |
| 1199 // * cert_upload | 1230 // * cert_upload |
| 1200 // * check_device_pairing | 1231 // * check_device_pairing |
| 1201 // * device_pairing | 1232 // * device_pairing |
| 1202 // * device_state_retrieval | 1233 // * device_state_retrieval |
| 1203 // * enterprise_check | 1234 // * enterprise_check |
| 1204 // * ping | 1235 // * ping |
| 1205 // * policy | 1236 // * policy |
| 1206 // * register | 1237 // * register |
| 1207 // * status | 1238 // * status |
| 1208 // * unregister | 1239 // * unregister |
| 1209 // * remote_commands | 1240 // * remote_commands |
| 1210 // * attribute_update_permission | 1241 // * attribute_update_permission |
| 1211 // * attribute_update | 1242 // * attribute_update |
| 1212 // * gcm_id_update | 1243 // * gcm_id_update |
| 1213 // * check_android_management | 1244 // * check_android_management |
| 1214 // * certificate_based_register | 1245 // * certificate_based_register |
| 1246 // * active_directory_enroll_play_user |
| 1247 // * active_directory_play_activity |
| 1215 // | 1248 // |
| 1216 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. | 1249 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. |
| 1217 // * apptype: MUST BE Android or Chrome. | 1250 // * apptype: MUST BE Android or Chrome. |
| 1218 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. | 1251 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. |
| 1219 // * agent: MUST BE no more than 64-char long. | 1252 // * agent: MUST BE no more than 64-char long. |
| 1220 // * HTTP Authorization header MUST be in the following formats: | 1253 // * HTTP Authorization header MUST be in the following formats: |
| 1221 // * For register, ping and check_android_management requests | 1254 // * For register, ping and check_android_management requests |
| 1222 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> | 1255 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> |
| 1223 // | 1256 // |
| 1224 // * For unregister, policy, status, cert_upload, remote commands requests, | 1257 // * For unregister, policy, status, cert_upload, remote_commands, |
| 1225 // and gcm id update requests | 1258 // gcm_id_update, active_directory_enroll_play_user and |
| 1259 // active_directory_play_activity requests |
| 1226 // Authorization: GoogleDMToken token=<dm token from register> | 1260 // Authorization: GoogleDMToken token=<dm token from register> |
| 1227 // | 1261 // |
| 1228 // * The Authorization header isn't used for enterprise_check or for | 1262 // * The Authorization header isn't used for enterprise_check or for |
| 1229 // certificate_based_register requests, nor for register requests | 1263 // certificate_based_register requests, nor for register requests |
| 1230 // using OAuth. In the latter case, the OAuth token is passed in the | 1264 // using OAuth. In the latter case, the OAuth token is passed in the |
| 1231 // "oauth" parameter. | 1265 // "oauth" parameter. |
| 1232 // | 1266 // |
| 1233 // DeviceManagementRequest should only contain one request which matches the | 1267 // DeviceManagementRequest should only contain one request which matches the |
| 1234 // HTTP query parameter - request, as listed below. Other requests within the | 1268 // HTTP query parameter - request, as listed below. Other requests within the |
| 1235 // container will be ignored. | 1269 // container will be ignored. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 // Update the GCM id to device_id mapping. | 1333 // Update the GCM id to device_id mapping. |
| 1300 optional GcmIdUpdateRequest gcm_id_update_request = 16; | 1334 optional GcmIdUpdateRequest gcm_id_update_request = 16; |
| 1301 | 1335 |
| 1302 // Check if user is a managed Android-for-Work user with DPC enforcement. | 1336 // Check if user is a managed Android-for-Work user with DPC enforcement. |
| 1303 optional CheckAndroidManagementRequest check_android_management_request = 17; | 1337 optional CheckAndroidManagementRequest check_android_management_request = 17; |
| 1304 | 1338 |
| 1305 // Request to register with a registration certificate. | 1339 // Request to register with a registration certificate. |
| 1306 optional CertificateBasedDeviceRegisterRequest | 1340 optional CertificateBasedDeviceRegisterRequest |
| 1307 certificate_based_register_request = 18; | 1341 certificate_based_register_request = 18; |
| 1308 | 1342 |
| 1343 // Gets an enrollment token to a Managed Google Play Account for using it with |
| 1344 // Active Directory. |
| 1345 optional ActiveDirectoryEnrollPlayUserRequest |
| 1346 active_directory_enroll_play_user_request = 19; |
| 1347 |
| 1348 // Reports that a Play account is used. |
| 1349 optional ActiveDirectoryPlayActivityRequest |
| 1350 active_directory_play_activity_request = 20; |
| 1309 } | 1351 } |
| 1310 | 1352 |
| 1311 // Response from server to device. | 1353 // Response from server to device. |
| 1312 // | 1354 // |
| 1313 // For release clients, DMServer returns errors using HTTP Status Code, so that | 1355 // For release clients, DMServer returns errors using HTTP Status Code, so that |
| 1314 // clients only need to check one place for all error codes. It is also easier | 1356 // clients only need to check one place for all error codes. It is also easier |
| 1315 // to perform log analysis and customer support since HTTP Status Code is easily | 1357 // to perform log analysis and customer support since HTTP Status Code is easily |
| 1316 // visible in the logs. | 1358 // visible in the logs. |
| 1317 // | 1359 // |
| 1318 // The following list defines the error code returned by this API: | 1360 // The following list defines the error code returned by this API: |
| 1319 // | 1361 // |
| 1320 // 200 OK: valid response is returned to client. | 1362 // 200 OK: valid response is returned to client. |
| 1321 // 400 Bad Request: invalid argument. | 1363 // 400 Bad Request: invalid argument. |
| 1322 // 401 Unauthorized: invalid auth cookie or DM token. | 1364 // 401 Unauthorized: invalid auth cookie or DM token. |
| 1323 // 403 Forbidden: device management is not allowed. | 1365 // 403 Forbidden: device management is not allowed. |
| 1324 // 404 Not Found: the request URL is invalid. | 1366 // 404 Not Found: the request URL is invalid. |
| 1325 // 410 Device Not Found: the device id is not found. | 1367 // 410 Device Not Found: the device id is not found. |
| 1326 // 491 Request Pending: the request is pending approval. | 1368 // 491 Request Pending: the request is pending approval. |
| 1327 // 500 Internal Server Error: most likely a bug in DM server. | 1369 // 500 Internal Server Error: most likely a bug in DM server. |
| 1328 // 503 Service Unavailable: most likely a backend error. | 1370 // 503 Service Unavailable: most likely a backend error. |
| 1329 // 902 Policy Not Found: the policy is not found. | 1371 // 902 Policy Not Found: the policy is not found. |
| 1372 // 903 Arc Disabled: ARC is not enabled on the domain. |
| 1330 message DeviceManagementResponse { | 1373 message DeviceManagementResponse { |
| 1331 // TODO(hong): move error handling to HTTP level. | 1374 // TODO(hong): move error handling to HTTP level. |
| 1332 // Error code to client. | 1375 // Error code to client. |
| 1333 enum ErrorCode { | 1376 enum ErrorCode { |
| 1334 SUCCESS = 0; | 1377 SUCCESS = 0; |
| 1335 // Returned for register request when device management is not supported | 1378 // Returned for register request when device management is not supported |
| 1336 // for the domain. | 1379 // for the domain. |
| 1337 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; | 1380 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; |
| 1338 // Returned when the device is not found. | 1381 // Returned when the device is not found. |
| 1339 DEVICE_NOT_FOUND = 2; | 1382 DEVICE_NOT_FOUND = 2; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 | 1445 |
| 1403 // Response to update device attribute. | 1446 // Response to update device attribute. |
| 1404 optional DeviceAttributeUpdateResponse device_attribute_update_response = 16; | 1447 optional DeviceAttributeUpdateResponse device_attribute_update_response = 16; |
| 1405 | 1448 |
| 1406 // Response to GCM id update request. | 1449 // Response to GCM id update request. |
| 1407 optional GcmIdUpdateResponse gcm_id_update_response = 17; | 1450 optional GcmIdUpdateResponse gcm_id_update_response = 17; |
| 1408 | 1451 |
| 1409 // Response to check Android management request. | 1452 // Response to check Android management request. |
| 1410 optional CheckAndroidManagementResponse | 1453 optional CheckAndroidManagementResponse |
| 1411 check_android_management_response = 18; | 1454 check_android_management_response = 18; |
| 1455 |
| 1456 // Response to an Active Directory Play user enrollment request. |
| 1457 optional ActiveDirectoryEnrollPlayUserResponse |
| 1458 active_directory_enroll_play_user_response = 19; |
| 1459 |
| 1460 // Response to a Play activity request. |
| 1461 optional ActiveDirectoryPlayActivityResponse |
| 1462 active_directory_play_activity_response = 20; |
| 1412 } | 1463 } |
| OLD | NEW |