| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: use caller identity for skill target permission verification When launching target ServiceExtension or UIAbility through skill execution, use the real caller's tokenId for permission verification instead of aimgr's SA identity. This avoids bypassing all permission checks and eliminates the need to grant extra permissions to aimgr. - Add SKILL_EXECUTE_PARAM_CALLER_TOKEN_ID Want parameter key - Pass callerTokenId via Want from ExecuteInAppSkill(withTokenId) - CheckStaticCfgPermission: detect skill path, skip SA shortcut, verify permissions using caller's tokenId - Derive callerUid from callerTokenId inside launch functions via GetHapTokenInfo, no extra function parameters needed Change-Id: I0f871ce89953afc3cf69548b75d125cee3ede5d1 Signed-off-by: RuiChen_01 <chenrui193@huawei.com> Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> | 1 个月前 | |
change external_deps to deps Co-Authored-By: manual Signed-off-by: zhongshield1 <zhangzezhong8@huawei-partners.com> | 1 个月前 | |
test(skill): cover NotifySkillFunctionInvoked across proxy/stub/service NotifySkillFunctionInvoked was added in b4ccd724bc but had no unit test coverage on the AMS side. Add tests at three layers: - Proxy (ability_manager_proxy_sixth_test): two SendRequest outcomes plus a null-token path to lock the IPC marshalling contract. - Stub (ability_manager_stub_test): valid token dispatches to the service; null token is rejected with ERR_INVALID_VALUE before any business logic runs. Adds NotifySkillFunctionInvoked mock to the stub mock header. - Service (ability_manager_service_eleven_test): null token returns ERR_INVALID_VALUE; non-self caller (JudgeSelfCalled fails) returns CHECK_PERMISSION_FAILED, guarding the permission boundary that protects OnLaunchCompleted from cross-caller abuse. Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> 🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%] Co-authored-by: claude (glm-5.2) <ai@local> | 6 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 6 天前 |