Chromium Code Reviews| 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 import "cloud_policy.proto"; | |
| 8 | |
| 7 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
| 8 | 10 |
| 9 package enterprise_management; | 11 package enterprise_management; |
| 10 | 12 |
| 13 // Protocol buffers for the obsolete protocol: | |
|
Mattias Nissler (ping if slow)
2011/01/28 10:29:34
Which buffers do you mean?
gfeher
2011/01/28 13:42:10
Done.
| |
| 14 // ------------------------------------------- | |
| 15 // TODO(gfeher): Remove these when both Chrome and DMServer is switched to | |
| 16 // using the new protocol. | |
| 17 | |
| 11 // Generic value container. | 18 // Generic value container. |
| 12 message GenericValue { | 19 message GenericValue { |
| 13 enum ValueType { | 20 enum ValueType { |
| 14 VALUE_TYPE_BOOL = 1; | 21 VALUE_TYPE_BOOL = 1; |
| 15 VALUE_TYPE_INT64 = 2; | 22 VALUE_TYPE_INT64 = 2; |
| 16 VALUE_TYPE_STRING = 3; | 23 VALUE_TYPE_STRING = 3; |
| 17 VALUE_TYPE_DOUBLE = 4; | 24 VALUE_TYPE_DOUBLE = 4; |
| 18 VALUE_TYPE_BYTES = 5; | 25 VALUE_TYPE_BYTES = 5; |
| 19 VALUE_TYPE_BOOL_ARRAY = 6; | 26 VALUE_TYPE_BOOL_ARRAY = 6; |
| 20 VALUE_TYPE_INT64_ARRAY = 7; | 27 VALUE_TYPE_INT64_ARRAY = 7; |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 50 // Identify a single device policy setting key/value pair. | 57 // Identify a single device policy setting key/value pair. |
| 51 message DevicePolicySetting { | 58 message DevicePolicySetting { |
| 52 // key of the policy setting | 59 // key of the policy setting |
| 53 required string policy_key = 1; | 60 required string policy_key = 1; |
| 54 // value of the setting | 61 // value of the setting |
| 55 optional GenericSetting policy_value = 2; | 62 optional GenericSetting policy_value = 2; |
| 56 // watermark for setting value. | 63 // watermark for setting value. |
| 57 optional string watermark = 3; | 64 optional string watermark = 3; |
| 58 } | 65 } |
| 59 | 66 |
| 67 // Request for a setting or with optional watermark on client side. | |
| 68 message DevicePolicySettingRequest { | |
| 69 // setting key | |
| 70 required string key = 1; | |
| 71 // watermark last read from server if available. | |
| 72 optional string watermark = 2; | |
| 73 } | |
| 74 | |
| 75 // Request from device to server to read device policies. | |
| 76 message DevicePolicyRequest { | |
| 77 // identify request scope: CrOS settings or other type of settings. | |
| 78 optional string policy_scope = 1; | |
| 79 // identify key to the settings: proxy etc. | |
| 80 repeated DevicePolicySettingRequest setting_request = 2; | |
| 81 } | |
| 82 | |
| 83 // Response from server to agent for reading policies. | |
| 84 message DevicePolicyResponse { | |
| 85 // the result of the settings. | |
| 86 repeated DevicePolicySetting setting = 1; | |
| 87 } | |
| 88 | |
| 89 // Protocol buffers for the new protocol: | |
| 90 // -------------------------------------- | |
| 91 | |
| 92 // Request from device to server to query if the authenticated user is in a | |
| 93 // managed domain. | |
| 94 message ManagedCheckRequest { | |
| 95 } | |
| 96 | |
| 97 // Response from server to device indicating if the authenticated user is in a | |
| 98 // managed domain. | |
| 99 message ManagedCheckResponse { | |
| 100 enum Mode { | |
| 101 // The device must be enrolled for policies. | |
| 102 MANAGED = 1; | |
| 103 // The device is not automatically enrolled for policies, but the user | |
| 104 // may choose to try to enroll it. | |
| 105 UNMANAGED = 2; | |
| 106 } | |
| 107 | |
| 108 optional Mode mode = 1; | |
| 109 } | |
| 110 | |
| 60 // Request from device to server to register device. | 111 // Request from device to server to register device. |
| 61 message DeviceRegisterRequest { | 112 message DeviceRegisterRequest { |
| 62 // reregister device without erasing server state. | 113 // reregister device without erasing server state. |
| 63 // it can be used to refresh dmtoken etc. | 114 // it can be used to refresh dmtoken etc. |
| 64 optional bool reregister = 1; | 115 optional bool reregister = 1; |
| 65 } | 116 } |
| 66 | 117 |
| 67 // Response from server to device register request. | 118 // Response from server to device register request. |
| 68 message DeviceRegisterResponse { | 119 message DeviceRegisterResponse { |
| 69 // device mangement toke for this registration. | 120 // device mangement toke for this registration. |
| 70 required string device_management_token = 1; | 121 required string device_management_token = 1; |
| 122 | |
| 123 // The name of the device, assigned by the server. | |
| 124 optional string device_name = 2; | |
| 71 } | 125 } |
| 72 | 126 |
| 73 // Request from device to server to unregister device. | 127 // Request from device to server to unregister device. |
| 74 message DeviceUnregisterRequest { | 128 message DeviceUnregisterRequest { |
| 75 } | 129 } |
| 76 | 130 |
| 77 // Response from server to device unregister request. | 131 // Response from server to device unregister request. |
| 78 message DeviceUnregisterResponse { | 132 message DeviceUnregisterResponse { |
| 79 } | 133 } |
| 80 | 134 |
| 81 // Request for a setting or with optional watermark on client side. | 135 message CloudPolicyRequest { |
| 82 message DevicePolicySettingRequest { | 136 // Identify request scope: chromeos/device for device policies, chromeos/user |
| 83 // setting key | 137 // for user policies. |
| 84 required string key = 1; | 138 optional string policy_scope = 1; |
|
Mattias Nissler (ping if slow)
2011/01/28 10:29:34
Need an additional field for the context's device
gfeher
2011/01/28 13:42:10
Done.
| |
| 85 // watermark last read from server if available. | |
| 86 optional string watermark = 2; | |
| 87 } | 139 } |
| 88 | 140 |
| 89 // Request from device to server to read device policies. | 141 // Response from server to device for reading policies. |
| 90 message DevicePolicyRequest { | 142 message CloudPolicyResponse { |
| 91 // identify request scope: CrOS settings or other type of settings. | 143 // Serialized SignedCloudPolicyResponse. |
| 92 optional string policy_scope = 1; | 144 optional bytes signed_response = 1; |
| 93 // identify key to the settings: proxy etc. | 145 // Signature of the above data. |
|
Mattias Nissler (ping if slow)
2011/01/28 10:29:34
We should also mention that the signature algorith
gfeher
2011/01/28 13:42:10
Done.
| |
| 94 repeated DevicePolicySettingRequest setting_request = 2; | 146 optional bytes signature = 2; |
| 147 // The chain of DER-encoded X.509 certificates of the server's signing key. | |
|
Mattias Nissler (ping if slow)
2011/01/28 10:29:34
As discussed, specify order here.
gfeher
2011/01/28 13:42:10
Done.
| |
| 148 repeated bytes certificate_chain = 3; | |
| 95 } | 149 } |
| 96 | 150 message SignedCloudPolicyResponse { |
| 97 // Response from server to agent for reading policies. | 151 // The following three are necessary against replay attacks. |
|
Mattias Nissler (ping if slow)
2011/01/28 10:29:34
actually, it's the following two.
gfeher
2011/01/28 13:42:10
Done.
| |
| 98 message DevicePolicyResponse { | 152 // |timestamp| is a unix timestamp (seconds since 1970). |
| 99 // the result of the settings. | 153 optional int64 timestamp = 1; |
| 100 repeated DevicePolicySetting setting = 1; | 154 // The token that was used for the request. |
| 155 optional string request_token = 2; | |
| 156 // The name of the device, assigned by the server. | |
| 157 optional string device_name = 3; | |
| 158 // CloudPolicySettings is defined in cloud_policy.proto (which is | |
| 159 // auto-generated from chrome/app/policy_templates.json). | |
| 160 optional CloudPolicySettings settings = 4; | |
| 101 } | 161 } |
| 102 | 162 |
| 103 // Request from the DMAgent on the device to the DMServer. | 163 // Request from the DMAgent on the device to the DMServer. |
| 104 // This is container for all requests from client. | 164 // This is container for all requests from client. |
| 105 // | 165 // |
| 166 // Http Query parameters: | |
| 167 // Query parameters contain the following information in each request: | |
| 168 // request: register/unregister/policy/cloud_policy/managed_check etc. | |
| 169 // devicetype: CrOS/Android/Iphone etc. | |
| 170 // apptype: CrOS/AndroidDM etc. | |
| 171 // deviceid: unique id that identify the device. | |
| 172 // agent: identify agent on device. | |
| 173 // | |
| 106 // Authorization: | 174 // Authorization: |
| 107 // 1. If request is register_request, client must pass in GoogleLogin auth | 175 // 1. If request is managed_check, client must pass in GoogleLogin auth |
| 176 // cookie in Authorization header: | |
| 177 // Authorization: GoogleLogin auth=<auth cookie> | |
| 178 // This is the only case when the deviceid query parameter is set to empty. | |
| 179 // The response will contain a flag indicating if the user is in a managed | |
| 180 // domain or not. (We don't want to expose device ids of users not in | |
| 181 // managed domains.) | |
| 182 // 2. If request is register_request, client must pass in GoogleLogin auth | |
| 108 // cookie in Authorization header: | 183 // cookie in Authorization header: |
| 109 // Authorization: GoogleLogin auth=<auth cookie> | 184 // Authorization: GoogleLogin auth=<auth cookie> |
| 110 // The response will contain an unique DMToken for future requests. | 185 // The response will contain an unique DMToken for future requests. |
| 111 // Depending on domain policy, the request may need admin approval before | 186 // Depending on domain policy, the request may need admin approval before |
| 112 // DMToken is issued. | 187 // DMToken is issued. |
| 113 // 2. For other requests, client must pass in DMToken in Authorization header: | 188 // 3. For other requests, client must pass in DMToken in Authorization header: |
| 114 // Authorization: GoogleDMToken token=<google dm token> | 189 // Authorization: GoogleDMToken token=<google dm token> |
| 115 // | 190 // |
| 116 // Http Query parameters: | |
| 117 // Query parameters contain the following information in each request: | |
| 118 // request: register/unregister/policy etc. | |
| 119 // devicetype: CrOS/Android/Iphone etc. | |
| 120 // apptype: CrOS/AndroidDM etc. | |
| 121 // deviceid: unique id that identify the device. | |
| 122 // agent: identify agent on device. | |
| 123 message DeviceManagementRequest { | 191 message DeviceManagementRequest { |
| 124 // Register request. | 192 // Register request. |
| 125 optional DeviceRegisterRequest register_request = 1; | 193 optional DeviceRegisterRequest register_request = 1; |
| 126 | 194 |
| 127 // Unregister request. | 195 // Unregister request. |
| 128 optional DeviceUnregisterRequest unregister_request = 2; | 196 optional DeviceUnregisterRequest unregister_request = 2; |
| 129 | 197 |
| 130 // Data request. | 198 // Data request. |
| 131 optional DevicePolicyRequest policy_request = 3; | 199 optional DevicePolicyRequest policy_request = 3; |
| 200 | |
| 201 // Data request (new protocol). | |
| 202 optional CloudPolicyRequest cloud_policy_request = 4; | |
| 203 | |
| 204 // Request to check if a user is managed or not. | |
| 205 optional ManagedCheckRequest managed_check_request = 5; | |
| 132 } | 206 } |
| 133 | 207 |
| 134 // Response from server to device. | 208 // Response from server to device. |
| 135 message DeviceManagementResponse { | 209 message DeviceManagementResponse { |
| 136 // Error code to client. | 210 // Error code to client. |
| 137 enum ErrorCode { | 211 enum ErrorCode { |
| 138 SUCCESS = 0; | 212 SUCCESS = 0; |
| 139 // Returned for register request when device management is not supported | 213 // Returned for register request when device management is not supported |
| 140 // for the domain. | 214 // for the domain. |
| 141 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; | 215 DEVICE_MANAGEMENT_NOT_SUPPORTED = 1; |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 157 optional string error_message = 2; | 231 optional string error_message = 2; |
| 158 | 232 |
| 159 // Register response | 233 // Register response |
| 160 optional DeviceRegisterResponse register_response = 3; | 234 optional DeviceRegisterResponse register_response = 3; |
| 161 | 235 |
| 162 // Unregister response | 236 // Unregister response |
| 163 optional DeviceUnregisterResponse unregister_response = 4; | 237 optional DeviceUnregisterResponse unregister_response = 4; |
| 164 | 238 |
| 165 // Policy response. | 239 // Policy response. |
| 166 optional DevicePolicyResponse policy_response = 5; | 240 optional DevicePolicyResponse policy_response = 5; |
| 167 } | 241 |
| 242 // Policy response (new protocol). | |
| 243 optional CloudPolicyResponse cloud_policy_response = 6; | |
| 244 | |
| 245 // Response to managed check request. | |
| 246 optional ManagedCheckResponse managed_check_response = 7; | |
| 247 } | |
| OLD | NEW |