Chromium Code Reviews| 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 |
| 11 // Data along with a cryptographic signature verifying their authenticity. | 11 // Data along with a cryptographic signature verifying their authenticity. |
| 12 message SignedData { | 12 message SignedData { |
| 13 // The data to be signed. | 13 // The data to be signed. |
| 14 optional bytes data = 1; | 14 optional bytes data = 1; |
| 15 // The signature of the data field. | 15 // The signature of the data field. |
| 16 optional bytes signature = 2; | 16 optional bytes signature = 2; |
| 17 // How many bytes were added to the end of original data before signature | 17 // How many bytes were added to the end of original data before signature |
| 18 // (e.g. a nonce to avoid proxy attacks of the signing service). | 18 // (e.g. a nonce to avoid proxy attacks of the signing service). |
| 19 optional int32 extra_data_bytes = 3; | 19 optional int32 extra_data_bytes = 3; |
| 20 } | 20 } |
| 21 | 21 |
| 22 // Request from device to server to register device. | 22 // Request from device to server to register a device, user or browser. |
| 23 message DeviceRegisterRequest { | 23 message DeviceRegisterRequest { |
| 24 // Reregister device without erasing server state. It can be used | 24 // Reregister device without erasing server state. It can be used |
| 25 // to refresh dmtoken etc. Client MUST set this value to true if it | 25 // to refresh dmtoken etc. Client MUST set this value to true if it |
| 26 // reuses an existing device id. | 26 // reuses an existing device id. |
| 27 optional bool reregister = 1; | 27 optional bool reregister = 1; |
| 28 | 28 |
| 29 // Device register type. This field does not exist for TT release. | 29 // Register type. This field does not exist for TT release. |
| 30 // When a client requests for policies, server should verify the | 30 // When a client requests for policies, server should verify the |
| 31 // client has been registered properly. For example, a client must | 31 // client has been registered properly. For example, a client must |
| 32 // register with type DEVICE in order to retrieve device policies. | 32 // register with type DEVICE in order to retrieve device policies. |
| 33 enum Type { | 33 enum Type { |
| 34 TT = 0; // Register for TT release. | 34 TT = 0; // Register for TT release. |
| 35 USER = 1; // Register for Chrome OS user polices. | 35 USER = 1; // Register for Chrome OS user polices. |
| 36 DEVICE = 2; // Register for Chrome OS device policies. | 36 DEVICE = 2; // Register for Chrome OS device policies. |
| 37 BROWSER = 3; // Register for desktop Chrome browser user policies. | 37 BROWSER = 3; // Register for desktop Chrome browser user policies. |
| 38 ANDROID_BROWSER = 4; // Register for Android Chrome browser user policies. | 38 ANDROID_BROWSER = 4; // Register for Android Chrome browser user policies. |
| 39 IOS_BROWSER = 5; // Register for iOS Chrome browser user policies. | 39 IOS_BROWSER = 5; // Register for iOS Chrome browser user policies. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 // registration is finished. | 118 // registration is finished. |
| 119 enum DeviceMode { | 119 enum DeviceMode { |
| 120 // In ENTERPRISE mode the device has no local owner and device settings are | 120 // In ENTERPRISE mode the device has no local owner and device settings are |
| 121 // controlled through the cloud policy infrastructure. Auto-enrollment is | 121 // controlled through the cloud policy infrastructure. Auto-enrollment is |
| 122 // supported in that mode. | 122 // supported in that mode. |
| 123 ENTERPRISE = 0; | 123 ENTERPRISE = 0; |
| 124 // Devices in RETAIL mode also have no local owner and get their device | 124 // Devices in RETAIL mode also have no local owner and get their device |
| 125 // settings from the cloud, but additionally this mode enables the demo | 125 // settings from the cloud, but additionally this mode enables the demo |
| 126 // account on the device. | 126 // account on the device. |
| 127 RETAIL = 1; | 127 RETAIL = 1; |
| 128 // Devices in CHROME_AD mode are in enterprises with AD. Device settings | |
| 129 // are controlled through the AD policy infrastructure. | |
| 130 CHROME_AD = 2; | |
| 128 } | 131 } |
| 129 optional DeviceMode enrollment_type = 3 [default = ENTERPRISE]; | 132 optional DeviceMode enrollment_type = 3 [default = ENTERPRISE]; |
| 133 | |
| 134 // An opaque configuration string for devices that require it. CHROME_AD | |
| 135 // devices, for example, may use this string for AD discovery. Must be at | |
| 136 // most a few kBytes. | |
| 137 optional string configuration_seed = 4; | |
| 130 } | 138 } |
| 131 | 139 |
| 132 // Request from device to server to unregister device. | 140 // Request from device to server to unregister device. |
| 133 // GoogleDMToken MUST be in HTTP Authorization header. | 141 // GoogleDMToken MUST be in HTTP Authorization header. |
| 134 message DeviceUnregisterRequest { | 142 message DeviceUnregisterRequest { |
| 135 } | 143 } |
| 136 | 144 |
| 137 // Response from server to device for unregister request. | 145 // Response from server to device for unregister request. |
| 138 message DeviceUnregisterResponse { | 146 message DeviceUnregisterResponse { |
| 139 } | 147 } |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 156 repeated string auth_scope = 1; | 164 repeated string auth_scope = 1; |
| 157 | 165 |
| 158 // OAuth2 client ID to which the returned authorization code is bound. | 166 // OAuth2 client ID to which the returned authorization code is bound. |
| 159 optional string oauth2_client_id = 2; | 167 optional string oauth2_client_id = 2; |
| 160 } | 168 } |
| 161 | 169 |
| 162 // Response from server to API access request. | 170 // Response from server to API access request. |
| 163 message DeviceServiceApiAccessResponse { | 171 message DeviceServiceApiAccessResponse { |
| 164 // The OAuth2 authorization code for the requested scope(s). | 172 // The OAuth2 authorization code for the requested scope(s). |
| 165 // This can be exchanged for a refresh token. | 173 // This can be exchanged for a refresh token. |
| 166 // | |
| 167 // The server may send a successful response but not set this field or set an | |
| 168 // empty string to reject the auth code request and instruct the client to | |
| 169 // skip robot account auth setup. | |
| 170 optional string auth_code = 1; | 174 optional string auth_code = 1; |
| 171 } | 175 } |
| 172 | 176 |
| 173 message PolicyFetchRequest { | 177 message PolicyFetchRequest { |
| 174 // This is the policy type, which maps to D3 policy type internally. | 178 // This is the policy type, which maps to D3 policy type internally. |
| 175 // By convention, we use "/" as separator to create policy namespace. | 179 // By convention, we use "/" as separator to create policy namespace. |
| 176 // The policy type names are case insensitive. | 180 // The policy type names are case insensitive. |
| 177 // | 181 // |
| 178 // Possible values for Chrome OS are: | 182 // Possible values for Chrome OS are: |
| 179 // google/chromeos/device => ChromeDeviceSettingsProto | 183 // google/chromeos/device => ChromeDeviceSettingsProto |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 optional bytes invalidation_payload = 8; | 232 optional bytes invalidation_payload = 8; |
| 229 | 233 |
| 230 // Hash string for the chrome policy verification public key which is embedded | 234 // Hash string for the chrome policy verification public key which is embedded |
| 231 // into Chrome binary. Matching private key will be used by the server | 235 // into Chrome binary. Matching private key will be used by the server |
| 232 // to sign per-domain policy keys during key rotation. If server does not | 236 // to sign per-domain policy keys during key rotation. If server does not |
| 233 // have the key which matches this hash string, that could indicate malicious | 237 // have the key which matches this hash string, that could indicate malicious |
| 234 // or out-of-date Chrome client. | 238 // or out-of-date Chrome client. |
| 235 optional string verification_key_hash = 9; | 239 optional string verification_key_hash = 9; |
| 236 } | 240 } |
| 237 | 241 |
| 242 // This message contains the information which is signed by the verification | |
| 243 // key during policy key rotation. It is included in serialized form in | |
| 244 // PolicyFetchResponse below. A signature of the serialized form is included | |
| 245 // in the new_public_key_verification_data_signature field. For backward | |
| 246 // compatibility reasons, a signature over just {new_public_key, domain} fields | |
| 247 // is included in new_public_key_verification_signature_DEPRECATED field. | |
| 248 message PublicKeyVerificationData { | |
| 249 // The new public policy key after a key rotation. | |
| 250 optional bytes new_public_key = 1; | |
| 251 | |
| 252 // The domain of the device/user. | |
| 253 optional string domain = 2; | |
| 254 | |
| 255 // The version number of the new_public_key. This must be monotonically | |
| 256 // increasing (within a domain). | |
| 257 optional int32 new_public_key_version = 3; | |
| 258 } | |
| 259 | |
| 238 // This message customizes how the device behaves when it is disabled by its | 260 // This message customizes how the device behaves when it is disabled by its |
| 239 // owner. The message will be sent as part of the DeviceState fetched during | 261 // owner. The message will be sent as part of the DeviceState fetched during |
| 240 // normal operation and as part of the DeviceStateRetrievalResponse fetched when | 262 // normal operation and as part of the DeviceStateRetrievalResponse fetched when |
| 241 // the device is wiped/reinstalled. | 263 // the device is wiped/reinstalled. |
| 242 message DisabledState { | 264 message DisabledState { |
| 243 // A message to the finder/thief that should be shown on the screen. | 265 // A message to the finder/thief that should be shown on the screen. |
| 244 optional string message = 1; | 266 optional string message = 1; |
| 245 } | 267 } |
| 246 | 268 |
| 247 message DeviceState { | 269 message DeviceState { |
| 248 // Modes of operation that the device can be in. | 270 // Modes of operation that the device can be in. |
| 249 enum DeviceMode { | 271 enum DeviceMode { |
| 250 // The device is operating normally. Sessions can be started and the device | 272 // The device is operating normally. Sessions can be started and the device |
| 251 // can be used. | 273 // can be used. |
| 252 DEVICE_MODE_NORMAL = 0; | 274 DEVICE_MODE_NORMAL = 0; |
| 253 // The device has been disabled by its owner. The device will show a warning | 275 // The device has been disabled by its owner. The device will show a warning |
| 254 // screen and will not allow any sessions to be started. | 276 // screen and will not allow any sessions to be started. |
| 255 DEVICE_MODE_DISABLED = 1; | 277 DEVICE_MODE_DISABLED = 1; |
| 256 } | 278 } |
| 257 // The mode of operation that the device should be in. | 279 // The mode of operation that the device should be in. |
| 258 optional DeviceMode device_mode = 1 [default = DEVICE_MODE_NORMAL]; | 280 optional DeviceMode device_mode = 1 [default = DEVICE_MODE_NORMAL]; |
| 259 | 281 |
| 260 // State that is relevant only when the |device_mode| is | 282 // State that is relevant only when the |device_mode| is |
| 261 // |DEVICE_MODE_DISABLED|. | 283 // |DEVICE_MODE_DISABLED|. |
| 262 optional DisabledState disabled_state = 2; | 284 optional DisabledState disabled_state = 2; |
| 263 } | 285 } |
| 264 | 286 |
| 265 // This message is included in serialized form in PolicyFetchResponse | 287 // This message is included in serialized form in PolicyFetchResponse below. It |
| 266 // below. It may also be signed, with the signature being created for | 288 // may also be signed, with the signature being created for the serialized form. |
| 267 // the serialized form. | |
| 268 message PolicyData { | 289 message PolicyData { |
| 269 // See PolicyFetchRequest.policy_type. | 290 // See PolicyFetchRequest.policy_type. |
| 270 optional string policy_type = 1; | 291 optional string policy_type = 1; |
| 271 | 292 |
| 272 // [timestamp] is milliseconds since Epoch in UTC timezone. It is | 293 // [timestamp] is milliseconds since Epoch in UTC timezone. It is |
| 273 // included here so that the time at which the server issued this | 294 // included here so that the time at which the server issued this |
| 274 // response cannot be faked (as protection against replay attacks). | 295 // response cannot be faked (as protection against replay attacks). |
| 275 // It is the timestamp generated by DMServer, NOT the time admin | 296 // It is the timestamp generated by DMServer, NOT the time admin |
| 276 // last updated the policy or anything like that. | 297 // last updated the policy or anything like that. |
| 277 optional int64 timestamp = 2; | 298 optional int64 timestamp = 2; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 342 // id used to register for invalidations to this policy. | 363 // id used to register for invalidations to this policy. |
| 343 optional int32 invalidation_source = 13; | 364 optional int32 invalidation_source = 13; |
| 344 | 365 |
| 345 // The name which uniquely identifies this policy within the invalidation | 366 // The name which uniquely identifies this policy within the invalidation |
| 346 // service object source. This value is combined with invalidation_source to | 367 // service object source. This value is combined with invalidation_source to |
| 347 // form the object id used to register for invalidations to this policy. | 368 // form the object id used to register for invalidations to this policy. |
| 348 optional bytes invalidation_name = 14; | 369 optional bytes invalidation_name = 14; |
| 349 | 370 |
| 350 // Server-provided identifier of the fetched policy. This is to be used | 371 // Server-provided identifier of the fetched policy. This is to be used |
| 351 // by the client when requesting Policy Posture assertion through an API | 372 // by the client when requesting Policy Posture assertion through an API |
| 352 // call or SAML flow. | 373 // call or SAML flow. For details, see http://go/chrome-nac-server-design. |
| 353 optional string policy_token = 15; | 374 optional string policy_token = 15; |
| 354 | 375 |
| 355 // Indicates the management mode of the device. Note that old policies do not | 376 // Indicates the management mode of the device. Note that old policies do not |
| 356 // have this field. If this field is not set but request_token is set, assume | 377 // have this field. If this field is not set but request_token is set, assume |
| 357 // the management mode is ENTERPRISE_MANAGED. If both this field and | 378 // the management mode is ENTERPRISE_MANAGED. If both this field and |
| 358 // request_token are not set, assume the management mode is LOCAL_OWNER. | 379 // request_token are not set, assume the management mode is LOCAL_OWNER. |
| 359 enum ManagementMode { | 380 enum ManagementMode { |
| 360 // The device is owned locally. The policies are set by the local owner of | 381 // The device is owned locally. The policies are set by the local owner of |
| 361 // the device. | 382 // the device. |
| 362 LOCAL_OWNER = 0; | 383 LOCAL_OWNER = 0; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 427 | 448 |
| 428 // If the public key has been rotated on the server, the new public | 449 // If the public key has been rotated on the server, the new public |
| 429 // key is sent here. It is already used for |policy_data_signature| | 450 // key is sent here. It is already used for |policy_data_signature| |
| 430 // above, whereas |new_public_key_signature| is created using the | 451 // above, whereas |new_public_key_signature| is created using the |
| 431 // old key (so the client can trust the new key). If this is the | 452 // old key (so the client can trust the new key). If this is the |
| 432 // first time when the client requests policies (so it doesn't have | 453 // first time when the client requests policies (so it doesn't have |
| 433 // on old public key), then |new_public_key_signature| is empty. | 454 // on old public key), then |new_public_key_signature| is empty. |
| 434 optional bytes new_public_key = 5; | 455 optional bytes new_public_key = 5; |
| 435 optional bytes new_public_key_signature = 6; | 456 optional bytes new_public_key_signature = 6; |
| 436 | 457 |
| 458 // DEPRECATED ON THE SERVER: Exists only to support older clients. This | |
| 459 // signature is similar to new_public_key_verification_data_signature, but is | |
| 460 // computed over PublicKeyVerificationData proto with version field unset. In | |
| 461 // other words, we set the new public key value, and domain value and then | |
| 462 // produce this signature. | |
| 463 optional bytes new_public_key_verification_signature = 7; | |
| 464 | |
| 465 // This is a serialized |PublicKeyVerificationData| protobuf | |
| 466 // (defined above). See comments for |new_public_key_verification_signature| | |
| 467 // field for details on how this data is signed. | |
| 468 // Please note that |new_public_key| is also included inside this data | |
| 469 // field. Thus we have new public key signed with old version of private key | |
| 470 // (if client indicated to us that it has old key version), and | |
| 471 // new public key data signed by master verification key (if client told | |
| 472 // us that it has public verification key - see |verification_key_id| field | |
| 473 // of |PolicyFetchRequest|). In most cases, both signatures will be provided. | |
| 474 // However, client might not have old policy signing key - for example, when | |
| 475 // new profile is being set up. In this case, only verification signature | |
| 476 // is supplied. | |
| 477 // Or, client might not have verification public key (legacy Chrome build | |
| 478 // before verification key was introduced, or outdated build which has | |
| 479 // old/compromised verification key). In that case, verification signature | |
| 480 // cannot be provided. | |
| 481 // If client is missing both public keys (old signing key and verification | |
| 482 // key), then we are unable to produce any valid signature and client must | |
| 483 // drop such PolicyFetchResponse. | |
| 484 optional bytes new_public_key_verification_data = 8; | |
| 485 | |
| 437 // If new_public_key is specified, this field contains a signature | 486 // If new_public_key is specified, this field contains a signature |
| 438 // of a PolicyPublicKeyAndDomain protobuf, signed using a key only | 487 // of a PolicyPublicKeyAndDomain protobuf, signed using a key only |
| 439 // available to DMServer. The public key portion of this well-known key is | 488 // available to DMServer. The public key portion of this well-known key is |
| 440 // embedded into the Chrome binary. The hash of that embedded key is passed | 489 // embedded into the Chrome binary. The hash of that embedded key is passed |
| 441 // to DMServer as verification_key_hash field in PolicyFetchRequest. DMServer | 490 // to DMServer as verification_key_hash field in PolicyFetchRequest. DMServer |
| 442 // will pick a private key on the server which matches the hash (matches | 491 // will pick a private key on the server which matches the hash (matches |
| 443 // public key on the client). If DMServer is unable to find matching key, it | 492 // public key on the client). If DMServer is unable to find matching key, it |
| 444 // will return an error instead of policy data. | 493 // will return an error instead of policy data. |
| 445 // In case hash was not specified, DMServer will leave verification signature | 494 // In case hash was not specified, DMServer will leave verification signature |
| 446 // field empty (legacy behavior). | 495 // field empty (legacy behavior). |
| 447 // In addition to the checks between new_public_key | 496 // In addition to the checks between new_public_key |
| 448 // and new_public_key_signature described above, Chrome also verifies | 497 // and new_public_key_signature described above, Chrome also verifies |
| 449 // new_public_key with the embedded public key and | 498 // new_public_key with the embedded public key and |
| 450 // new_public_key_verification_signature. | 499 // new_public_key_verification_signature. |
| 451 optional bytes new_public_key_verification_signature = 7; | 500 optional bytes new_public_key_verification_data_signature = 9; |
|
Thiemo Nagel
2016/10/13 10:45:30
This change looks weird but I have confirmed with
| |
| 452 } | 501 } |
| 453 | 502 |
| 454 // Protobuf used to generate the new_public_key_verification_signature field. | 503 // DEPRECATED ON THE SERVER: Protobuf used to generate the deprecated |
| 504 // new_public_key_verification_signature field. | |
| 455 message PolicyPublicKeyAndDomain { | 505 message PolicyPublicKeyAndDomain { |
| 456 // The public key to sign (taken from the |new_public_key| field in | 506 // The public key to sign (taken from the |new_public_key| field in |
| 457 // PolicyFetchResponse). | 507 // PolicyFetchResponse). |
| 458 optional bytes new_public_key = 1; | 508 optional bytes new_public_key = 1; |
| 459 | 509 |
| 460 // The domain associated with this key (should match the domain portion of | 510 // The domain associated with this key (should match the domain portion of |
| 461 // the username field of the policy). | 511 // the username field of the policy). |
| 462 optional string domain = 2; | 512 optional string domain = 2; |
| 463 } | 513 } |
| 464 | 514 |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1098 // OS. | 1148 // OS. |
| 1099 // Provide user's OAuth token with your HTTP Request. | 1149 // Provide user's OAuth token with your HTTP Request. |
| 1100 message CheckAndroidManagementRequest {} | 1150 message CheckAndroidManagementRequest {} |
| 1101 | 1151 |
| 1102 // Response from server to device for check for Android-for-Work service with | 1152 // Response from server to device for check for Android-for-Work service with |
| 1103 // DPC enforcement request. | 1153 // DPC enforcement request. |
| 1104 // SC_CONFLICT HTTP code is returned if DPC enforcement is required. | 1154 // SC_CONFLICT HTTP code is returned if DPC enforcement is required. |
| 1105 message CheckAndroidManagementResponse {} | 1155 message CheckAndroidManagementResponse {} |
| 1106 | 1156 |
| 1107 // Request to register a new device (authenticated by enterprise enrollment | 1157 // Request to register a new device (authenticated by enterprise enrollment |
| 1108 // certificate). | 1158 // certificate). See http://go/zero-touch-chrome for details. |
| 1109 // The response message will be the DeviceRegisterReponse. | 1159 // The response message will be the DeviceRegisterReponse. |
| 1110 message CertificateBasedDeviceRegisterRequest { | 1160 message CertificateBasedDeviceRegisterRequest { |
| 1111 // Signed request to register with a certificate. The signed_request.data | 1161 // Signed request to register with a certificate. The signed_request.data |
| 1112 // field contains a CertificateBasedDeviceRegistrationData with a nonce | 1162 // field contains a CertificateBasedDeviceRegistrationData with a nonce |
| 1113 // (as added by the Chrome OS cryptohome client) appended. The | 1163 // (as added by the Chrome OS cryptohome client) appended. The |
| 1114 // signed_request.signature field is a signature of the data field signed | 1164 // signed_request.signature field is a signature of the data field signed |
| 1115 // with the enrollment certificate's private key. | 1165 // with the enrollment certificate's private key. |
| 1116 optional SignedData signed_request = 1; | 1166 optional SignedData signed_request = 1; |
| 1117 } | 1167 } |
| 1118 | 1168 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1158 // * remote_commands | 1208 // * remote_commands |
| 1159 // * attribute_update_permission | 1209 // * attribute_update_permission |
| 1160 // * attribute_update | 1210 // * attribute_update |
| 1161 // * gcm_id_update | 1211 // * gcm_id_update |
| 1162 // * check_android_management | 1212 // * check_android_management |
| 1163 // * certificate_based_register | 1213 // * certificate_based_register |
| 1164 // | 1214 // |
| 1165 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. | 1215 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. |
| 1166 // * apptype: MUST BE Android or Chrome. | 1216 // * apptype: MUST BE Android or Chrome. |
| 1167 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. | 1217 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. |
| 1168 // * agent: MUST BE a string of characters. | 1218 // * agent: MUST BE no more than 64-char long. |
| 1169 // * HTTP Authorization header MUST be in the following formats: | 1219 // * HTTP Authorization header MUST be in the following formats: |
| 1170 // * For register, ping and check_android_management requests | 1220 // * For register, ping and check_android_management requests |
| 1171 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> | 1221 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> |
| 1172 // | 1222 // |
| 1173 // * For unregister, policy, status, cert_upload, remote commands requests, | 1223 // * For unregister, policy, status, cert_upload, remote commands requests, |
| 1174 // and gcm id update requests | 1224 // and gcm id update requests |
| 1175 // Authorization: GoogleDMToken token=<dm token from register> | 1225 // Authorization: GoogleDMToken token=<dm token from register> |
| 1176 // | 1226 // |
| 1177 // * The Authorization header isn't used for enterprise_check or for | 1227 // * The Authorization header isn't used for enterprise_check or for |
| 1178 // certificate_based_register requests, nor for register requests | 1228 // certificate_based_register requests, nor for register requests |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1264 // | 1314 // |
| 1265 // 200 OK: valid response is returned to client. | 1315 // 200 OK: valid response is returned to client. |
| 1266 // 400 Bad Request: invalid argument. | 1316 // 400 Bad Request: invalid argument. |
| 1267 // 401 Unauthorized: invalid auth cookie or DM token. | 1317 // 401 Unauthorized: invalid auth cookie or DM token. |
| 1268 // 403 Forbidden: device management is not allowed. | 1318 // 403 Forbidden: device management is not allowed. |
| 1269 // 404 Not Found: the request URL is invalid. | 1319 // 404 Not Found: the request URL is invalid. |
| 1270 // 410 Device Not Found: the device id is not found. | 1320 // 410 Device Not Found: the device id is not found. |
| 1271 // 491 Request Pending: the request is pending approval. | 1321 // 491 Request Pending: the request is pending approval. |
| 1272 // 500 Internal Server Error: most likely a bug in DM server. | 1322 // 500 Internal Server Error: most likely a bug in DM server. |
| 1273 // 503 Service Unavailable: most likely a backend error. | 1323 // 503 Service Unavailable: most likely a backend error. |
| 1274 // 901 Device Not Found: the device id is not found. | |
| 1275 // 902 Policy Not Found: the policy is not found. | 1324 // 902 Policy Not Found: the policy is not found. |
| 1276 message DeviceManagementResponse { | 1325 message DeviceManagementResponse { |
| 1326 // TODO(hong): move error handling to HTTP level. | |
| 1327 // Error code to client. | |
| 1328 enum ErrorCode { | |
| 1329 SUCCESS = 0; | |
| 1330 // Returned for register request when device management is not supported | |
| 1331 // for the domain. | |
| 1332 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; | |
| 1333 // Returned when the device is not found. | |
| 1334 DEVICE_NOT_FOUND = 2; | |
| 1335 // Returned when passed in device management token doesn't match the token | |
| 1336 // on server side. | |
| 1337 DEVICE_MANAGEMENT_TOKEN_INVALID = 3; | |
| 1338 // Returned when device registration is pending approval (if required). | |
| 1339 ACTIVATION_PENDING = 4; | |
| 1340 // Returned when the policy is not found. | |
| 1341 POLICY_NOT_FOUND = 5; | |
| 1342 } | |
| 1343 | |
| 1344 // Error code for this reponse. | |
| 1345 // | |
| 1346 // For responses to TT clients, this field MUST be set, since it WAS | |
| 1347 // a required field. For special error code listed above, we return | |
| 1348 // 200 in HTTP Status Code and set the real error code here. | |
| 1349 // | |
| 1350 // For release clients, we plan to move all error code to HTTP | |
| 1351 // Status Code, so it is much easier for log analysis. If possible, | |
| 1352 // we plan to remove this field once Chrome OS TT phase is over. | |
| 1353 optional ErrorCode error = 1 [default = SUCCESS]; | |
| 1354 | |
| 1277 // Error message. | 1355 // Error message. |
| 1278 optional string error_message = 2; | 1356 optional string error_message = 2; |
| 1279 | 1357 |
| 1280 // Register response | 1358 // Register response |
| 1281 optional DeviceRegisterResponse register_response = 3; | 1359 optional DeviceRegisterResponse register_response = 3; |
| 1282 | 1360 |
| 1283 // Unregister response | 1361 // Unregister response |
| 1284 optional DeviceUnregisterResponse unregister_response = 4; | 1362 optional DeviceUnregisterResponse unregister_response = 4; |
| 1285 | 1363 |
| 1286 // Policy response. | 1364 // Policy response. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1320 // Response to update device attribute. | 1398 // Response to update device attribute. |
| 1321 optional DeviceAttributeUpdateResponse device_attribute_update_response = 16; | 1399 optional DeviceAttributeUpdateResponse device_attribute_update_response = 16; |
| 1322 | 1400 |
| 1323 // Response to GCM id update request. | 1401 // Response to GCM id update request. |
| 1324 optional GcmIdUpdateResponse gcm_id_update_response = 17; | 1402 optional GcmIdUpdateResponse gcm_id_update_response = 17; |
| 1325 | 1403 |
| 1326 // Response to check Android management request. | 1404 // Response to check Android management request. |
| 1327 optional CheckAndroidManagementResponse | 1405 optional CheckAndroidManagementResponse |
| 1328 check_android_management_response = 18; | 1406 check_android_management_response = 18; |
| 1329 } | 1407 } |
| OLD | NEW |