diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-18 14:21:28 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-18 14:21:28 +0000 |
commit | 64c25e10e8d8e53c536c322d274765cb93eaca77 (patch) | |
tree | 8577731f641aedf4c75978c36248cf8bc881108e | |
parent | 9a6edd28d94d10bf1522fa7eaa069a98bb22f04a (diff) | |
download | chromium_src-64c25e10e8d8e53c536c322d274765cb93eaca77.zip chromium_src-64c25e10e8d8e53c536c322d274765cb93eaca77.tar.gz chromium_src-64c25e10e8d8e53c536c322d274765cb93eaca77.tar.bz2 |
Added chrome_extension_policy.proto.
This protobuf defines the messages used to fetch policy for extensions from the cloud policy server.
BUG=163318
Review URL: https://chromiumcodereview.appspot.com/11878021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177669 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/policy/cloud_policy_codegen.gyp | 1 | ||||
-rw-r--r-- | chrome/browser/policy/proto/chrome_extension_policy.proto | 43 | ||||
-rw-r--r-- | chrome/browser/policy/proto/device_management_backend.proto | 5 |
3 files changed, 47 insertions, 2 deletions
diff --git a/chrome/app/policy/cloud_policy_codegen.gyp b/chrome/app/policy/cloud_policy_codegen.gyp index ba13f51..9988d31 100644 --- a/chrome/app/policy/cloud_policy_codegen.gyp +++ b/chrome/app/policy/cloud_policy_codegen.gyp @@ -105,6 +105,7 @@ 'type': 'static_library', 'sources': [ '<(proto_rel_path)/chrome_device_policy.proto', + '<(proto_rel_path)/chrome_extension_policy.proto', '<(proto_rel_path)/device_management_backend.proto', '<(proto_rel_path)/device_management_local.proto', '<(proto_rel_path)/install_attributes.proto', diff --git a/chrome/browser/policy/proto/chrome_extension_policy.proto b/chrome/browser/policy/proto/chrome_extension_policy.proto new file mode 100644 index 0000000..27da746 --- /dev/null +++ b/chrome/browser/policy/proto/chrome_extension_policy.proto @@ -0,0 +1,43 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +syntax = "proto2"; + +option optimize_for = LITE_RUNTIME; + +package enterprise_management; + +// Describes how to retrieve policy data for a particular extension. The +// extension ID is in the |settings_entity_id| field of the PolicyData message +// that contains the ExternalPolicyData in its |policy_value| field. +message ExternalPolicyData { + // A URL where the policy data can be downloaded from. + optional string download_url = 1; + + // SHA-1 hash of the data at |download_url|. This is used to verify the + // integrity of the data, and to detect updates on the client side: the client + // downloads the data when its local hash does not match |secure_hash|. + optional bytes secure_hash = 2; + + // An authentication method that can be used to verify that the client is + // authorized to download |download_url|. + enum AuthMethod { + // No authentication is performed; knowledge of the URL is enough to + // authorize its download. + NONE = 0; + + // The HTTP GET request sent to |download_url| must include an + // "Authorization: " HTTP header of the GoogleDMToken type. Its value is the + // same as the DMToken used for the policy fetch. + DMTOKEN = 1; + + // The HTTP GET request sent to |download_url| must include an + // "Authorization: " HTTP header of the "OAuth" type. Its value is a valid + // Google Accounts OAuth access token. + OAUTH = 2; + } + + // The authentication method that the client must use to fetch |download_url|. + optional AuthMethod download_auth_method = 3 [default = NONE]; +} diff --git a/chrome/browser/policy/proto/device_management_backend.proto b/chrome/browser/policy/proto/device_management_backend.proto index a91ce28..d5fdc3e 100644 --- a/chrome/browser/policy/proto/device_management_backend.proto +++ b/chrome/browser/policy/proto/device_management_backend.proto @@ -99,6 +99,7 @@ message PolicyFetchRequest { // google/chromeos/device => ChromeDeviceSettingsProto // google/chromeos/user => ChromeSettingsProto // google/chromeos/publicaccount => ChromeSettingsProto + // google/chrome/extension => ExternalPolicyData optional string policy_type = 1; // This is the last policy timestamp that client received from server. @@ -156,8 +157,8 @@ message PolicyData { optional string request_token = 3; // The serialized value of the actual policy protobuf. This can be - // deserialized to an instance of, for example, ChromeSettingsProto - // or ChromeDeviceSettingsProto. + // deserialized to an instance of, for example, ChromeSettingsProto, + // ChromeDeviceSettingsProto, or ExternalPolicyData. optional bytes policy_value = 4; // The device display name assigned by the server. It is only |