1# HarmonyAppProvision Configuration File 2The **HarmonyAppProvision** configuration file (also called profile) is a file where you declare permission and signature information for your application. 3 4## Configuration File Structure 5The **HarmonyAppProvision** file consists of several parts, which are described in the table below. 6 7| Name | Description | Data Type| Mandatory| Initial Value Allowed| 8| ----------- | ---------------------------------------------------------------------------------------- | -------- | -------- | -------- | 9| version-code | Version number of the **HarmonyAppProvision** file format. The value is a positive integer containing 32 or less digits.| Number | Yes| No | 10| version-name | Description of the version number. It is recommended that the value consist of three segments, for example, **A.B.C**. | String | Yes| No| 11| uuid | Unique ID of the **HarmonyAppProvision** file. | String | Yes| No| 12| type | Type of the **HarmonyAppProvision** file. The value can be **debug** (for application debugging) or **release** (for application release). The recommended value is **debug**.| String | Yes| No| 13| issuer | Issuer of the **HarmonyAppProvision** file. | String | Yes| No| 14| validity | Validity period of the **HarmonyAppProvision** file. For details, see [Internal Structure of the validity Object](#internal-structure-of-the-validity-object). | Object | Yes| No | 15| bundle-info | Information about the application bundle and developer. For details, see [Internal Structure of the bundle-info Object](#internal-structure-of-the-bundle-info-object). | Object | Yes| No | 16| acls | Information about the Access Control Lists (ACLs). For details, see [Internal Structure of the acls Object](#internal-structure-of-the-acls-object). | Object | No| Yes | 17| permissions | Permissions required for your application. For details, see [Internal Structure of the permissions Object](#internal-structure-of-the-permissions-object). | Object | No| Yes | 18| debug-info | Additional information for application debugging. For details, see [Internal Structure of the debug-info Object](#internal-structure-of-the-debug-info-object). | Object | No| Yes | 19| app-privilege-capabilities | Privilege information required by the application bundle. For details, see the [Application Privilege Configuration Guide](../../device-dev/subsystems/subsys-app-privilege-config-guide.md). | String array| No| Yes | 20 21An example of the **HarmonyAppProvision** file is as follows: 22```json 23{ 24 "version-code": 1, 25 "version-name": "1.0.0", 26 "uuid": "string", 27 "type": "debug", 28 "validity": { 29 "not-before": 1586422743, 30 "not-after": 1617958743 31 }, 32 "bundle-info" : { 33 "developer-id": "OpenHarmony", 34 "development-certificate": "Base64 string", 35 "distribution-certificate": "Base64 string", 36 "bundle-name": "com.OpenHarmony.app.test", 37 "apl": "normal", 38 "app-feature": "hos_normal_app" 39 }, 40 "acls": { 41 "allowed-acls": ["string"] 42 }, 43 "permissions": { 44 "restricted-permissions": ["string"] 45 }, 46 "debug-info" : { 47 "device-id-type": "udid", 48 "device-ids": ["string"] 49 }, 50 "app-privilege-capabilities":["AllowAppUsePrivilegeExtension"], 51 "issuer": "OpenHarmony" 52} 53 54``` 55 56### Internal Structure of the validity Object 57 58| Name | Description | Data Type| Mandatory| Initial Value Allowed| 59| ---------- | ------------------------------- | ------- | ------- | --------- | 60| not-before | Start time of the file validity period. The value is a Unix timestamp, which is a non-negative integer.| Number | Yes| No | 61| not-after | End time of the file validity period. The value is a Unix timestamp, which is a non-negative integer.| Number | Yes| No | 62 63### Internal Structure of the bundle-info Object 64 65**NOTE**<br>The value of **bundle-name** in the **bundle-info** object in the HarmonyAppProvision file must be the same as the value of **bundleName** (in **config.json** or **module.json5**) of the signed application. To prevent a HarmonyAppProvision file from being used for signatures of different applications, the system checks whether the value of **bundleName** in the HAP signature is the same as that in the HAP configuration file during application installation. If they are different, the HAP cannot be installed. 66 67| Name | Description | Data Type| Mandatory| Initial Value Allowed| 68| ------------------------ | ------------------------------- | ------- | -------- | --------- | 69| developer-id | Unique ID of the developer.| String | Yes| No | 70| development-certificate | Information about the [debug certificate](hapsigntool-guidelines.md).| Number | Yes if **type** is set to **debug** and no otherwise | No | 71| distribution-certificate | Information about the [release certificate](hapsigntool-guidelines.md).| Number | Yes if **type** is set to **release** and no otherwise| No | 72| bundle-name | Bundle name of the application.| String | Yes| No | 73| apl | [Ability privilege level (APL)](accesstoken-overview.md) of your application. The value can be **normal**, **system_basic**, or **system_core**.| String | Yes| No | 74| app-feature | Type of your application. The value can be **hos_system_app** (system application) or **hos_normal_app** (normal application). Only system applications are allowed to call system APIs. If a normal application calls a system API, the call cannot be successful or the application may run abnormally.| String | Yes| No | 75 76 77### Internal Structure of the acls Object 78The **acls** object contains the [ACL](accesstoken-overview.md) configured for your application. It should be noted that you still need to add the ACL information to the [**requestPermissions**](../quick-start/module-configuration-file.md#requestpermissions) attribute in the application configuration file. 79 80| Name | Description | Data Type| Mandatory| Initial Value Allowed| 81| ------------------------ | ------------------------------- | ------- | ------- | --------- | 82| allowed-acls | [ACLs](../security/accesstoken-overview.md) configured for your application.| String array | No| No | 83 84### Internal Structure of the permissions Object 85The **permissions** object contains restricted permissions required for your application. Different from the ACLs set in the **acls** object, these permissions need user authorization during the running of your application. It should be noted that you still need to add the ACL information to the [**requestPermissions**](../quick-start/module-configuration-file.md#requestpermissions) attribute in the application configuration file. 86 87| Name | Description | Data Type| Mandatory| Initial Value Allowed| 88| ------------------------ | ------------------------------- | ------- | ------- | --------- | 89| restricted-permissions | [Restricted permissions](accesstoken-overview.md) required for your application.| String array | No| No | 90 91### Internal Structure of the debug-info Object 92The **debug-info** object contains debugging information of your application, mainly device management and control information. 93 94| Name | Description | Data Type| Mandatory| Initial Value Allowed| 95| ------------------------ | ------------------------------- | ------- | ------- | --------- | 96| device-id-type | Type of the device ID. Currently, only the udid type is supported.| String | No| No | 97| device-ids | IDs of devices on which your application can be debugged.| String array | No| No | 98 99## Modifying the HarmonyAppProvision Configuration File 100 101When a development project is created, the default application type is **hos_normal_app** and the default APL level is **normal**. 102 103To enable the application to use system APIs, you need to change the **app-feature** field to **hos_system_app** (system application). To apply for high-level permissions, you need to modify fields such as **apl** and **acl**. For details, see [Access Control Overview](accesstoken-overview.md). 104 105 106To modify the HarmonyAppProvision configuration file, perform the following steps: 107 1081. Open the directory where the OpenHarmony SDK is located. (You can choose **File** > **Settings** > **OpenHarmony SDK** on the menu bar of DevEco Studio to query the directory.) 1092. In the SDK directory, go to the **Toolchains** > {Version} > **lib** directory and open the **UnsgnedReleasedProfileTemplate.json** file. 1103. Modify the related fields as required. 111 112After modifying the configuration file, [sign the application](hapsigntool-guidelines.md). 113