| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
代码排查整改 Signed-off-by: lidezhi <lidezhi16@h-partners.com> Change-Id: I36c0e9150fdf932b0e947bb18d656600d152324a | 10 个月前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
fix Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[0%] | 27 天前 | |
fix Signed-off-by: liuziwei <liuziwei12@huawei.com> | 1 年前 | |
fix : companion auth Signed-off-by: hejiaogirl <hejiao@huawei.com> | 16 天前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
fix code Signed-off-by: liuziwei <liuziwei12@huawei.com> | 2 年前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
widget support companion device auth Signed-off-by: wangxu43 <wangxu43@huawei.com> Change-Id: Ib3cf043457a5c4ef364c87a2e5cf5953d2dd1d4a | 2 个月前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
widget support companion device auth Signed-off-by: wangxu43 <wangxu43@huawei.com> Change-Id: Ib3cf043457a5c4ef364c87a2e5cf5953d2dd1d4a | 2 个月前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
private pin Signed-off-by: 李永飞 <liyongfei13@h-partners.com> Change-Id: Iefdb1537e2462a8bafb9ece04566b5619b78aa5e | 1 年前 | |
private pin Signed-off-by: 李永飞 <liyongfei13@h-partners.com> Change-Id: Iefdb1537e2462a8bafb9ece04566b5619b78aa5e | 1 年前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
FIX Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 27 天前 | |
fix Signed-off-by: liyongfei <liyongfei13@h-partners.com> Change-Id: Ie83aa6b4f2873e76367f464c1c73efd89fb566b2 | 2 年前 | |
fix Signed-off-by: liyongfei <liyongfei13@h-partners.com> Change-Id: I22c288f0e7c1eeee8546969ec2cf43d237103c8b | 2 年前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
fix : 96 hour pin reset Signed-off-by: hejiaogirl <hejiao@huawei.com> Change-Id: Ica2ea5dbb93d640143b4bdbb8b12a0502aae3113 | 1 年前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
feat: add user auth engine abstraction layer Introduce an IUserAuthEngine interface between the userauth service and the auth execution backend so core/context/ipc/load_mode no longer depend on HDI types. Service layers use Eng* DTO types and ResultCode; all HDI/HDF dependencies consolidate into the engine source_set, and HDF codes convert to ResultCode at the engine boundary. The default HdiEngineImpl forwards to the user_auth HDI driver; a TEE Trust Application backend can be linked in instead. Backend status subscription and dynamic load/unload move into the engine. Rename INVALID_HDI_INTERFACE (1006) to ENGINE_UNAVAILABLE to distinguish a down backend from a generic error while keeping the numeric IPC code unchanged. Keep the engine DTO header free of engine internals by dropping the unused accesstoken_kit.h include. The client impl headers drop the legacy user_auth_types.h HDI include; user_auth_napi_client_impl.h keeps a reference to the engine DTO header where its types are referenced. Move the HDI external_deps (libuser_auth_proxy, hdf_core) and hdi_wrapper into the engine source_set so it is link-self-contained; the engine target reaches services/base headers via include_dirs. Move EnrolledInfo to iam_common_defines.h to drop the engine DTO's reverse dependency on the client defines header. Address review findings on the abstraction: - Propagate the engine return code on the credential/user-management database paths (GetCredentialInfo, DeleteUser, DeleteUserEnforce, GetAllExtUserInfo, GetCredentialInfoById, ClearUnavailableCredential). The first four preserve the pre-abstraction IPC code 1006 (formerly returned as INVALID_HDI_INTERFACE); GetCredentialInfoById and ClearUnavailableCredential now return ENGINE_UNAVAILABLE (1006) instead of GENERAL_ERROR (2) when the backend is down -- callers branch only on ret != SUCCESS, so behavior is unchanged. - Fix an uninitialized-read UB in AuthenticationImpl::Update by returning early when the engine call fails, instead of reading the unfilled result struct. - Copy the GlobalConfigValue union by its active member (enableStatus / pinExpiredPeriod) instead of always copying the inactive pinExpiredPeriod. - Restore an explicit ATokenType->EngCallerType mapping (new EngCallerType enum) so the callerType value no longer relies on ATokenType numerics coinciding with the driver contract. - Document the low bug-finding ROI of hdiwrapper_fuzzer. Add engine fuzz harnesses and align unit tests with the new types and ResultCode expectations. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] Change-Id: Ida34723771373f77d8b70febc5e26f408ca6582c Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> | 4 天前 | |
Merge branch 'master' of git@gitcode.com:liuhahaofe/useriam_user_auth_framework_test.git into 'master' # Conflicts: # conflict services/core/inc/widget_schedule_node.h # conflict services/core/src/widget_schedule_node_impl.cpp # conflict test/unittest/services/src/widget_schedule_node_impl_test.cpp | 4 天前 | |
fix Signed-off-by: l00678218 <liuziwei12@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] | 4 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 27 天前 | ||
| 4 天前 | ||
| 10 个月前 | ||
| 4 天前 | ||
| 27 天前 | ||
| 27 天前 | ||
| 27 天前 | ||
| 1 年前 | ||
| 16 天前 | ||
| 27 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 27 天前 | ||
| 2 年前 | ||
| 27 天前 | ||
| 27 天前 | ||
| 2 个月前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 2 个月前 | ||
| 27 天前 | ||
| 27 天前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 27 天前 | ||
| 27 天前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 4 天前 | ||
| 1 年前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 | ||
| 4 天前 |