1e41f4b71Sopenharmony_ci# Introduction to the DLP Service
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciThe Data Loss Prevention (DLP) service is a system-level solution provided to prevent data disclosure. It provides capabilities for cross-device file access management, encrypted storage, and access authorization. The data owner can grant the permission (read only, edit, or full control) on a confidential file based on account authentication. The confidential file is encrypted and stored in ciphertext. Only the user who has passed the device-cloud authentication using a DLP-capable device can access or modify the file.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ciDLP is a system solution. You can implement complete DLP capabilities with little or no adaptation.
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciThe DLP solution consists of the following components:
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci- DLP permission management service
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci  Implements functionalities, such as creating a sandbox app and exchanging credentials.
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci- DLP permission manager app
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci  Implements functionalities of setting and verifying permissions and rejecting access requests locally. It implements the controlled share that can be perceived by users.
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci- Cloud module (implemented by developers)
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci  Sends DLP certificates to the cloud for account-based authentication, generates certificates, and decrypts the DLP files.
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci## Working Principles
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci![](figures/dlp-intro.png)
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci**Generating a DLP File**
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci1. The file owner adds the accounts that can access the confidential file and sets the permissions for the file through the DLP permission manager app.
28e41f4b71Sopenharmony_ci2. The DLP permission manager app sends the user permission configuration to the DLP permission management service, which encapsulates the configuration into policy information.
29e41f4b71Sopenharmony_ci3. The DLP permission management service sends the policy information to the cloud module. The cloud module sends the policy information for device-cloud synergy authentication, checks the policy, and generates and issues the credential.
30e41f4b71Sopenharmony_ci4. The cloud module sends the credential to the DLP permission management service through the DLP permission manager app.
31e41f4b71Sopenharmony_ci5. The DLP permission manager app encrypts the file and packages the credential and ciphertext into a DLP file.
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci**Transferring a DLP File**
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci6. The DLP files can be sent to target users in any way. The ciphertext ensures file confidentiality.
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci**Opening a DLP File**
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci7. The authorized user opens the DLP file on the remote device (for example, using the file manager).
40e41f4b71Sopenharmony_ci8. The DLP permission manager app parses the DLP file, obtains the encrypted credential, and sends it to the DLP permission management service.
41e41f4b71Sopenharmony_ci9. The DLP permission management service sends the encrypted credential to the cloud module. The cloud module sends the credential to the cloud for identity authentication, credential verification, and policy parsing, and obtains the authorization policy and encryption key.
42e41f4b71Sopenharmony_ci10. The cloud module sends the permission policy and encryption key to the DLP permission manager app through the DLP permission management service.
43e41f4b71Sopenharmony_ci11. The DLP permission manager app invokes the DLP permission management service to install a DLP sandbox app for the app and perform access control based on the authorization.
44e41f4b71Sopenharmony_ci12. The DLP permission manager app uses a link mechanism to map the plaintext and ciphertext. Based on the open-source Filesystem in Userspace (FUSE), the link mechanism creates a virtual link file (which is mapped to the DLP file) and shares the link file to the app. The app can access and edit the plaintext file, and the operations are synchronized to the DLP file in real time.
45e41f4b71Sopenharmony_ci13. When the DLP permission manager app is ready, it starts the sandbox app and transfers the link file descriptor. The sandbox app starts, and the app process opens the link file.
46