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 3 // found in the LICENSE file. 4 5 syntax = "proto2"; 6 7 option optimize_for = LITE_RUNTIME; 8 9 package enterprise_management; 10 11 // Describes how to retrieve policy data for a particular extension. The 12 // extension ID is in the |settings_entity_id| field of the PolicyData message 13 // that contains the ExternalPolicyData in its |policy_value| field. 14 message ExternalPolicyData { 15 // A URL where the policy data can be downloaded from. 16 optional string download_url = 1; 17 18 // SHA-1 hash of the data at |download_url|. This is used to verify the 19 // integrity of the data, and to detect updates on the client side: the client 20 // downloads the data when its local hash does not match |secure_hash|. 21 optional bytes secure_hash = 2; 22 23 // An authentication method that can be used to verify that the client is 24 // authorized to download |download_url|. 25 enum AuthMethod { 26 // No authentication is performed; knowledge of the URL is enough to 27 // authorize its download. 28 NONE = 0; 29 30 // The HTTP GET request sent to |download_url| must include an 31 // "Authorization: " HTTP header of the GoogleDMToken type. Its value is the 32 // same as the DMToken used for the policy fetch. 33 DMTOKEN = 1; 34 35 // The HTTP GET request sent to |download_url| must include an 36 // "Authorization: " HTTP header of the "OAuth" type. Its value is a valid 37 // Google Accounts OAuth access token. 38 OAUTH = 2; 39 } 40 41 // The authentication method that the client must use to fetch |download_url|. 42 optional AuthMethod download_auth_method = 3 [default = NONE]; 43 } 44