| Index: chrome/browser/policy/proto/device_management_backend.proto
|
| diff --git a/chrome/browser/policy/proto/device_management_backend.proto b/chrome/browser/policy/proto/device_management_backend.proto
|
| index 690fb87780e45b6036896a759bb9b3924621dc5e..34847f7d5f03b6a8431b3eba044592ac3a7f4936 100644
|
| --- a/chrome/browser/policy/proto/device_management_backend.proto
|
| +++ b/chrome/browser/policy/proto/device_management_backend.proto
|
| @@ -29,7 +29,7 @@ message DeviceRegisterRequest {
|
| // Chrome OS TT support once it is over.
|
| optional Type type = 2 [default = TT];
|
|
|
| - // Machine hardware id, such as MEID, Mac adress.
|
| + // Machine hardware id, such as serial number.
|
| // This field is required if register type == DEVICE.
|
| optional string machine_id = 3;
|
|
|
| @@ -97,6 +97,12 @@ message PolicyFetchRequest {
|
| // This field is unspecified if the client does not yet have a
|
| // public key.
|
| optional int32 public_key_version = 4;
|
| +
|
| + // Machine hardware id, such as serial number.
|
| + // This field is should be set only if the serial number for the device is
|
| + // missing from the server, as indicated by the valid_serial_number_missing
|
| + // field in the last policy fetch response.
|
| + optional string machine_id = 5;
|
| }
|
|
|
| // This message is included in serialized form in PolicyFetchResponse
|
| @@ -106,7 +112,7 @@ message PolicyData {
|
| // See PolicyFetchRequest.policy_type.
|
| optional string policy_type = 1;
|
|
|
| - // [timestamp] is milli seconds since Epoch in UTC timezone. It is
|
| + // [timestamp] is milliseconds since Epoch in UTC timezone. It is
|
| // included here so that the time at which the server issued this
|
| // response cannot be faked (as protection against replay attacks).
|
| // It is the timestamp generated by DMServer, NOT the time admin
|
| @@ -156,6 +162,12 @@ message PolicyData {
|
| UNMANAGED = 1;
|
| }
|
| optional AssociationState state = 9 [default = ACTIVE];
|
| +
|
| + // Indicates if the the server cannot find a valid serial number for the
|
| + // device. If this flag is set, the device should send the valid serial
|
| + // number with a device policy fetch request. Note that this only
|
| + // applies to device policy.
|
| + optional bool valid_serial_number_missing = 10;
|
| }
|
|
|
| message PolicyFetchResponse {
|
| @@ -163,7 +175,7 @@ message PolicyFetchResponse {
|
| // provide separate error code for each individual policy fetch.
|
|
|
| // We will use standard HTTP Status Code as error code.
|
| - optional int32 error_code = 1;
|
| + optional int32 error_code = 1;
|
|
|
| // Human readable error message for customer support purpose.
|
| optional string error_message = 2;
|
| @@ -205,6 +217,79 @@ message DevicePolicyResponse {
|
| repeated PolicyFetchResponse response = 3;
|
| }
|
|
|
| +message TimePeriod {
|
| + // [timestamp] is milli seconds since Epoch in UTC timezone.
|
| + optional int64 start_timestamp = 1;
|
| + optional int64 end_timestamp = 2;
|
| +}
|
| +
|
| +// This captures launch events for one app/extension or other installments.
|
| +message InstallableLaunch {
|
| + optional string install_id = 1;
|
| +
|
| + // Time duration where this report covers. These are required
|
| + // and the record will be ignored if not set.
|
| + optional TimePeriod duration = 2;
|
| +
|
| + // Client will send at most 50 timestamps to DM. All the rest
|
| + // launch activities will be summed into the total count.
|
| + // We will distribute the count evenly among the time span when
|
| + // doing time based aggregation.
|
| + repeated int64 timestamp = 3;
|
| + optional int64 total_count = 4;
|
| +}
|
| +
|
| +// Report device level status.
|
| +message DeviceStatusReportRequest {
|
| + optional string os_version = 1;
|
| + optional string firmware_version = 2;
|
| +
|
| + // "Validated", "Dev". Same as verified mode.
|
| + // If the mode is unknown, this field should not be set.
|
| + optional string boot_mode = 3;
|
| +
|
| + // Device active times collection since last report rpc call.
|
| + repeated TimePeriod active_time = 4;
|
| +}
|
| +
|
| +// Report session (a user on one device) level status.
|
| +message SessionStatusReportRequest {
|
| + // Installed apps for this user on this device.
|
| + repeated string installed_app_id = 1;
|
| +
|
| + // Installed extensions for this user on this device.
|
| + repeated string installed_extension_id = 2;
|
| +
|
| + // One stat per app for top 30 apps.
|
| + repeated InstallableLaunch app_launch_stat = 3;
|
| +}
|
| +
|
| +// Response from DMServer to update devices' status.
|
| +// It is possible that status report fails but policy request succeed. In such
|
| +// case, the DeviceStatusReportResponse will contain an error code and the
|
| +// device should re-send status report data in the next policy request. The
|
| +// device should re-send report data if policy request fails, even if
|
| +// DeviceStatusReportResponse contains no error code.
|
| +message DeviceStatusReportResponse {
|
| + optional int32 error_code = 1;
|
| +
|
| + // Human readable error message for customer support purpose.
|
| + optional string error_message = 2;
|
| +}
|
| +
|
| +// Response from DMServer to update user devices' status.
|
| +// It is possible that status report fails but policy request succeed. In such
|
| +// case, the SessionStatusReportResponse will contain an error code and the
|
| +// device should re-send status report data in the next policy request. The
|
| +// device should re-send report data if policy request fails, even if
|
| +// SessionStatusReportResponse contains no error code.
|
| +message SessionStatusReportResponse {
|
| + optional int32 error_code = 1;
|
| +
|
| + // Human readable error message for customer support purpose.
|
| + optional string error_message = 2;
|
| +}
|
| +
|
| // Request from the DMAgent on the device to the DMServer. This is
|
| // container for all requests from device to server. The overall HTTP
|
| // request MUST be in the following format:
|
| @@ -212,7 +297,7 @@ message DevicePolicyResponse {
|
| // * HTTP method is POST
|
| // * Data mime type is application/x-protobuffer
|
| // * HTTP parameters are (all required, all case sensitive):
|
| -// * request: MUST BE one of register/unregister/policy/ping
|
| +// * request: MUST BE one of register/unregister/policy/ping/status
|
| // * devicetype: MUST BE "1" for Android or "2" for Chrome OS.
|
| // * apptype: MUST BE Android or Chrome.
|
| // * deviceid: MUST BE no more than 64-char in [\x21-\x7E].
|
| @@ -221,10 +306,21 @@ message DevicePolicyResponse {
|
| // * For register and ping requests
|
| // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync>
|
| //
|
| -// * For unregister and policy requests
|
| +// * For unregister, policy and status requests
|
| // Authorization: GoogleDMToken token=<dm token from register>
|
| //
|
| // * OAuth is NOT supported yet.
|
| +//
|
| +// DeviceManagementRequest should only contain one request which matches the
|
| +// HTTP query parameter - request, as listed below. Other requests within the
|
| +// container will be ignored.
|
| +// ping: policy_request
|
| +// register: register_request
|
| +// unregister: unregister_request
|
| +// policy: policy_request
|
| +// status: status_report_request
|
| +//
|
| +//
|
| message DeviceManagementRequest {
|
| // Register request.
|
| optional DeviceRegisterRequest register_request = 1;
|
| @@ -234,6 +330,10 @@ message DeviceManagementRequest {
|
|
|
| // Policy request.
|
| optional DevicePolicyRequest policy_request = 3;
|
| +
|
| + // Update status.
|
| + optional DeviceStatusReportRequest device_status_report_request = 4;
|
| + optional SessionStatusReportRequest session_status_report_request = 5;
|
| }
|
|
|
| // Response from server to device.
|
| @@ -264,4 +364,10 @@ message DeviceManagementResponse {
|
|
|
| // Policy response.
|
| optional DevicePolicyResponse policy_response = 5;
|
| +
|
| + // Device status report response.
|
| + optional DeviceStatusReportResponse device_status_report_response = 6;
|
| +
|
| + // Session status report response.
|
| + optional SessionStatusReportResponse session_status_report_response = 7;
|
| }
|
|
|