diff --git a/README.md b/README.md index d6efea0..9c82ed6 100755 --- a/README.md +++ b/README.md @@ -1,36 +1,63 @@ -# useriam_useridm - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request +# User Identity Management (useridm) -#### Gitee Feature -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +## Introduction + +As a basic component of the Identity & Access Management (IAM) subsystem, User Identity Management (useridm) provides a unified interface for managing user credential information in the system and invokes authentication resources through the authentication executor management module to implement lifecycle management and secure storage of user credentials. + +**Figure 1 User identity credential management architecture + +useridm_architecture + +## Directory Structure + +```undefined +//base/user_iam/user_idm +├── frameworks # Framework code +├── interfaces # Directory for storing external interfaces +│ └── innerkits # Header files exposed to the internal subsystem +├── sa_profile # Profile of the Service Ability +├── services # Implementation of Service Ability services +├── unittest # Directory for storing test code +├── utils # Directory for storing utility code +├── bundle.json # Component description file +└── useridm.gni # Build configuration +``` + + +## Usage + +### Available APIs + +**Table 1 ** APIs for managing user credentials + +| API | Description | +| ------ | -------------------------------- | +| addCredential(credentialInfo : CredentialInfo, callback : IIdmCallback) : void; | Adds a user credential.| +| updateCredential(credentialInfo:CredentialInfo, callback:IIdmCallback) : void; | Updates a user credential.| +| delUser(token : Uint8Array, callback : IIdmCallback) : void; | Deletes a user password. When a user password is deleted, all authentication credentials of the user are also deleted.| +| delCred(credentialId : Uint8Array, token : Uint8Array, callback : IIdmCallback) : void; | Deletes a user credential.| + +**Table 2** API for querying user credential information + +| API| Description | +| ------ | -------------------------------- | +| getAuthInfo(callback : AsyncCallback>,authType? : AuthType) : void; | Obtains one or all types of authentication credentials of a user.| + +### Usage Guidelines + +- The APIs defined in the header file ```common\interface\useridm_interface.h``` in the [useriam_auth_executor_mgr](https://gitee.com/openharmony-sig/useriam_coauth) repository must be implemented in a Trusted Execution Environment (TEE). In addition, the association between the user credentials and user IDs should not be tampered with, and unified user authentication must be supported. +- During the adaptation, vendors can refer to the software implementation of related functions provided by the OpenHarmony framework. + +## Repositories Involved + +[useriam_auth_executor_mgr](https://gitee.com/openharmony-sig/useriam_coauth) + +**[useriam_user_idm](https://gitee.com/openharmony-sig/useriam_useridm)** + +[useriam_user_auth](https://gitee.com/openharmony-sig/useriam_userauth) + +[useriam_pin_auth](https://gitee.com/openharmony-sig/useriam_pinauth) + +[useriam_faceauth](https://gitee.com/openharmony/useriam_faceauth) diff --git a/figures/useridm_architecture.png b/figures/useridm_architecture.png new file mode 100644 index 0000000..e9964bc Binary files /dev/null and b/figures/useridm_architecture.png differ