## 5 Privileged Account Management Subsystem
### Application-Access Process  
The application-access process is the interaction between the applications and databases on the cloud platform. As with the user access process, administrators need to register accounts of the database and fingerprint of applications at first. The specific process is shown in Figure 7: (1) When an application initializes the connection to a database on the cloud platform, Custom Middleware extracts the fingerprint of this application; (2) Custom Middleware submits the fingerprint to the account-password management module to authenticate the application; (3) The authentication function verifies the fingerprint and returns the token of this application; (4) Custom Middleware requests the password of the database with the token; (5) The password management checks the token and returns the password; (6) Custom Middleware establishes a connection between the application and the database with the database password.  
Custom Middleware is deployed on the application server and is the key module. In the application-access process, Custom Middleware is used to authenticate applications' identity with the account-password management module and to establish a connection between the application and database. In the design of Custom Middleware, we considered two aspects of security: first, once the application code is leaked, the hacker can extract the authentication credentials stored in the clear text in the application; secondly, when the SA-UBA is attacked, hackers can reverse analyze the custom middleware code and forge authentication requests. Therefore, this paper adopts the following two defense methods:  
**Hard-coded Elimination.** The connection between the application and the database is usually executed through the database-driver. To establish a connection by database-driver, an application needs to store their credentials and submits the credentials to the database for initializing the connection. Once the credential is revealed during the communication, the attacker can use it to access the database and steal data. To solve this security issue, the hard-coded elimination function rewrites the database-driver replacing the credential with the dynamic password generated by the account-password management module. If the password is leaked, the password rotation function can change the password in time to prevent the attackers from accessing the database.  
**Code Obfuscation.** If the attackers set reverse engineering on to the custom middleware, authentication and password retrieval requests may be forged. To prevent this attack, code obfuscation is used with the database-driver. The code obfuscation method used in this article is as follows [28]: 1. Layout Transformations: Removing comments and formatting and jumbling the identifiers; 2. Control Flow Transformations: Transforming the control flow of the database-driven program. Execution includes aggregating uncorrelated computations and creating randomization in the order of expressions, statements, and loops. 3. Data Abstraction Transformations: Changing the name, inheritance relations, or the structure of data arrays to obfuscate data abstractions.