1#  Copyright (c) 2023 Huawei Device Co., Ltd.
2#  Licensed under the Apache License, Version 2.0 (the "License");
3#  you may not use this file except in compliance with the License.
4#  You may obtain a copy of the License at
5#
6#      http://www.apache.org/licenses/LICENSE-2.0
7#
8#  Unless required by applicable law or agreed to in writing, software
9#  distributed under the License is distributed on an "AS IS" BASIS,
10#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11#  See the License for the specific language governing permissions and
12#  limitations under the License.
13
14#####################################################
15#     below is the format of defining event         #
16#####################################################
17#domain: domain name.  [Only one domain name can be defined at the top]
18#
19#author: the author name who defined this event.
20#date: the date when this event was defined, format is YYYY-MM-DD.
21#logged: source file which refer to this event.
22#usage: the usage of this event.
23#//Define event name and event properties.
24#@EVENT_NAME: the event definition part begin.
25#  // __BASE is used for defining the basic info of the event.
26#  // "type" optional values are: FAULT, STATISTICS, SECURITY, BEHAVIOR.
27#  // "level" optional values are: CRITICAL, MINOR.
28#  // "tag" set tags with may used by subscriber of this event, multiple tags devided by space.
29#  // "desc" full description of this event.
30#  @PARAMETER: {type: parameter type, arrsize: array length(optional), desc: parameter description}.
31#  // follow the __BASE block, each line defines a parameter of this event.
32#  // "type" optional values are: INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, STRING.
33#  // "arrsize" of the parameter is an array, set a non-zero value.
34#  // "desc" full description of this parameter.
35
36#####################################################
37#   Example of some hiviewdfx events definition     #
38#####################################################
39
40domain: CODE_SIGN
41
42CS_ADD_KEY:
43  __BASE: {type: FAULT, level: CRITICAL, desc: adding key into keyring failure event}
44  CERT_TYPE: {type: STRING, desc: certificate type}
45  ERR_TYPE: {type: INT32, desc: add key error type}
46
47CS_ENABLE_ERR:
48  __BASE: {type: SECURITY, level: CRITICAL, desc: enabling code sign failure event}
49  FILE_INFO: {type: STRING, desc: target file info}
50  SIGN_INFO: {type: STRING, desc: incorrect signature content}
51  ERR_TYPE: {type: INT32, desc: enable file error type}
52
53CS_LOAD_SA_ERR:
54  __BASE: {type: FAULT, level: CRITICAL, desc: loading SA failure event}
55  ERR_TYPE: {type: INT32, desc: load SA error type}
56
57CS_SA_INVALID_CALLER:
58  __BASE: {type: SECURITY, level: CRITICAL, desc: invalid caller event}
59  INTERFACE: {type: STRING, desc: 'interface type, Cert or Sign'}
60  TOKEN_ID : {type: UINT32, desc: token id of invalid caller}
61
62CS_PARSE_CODE_SIG:
63  __BASE: {type: FAULT, level: CRITICAL, desc: parse code sig failed}
64  FILE_INFO: {type: STRING, desc: info of hap file}
65  ERR_TYPE : {type: UINT32, desc: parse cide sig error type}
66
67CS_INVALID_OWNER:
68  __BASE: {type: SECURITY, level: CRITICAL, desc: invalid owner}
69  FILE_INFO: {type: STRING, desc: info of hap file}
70  OWNER_ID: {type: STRING, desc: owner id of the hap file}
71  PARSED_OWNER_ID: {type: STRING, desc: owner id in the signature}
72
73CS_ERR_PROFILE:
74  __BASE: {type: SECURITY, level: CRITICAL, desc: parsing local profile failure event}
75  PROFILE_INFO: {type: STRING, desc: profile path at local sotrage}
76  ERR_TYPE: {type: INT32, desc: profile parse error type}