• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2017, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package android.clearkeycas;
20
21option java_package = "com.google.video.clearkey.protos";
22
23// The Asset is the data describing licensing requirements and polciy for a
24// customer's video asset.
25//
26// The asset_id must not be set on creation.  It is only used for assets of
27// CasType: CLEARKEY_CAS.
28//
29message Asset {
30  // Indicates the type of digital rights management scheme used.
31  // CLEARKEY_CAS: Clearkey Media CAS.
32  enum CasType {
33    UNKNOWN = 0;
34    CLEARKEY_CAS = 1;
35  }
36
37  // Must be unset on creation.  Required for mutate operations on CLEARKEY_CAS assets.
38  optional uint64 id = 1;
39
40  // Organization-specified name of the asset. Required. Must not be empty.
41  // 'bytes' instead of 'string' due to UTF-8 validation in the latter.
42  optional bytes name = 2;
43
44  // The lowercase_organization_name is required.  It's a foreign key to the
45  // Organization table and part of the primary key for the Asset table.
46  optional string lowercase_organization_name = 3;
47
48  // The policy_name is required.  It's a foreign key to the policy table.
49  optional string policy_name = 4; // Name of the Policy to apply to this asset.
50
51  // Key information for decrypting content. Not used for CLEARKEY_CAS.
52  optional AssetKey asset_key = 5;
53
54  optional CasType cas_type = 6 [default = UNKNOWN];
55}
56
57// AssetKey defines a key that can be used to decrypt the license.
58// Note: In the previous implementation, the schema accommodated multiple
59// asset keys per asset.  This is not supported in this implementation.
60message AssetKey {
61  optional bytes encryption_key = 1;  // 256-byte key for the asset.
62}
63