OLD | NEW |
1 // Copyright (c) 2010 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 |
| 11 import "cloud_policy.proto"; |
| 12 |
11 // Generic value container. | 13 // Generic value container. |
12 message GenericValue { | 14 message GenericValue { |
13 enum ValueType { | 15 enum ValueType { |
14 VALUE_TYPE_BOOL = 1; | 16 VALUE_TYPE_BOOL = 1; |
15 VALUE_TYPE_INT64 = 2; | 17 VALUE_TYPE_INT64 = 2; |
16 VALUE_TYPE_STRING = 3; | 18 VALUE_TYPE_STRING = 3; |
17 VALUE_TYPE_DOUBLE = 4; | 19 VALUE_TYPE_DOUBLE = 4; |
18 VALUE_TYPE_BYTES = 5; | 20 VALUE_TYPE_BYTES = 5; |
19 VALUE_TYPE_BOOL_ARRAY = 6; | 21 VALUE_TYPE_BOOL_ARRAY = 6; |
20 VALUE_TYPE_INT64_ARRAY = 7; | 22 VALUE_TYPE_INT64_ARRAY = 7; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 optional GenericSetting policy_value = 2; | 57 optional GenericSetting policy_value = 2; |
56 // watermark for setting value. | 58 // watermark for setting value. |
57 optional string watermark = 3; | 59 optional string watermark = 3; |
58 } | 60 } |
59 | 61 |
60 // Request from device to server to register device. | 62 // Request from device to server to register device. |
61 message DeviceRegisterRequest { | 63 message DeviceRegisterRequest { |
62 // reregister device without erasing server state. | 64 // reregister device without erasing server state. |
63 // it can be used to refresh dmtoken etc. | 65 // it can be used to refresh dmtoken etc. |
64 optional bool reregister = 1; | 66 optional bool reregister = 1; |
| 67 |
| 68 // This should be the uniqe id of the device, e.g. serial number |
| 69 optional string device_id = 2; |
| 70 |
| 71 // username? (currently this is also sent as an HTTP POST parameter) |
65 } | 72 } |
66 | 73 |
67 // Response from server to device register request. | 74 // Response from server to device register request. |
68 message DeviceRegisterResponse { | 75 message DeviceRegisterResponse { |
69 // device mangement toke for this registration. | 76 // device mangement toke for this registration. |
70 required string device_management_token = 1; | 77 required string device_management_token = 1; |
| 78 |
| 79 // Name assigned to the device. |
| 80 optional string device_name = 2; |
71 } | 81 } |
72 | 82 |
73 // Request from device to server to unregister device. | 83 // Request from device to server to unregister device. |
74 message DeviceUnregisterRequest { | 84 message DeviceUnregisterRequest { |
75 } | 85 } |
76 | 86 |
77 // Response from server to device unregister request. | 87 // Response from server to device unregister request. |
78 message DeviceUnregisterResponse { | 88 message DeviceUnregisterResponse { |
79 } | 89 } |
80 | 90 |
(...skipping 12 matching lines...) Expand all Loading... |
93 // identify key to the settings: proxy etc. | 103 // identify key to the settings: proxy etc. |
94 repeated DevicePolicySettingRequest setting_request = 2; | 104 repeated DevicePolicySettingRequest setting_request = 2; |
95 } | 105 } |
96 | 106 |
97 // Response from server to agent for reading policies. | 107 // Response from server to agent for reading policies. |
98 message DevicePolicyResponse { | 108 message DevicePolicyResponse { |
99 // the result of the settings. | 109 // the result of the settings. |
100 repeated DevicePolicySetting setting = 1; | 110 repeated DevicePolicySetting setting = 1; |
101 } | 111 } |
102 | 112 |
| 113 // Request from device to server to read device policies. |
| 114 // The use of this message instead of DevicePolicyRequest indicates |
| 115 // that the client is expecting a response of type |
| 116 // CloudPolicyResponse. |
| 117 message CloudPolicyRequest { |
| 118 // identify request scope: CrOS device setting, CrOS user setting |
| 119 // or other type of settings. |
| 120 optional string policy_scope = 1; |
| 121 } |
| 122 |
| 123 // Response from server to device for reading policies. |
| 124 message CloudPolicyResponse { |
| 125 // Serialized SignedCloudPolicyResponse. |
| 126 optional bytes signed_response = 1; |
| 127 // Signature of the above data. |
| 128 optional bytes signature = 2; |
| 129 } |
| 130 |
| 131 // this is used only for the DMServer -> ChromeOS response |
| 132 message SignedCloudPolicyResponse { |
| 133 // The following two are necessary agains replay attacks. |
| 134 optional int64 timestamp = 1; |
| 135 optional string device_token = 2; |
| 136 optional string device_name = 3; |
| 137 // CloudPolicySettings is defined in cloud_policy.proto. |
| 138 optional CloudPolicySettings settings = 4; |
| 139 } |
| 140 |
103 // Request from the DMAgent on the device to the DMServer. | 141 // Request from the DMAgent on the device to the DMServer. |
104 // This is container for all requests from client. | 142 // This is container for all requests from client. |
105 // | 143 // |
106 // Authorization: | 144 // Authorization: |
107 // 1. If request is register_request, client must pass in GoogleLogin auth | 145 // 1. If request is register_request, client must pass in GoogleLogin auth |
108 // cookie in Authorization header: | 146 // cookie in Authorization header: |
109 // Authorization: GoogleLogin auth=<auth cookie> | 147 // Authorization: GoogleLogin auth=<auth cookie> |
110 // The response will contain an unique DMToken for future requests. | 148 // The response will contain an unique DMToken for future requests. |
111 // Depending on domain policy, the request may need admin approval before | 149 // Depending on domain policy, the request may need admin approval before |
112 // DMToken is issued. | 150 // DMToken is issued. |
113 // 2. For other requests, client must pass in DMToken in Authorization header: | 151 // 2. For other requests, client must pass in DMToken in Authorization header: |
114 // Authorization: GoogleDMToken token=<google dm token> | 152 // Authorization: GoogleDMToken token=<google dm token> |
115 // | 153 // |
116 // Http Query parameters: | 154 // Http Query parameters: |
117 // Query parameters contain the following information in each request: | 155 // Query parameters contain the following information in each request: |
118 // request: register/unregister/policy etc. | 156 // request: register/unregister/policy/cloud_policy etc. |
119 // devicetype: CrOS/Android/Iphone etc. | 157 // devicetype: CrOS/Android/Iphone etc. |
120 // apptype: CrOS/AndroidDM etc. | 158 // apptype: CrOS/AndroidDM etc. |
121 // deviceid: unique id that identify the device. | 159 // deviceid: unique id that identify the device. |
122 // agent: identify agent on device. | 160 // agent: identify agent on device. |
123 message DeviceManagementRequest { | 161 message DeviceManagementRequest { |
124 // Register request. | 162 // Register request. |
125 optional DeviceRegisterRequest register_request = 1; | 163 optional DeviceRegisterRequest register_request = 1; |
126 | 164 |
127 // Unregister request. | 165 // Unregister request. |
128 optional DeviceUnregisterRequest unregister_request = 2; | 166 optional DeviceUnregisterRequest unregister_request = 2; |
129 | 167 |
130 // Data request. | 168 // Data request. |
131 optional DevicePolicyRequest policy_request = 3; | 169 optional DevicePolicyRequest policy_request = 3; |
| 170 |
| 171 // Data request (new protocol). |
| 172 optional CloudPolicyRequest cloud_policy_request = 4; |
132 } | 173 } |
133 | 174 |
134 // Response from server to device. | 175 // Response from server to device. |
135 message DeviceManagementResponse { | 176 message DeviceManagementResponse { |
136 // Error code to client. | 177 // Error code to client. |
137 enum ErrorCode { | 178 enum ErrorCode { |
138 SUCCESS = 0; | 179 SUCCESS = 0; |
139 // Returned for register request when device management is not supported | 180 // Returned for register request when device management is not supported |
140 // for the domain. | 181 // for the domain. |
141 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; | 182 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; |
(...skipping 15 matching lines...) Expand all Loading... |
157 optional string error_message = 2; | 198 optional string error_message = 2; |
158 | 199 |
159 // Register response | 200 // Register response |
160 optional DeviceRegisterResponse register_response = 3; | 201 optional DeviceRegisterResponse register_response = 3; |
161 | 202 |
162 // Unregister response | 203 // Unregister response |
163 optional DeviceUnregisterResponse unregister_response = 4; | 204 optional DeviceUnregisterResponse unregister_response = 4; |
164 | 205 |
165 // Policy response. | 206 // Policy response. |
166 optional DevicePolicyResponse policy_response = 5; | 207 optional DevicePolicyResponse policy_response = 5; |
167 } | 208 |
| 209 // Policy response (new protocol). |
| 210 optional CloudPolicyResponse cloud_policy_response = 6; |
| 211 } |
OLD | NEW |