1791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang/* 2791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * Copyright 2017, The Android Open Source Project 3791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * 4791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * Licensed under the Apache License, Version 2.0 (the "License"); 5791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * you may not use this file except in compliance with the License. 6791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * You may obtain a copy of the License at 7791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * 8791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * http://www.apache.org/licenses/LICENSE-2.0 9791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * 10791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * Unless required by applicable law or agreed to in writing, software 11791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * distributed under the License is distributed on an "AS IS" BASIS, 12791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * See the License for the specific language governing permissions and 14791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang * limitations under the License. 15791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang */ 16791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 17791a1a206b56be8601a6fffd2614926e67d64790Chong Zhangsyntax = "proto2"; 18791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 19791a1a206b56be8601a6fffd2614926e67d64790Chong Zhangpackage android.clearkeycas; 20791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 21791a1a206b56be8601a6fffd2614926e67d64790Chong Zhangoption java_package = "com.google.video.clearkey.protos"; 22791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 23791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// The Asset is the data describing licensing requirements and polciy for a 24791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// customer's video asset. 25791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// 26791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// The asset_id must not be set on creation. It is only used for assets of 27791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// CasType: CLEARKEY_CAS. 28791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// 29791a1a206b56be8601a6fffd2614926e67d64790Chong Zhangmessage Asset { 30791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // Indicates the type of digital rights management scheme used. 31791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // CLEARKEY_CAS: Clearkey Media CAS. 32791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang enum CasType { 33791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang UNKNOWN = 0; 34791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang CLEARKEY_CAS = 1; 35791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang } 36791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 37791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // Must be unset on creation. Required for mutate operations on CLEARKEY_CAS assets. 38791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang optional uint64 id = 1; 39791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 40791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // Organization-specified name of the asset. Required. Must not be empty. 41791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // 'bytes' instead of 'string' due to UTF-8 validation in the latter. 42791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang optional bytes name = 2; 43791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 44791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // The lowercase_organization_name is required. It's a foreign key to the 45791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // Organization table and part of the primary key for the Asset table. 46791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang optional string lowercase_organization_name = 3; 47791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 48791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // The policy_name is required. It's a foreign key to the policy table. 49791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang optional string policy_name = 4; // Name of the Policy to apply to this asset. 50791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 51791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang // Key information for decrypting content. Not used for CLEARKEY_CAS. 52791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang optional AssetKey asset_key = 5; 53791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 54791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang optional CasType cas_type = 6 [default = UNKNOWN]; 55791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang} 56791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang 57791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// AssetKey defines a key that can be used to decrypt the license. 58791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// Note: In the previous implementation, the schema accommodated multiple 59791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang// asset keys per asset. This is not supported in this implementation. 60791a1a206b56be8601a6fffd2614926e67d64790Chong Zhangmessage AssetKey { 61791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang optional bytes encryption_key = 1; // 256-byte key for the asset. 62791a1a206b56be8601a6fffd2614926e67d64790Chong Zhang} 63