• Home
Name Date Size #Lines LOC

..--

common/12-May-2024-352195

figures/12-May-2024-

frameworks/12-May-2024-897638

sa_profile/12-May-2024-3330

services/12-May-2024-1,8641,333

services_ex/12-May-2024-1,152860

test/12-May-2024-3,3132,512

ui/Settings_FaceAuth/12-May-2024-2,5902,186

.clang-formatD12-May-20243.9 KiB140138

.gitattributesD12-May-202457 74

.gitignoreD12-May-20248 21

CODEOWNERSD12-May-2024753 1614

LICENSED12-May-20249.9 KiB177150

OAT.xmlD12-May-20241.2 KiB2811

README.mdD12-May-20242.6 KiB5233

README_ZH.mdD12-May-20242.6 KiB5535

bundle.jsonD12-May-20241.6 KiB6261

README.md

1# Face Authentication
2
3## Introduction
4
5Face authentication (faceauth) supports enrollment, deletion, and authentication of user faces.
6
7faceauth is a biometric authentication executor supported by OpenHarmony. It registers face authentication resource information with the collaborative authentication framework through the interface defined by collaborative authentication. The collaborative authentication framework calls faceauth HDI interfaces to enroll or delete facial credentials and perform face authentication.
8
9**Figure 1** Face authentication architecture
10
11![](figures/faceauth_architecture.png)
12
13Facial data is important biometric information of users. The following security measures are taken to protect the facial data during the authentication process:
14
151. Permission management: High-level permissions are defined for face enrollment and deletion APIs, which can be called only by system applications.
161. Secure storage and comparison of facial data: The faceauth HDI provides adaptation interfaces for device vendors. Device vendors can implement secure facial data comparison and storage in a trusted execution environment (TEE).
17
18> **NOTE**
19>
20>  The OpenHarmony open-source framework provides stub implementation for face authentication, but does not include secure storage and comparison of face data in a TEE.
21
22# Directory Structure
23
24```
25//base/useriam/face_auth
26├── bundle.json            # Module description file
27├── common                 # Common files
28├── figures                # Figures used in the README
29├── frameworks             # Framework code
30├── interfaces             # External APIs
31│   └── inner_api          # Header file exposed to internal subsystems for system services
32├── sa_profile             # Service ability profile
33├── services               # Service ability implementation
34└── ui                     # User interface for face enrollment
35```
36
37## Usage
38
39Device vendors need to implement the APIs defined in the IDL file **//drivers/interface/faceauth**. This IDL file provides stub implementation of APIs. The extraction, comparison, storage, and enrollment of facial data must be implemented in a secure environment (TEE or secure chipset) to ensure the highest security level in the system.
40
41## Repositories Involved
42
43[useriam_user_auth_framework](https://gitee.com/openharmony/useriam_user_auth_framework)
44
45[useriam_pin_auth](https://gitee.com/openharmony/useriam_pin_auth)
46
47**[useriam_face_auth](https://gitee.com/openharmony/useriam_face_auth)**
48
49[drivers_interface](https://gitee.com/openharmony/drivers_interface)
50
51[drivers_peripheral](https://gitee.com/openharmony/drivers_peripheral)
52

README_ZH.md

1# 人脸认证组件
2
3- [简介](#简介)
4- [目录](#目录)
5- [使用说明](#使用说明)
6- [相关仓](#相关仓)
7
8## 简介
9
10**人脸认证** (faceauth)支持用户人脸的录入,删除和认证功能。
11
12人脸认证是OpenHarmony支持的一种生物认证执行器,按照协同认证定义的资源注册接口,将人脸认证相关资源信息注册到协同认证框架,并根据协同认证框架的调度,调用人脸认证HDI,完成人脸的录入,认证,删除等功能。
13
14**图1** 人脸认证架构图
15
16<img src="figures/faceauth_architecture_ZH.png" alt="口令认证架构图" />
17
18人脸数据是用户的重要生物识别信息,在人脸认证的处理过程中,我们对用户输入的人脸数据实施了如下安全保护措施:
19
201. 管理权限:人脸的录入和删除流程定义了较高的访问权限,仅允许系统应用调用。
211. 人脸数据安全存储和比对:人脸认证HDI中定义了南向厂商适配的接口,南向厂商可以自行在可信执行环境内完成人脸数据的安全存储和比对。<sup>注1</sup>
22
23*注1:OpenHarmony开源框架内提供了人脸认证的桩实现,未包含可信执行环境内完成人脸数据的安全存储和比对。*
24
25## 目录
26
27```
28//base/useriam/face_auth
29├── bundle.json              # 组件描述文件
30├── common                   # 组件公共文件
31├── figures                  # README使用的图片
32├── frameworks               # 框架代码
33├── interfaces               # 对外接口存放目录
34│   └── inner_api            # 对内部子系统暴露的头文件,供系统服务使用
35├── sa_profile               # Service Ability 配置文件
36├── services                 # Service Ability 服务实现
37└── ui                       # 人脸录入界面实现
38```
39
40## 使用说明
41
42* 南向厂商适配人脸认证功能时,需实现IDL文件`//drivers/interface/faceauth` 中定义的接口,`//drivers/peripheral/faceauth`提供了接口的桩实现,供开发过程参考。人脸数据的提取、比对、存储和录入等过程应在尽可能安全的环境中实现,保证用户人脸数据的的安全保护达到系统内可以提供的最高安全级别(可信执行环境/安全芯片)。
43
44## 相关仓
45
46[useriam_user_auth_framework](https://gitee.com/openharmony/useriam_user_auth_framework)
47
48[useriam_pin_auth](https://gitee.com/openharmony/useriam_pin_auth)
49
50**[useriam_face_auth](https://gitee.com/openharmony/useriam_face_auth)**
51
52[drivers_interface](https://gitee.com/openharmony/drivers_interface)
53
54[drivers_peripheral](https://gitee.com/openharmony/drivers_peripheral)
55