Revert "feat: 添加D-Bus调用者白名单鉴权机制,org.deepin.dde.LocaleHelper1设置语言" - #201
Revert "feat: 添加D-Bus调用者白名单鉴权机制,org.deepin.dde.LocaleHelper1设置语言"#201fly602 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR reverts the previously added D-Bus caller whitelist mechanism for org.deepin.dde.LocaleHelper1, removing the allow-caller registry, its D-Bus method and related configuration, and restoring direct Polkit-based authorization for locale changes. Sequence diagram for updated SetLocale authorization via PolkitsequenceDiagram
actor Caller
participant LocaleHelperHelper as Helper
participant PolkitAuthority as polkit.Authority
Caller->>LocaleHelperHelper: SetLocale(locale)
LocaleHelperHelper->>LocaleHelperHelper: service.DelayAutoQuit()
LocaleHelperHelper->>PolkitAuthority: checkAuth(sender)
PolkitAuthority-->>LocaleHelperHelper: ok, err
LocaleHelperHelper->>LocaleHelperHelper: logger.Debug("---Auth ret", ok, err)
alt [!ok or err != nil]
LocaleHelperHelper-->>Caller: dbusutil.ToError(errAuthFailed)
else [authorized]
LocaleHelperHelper-->>Caller: success (locale set)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:40分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 --- a/misc/polkit-action/org.deepin.dde.locale-helper.policy.in
+++ b/misc/polkit-action/org.deepin.dde.locale-helper.policy.in
@@ -12,7 +12,7 @@
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
- <allow_active>yes</allow_active>
+ <allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
</policyconfig> |
|
@fly602: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
1. Add processStartTime function field to allowCallerRegistry struct. 2. Default to getProcessStartTime in newAllowCallerRegistryWithConfig. 3. Replace direct getProcessStartTime calls with r.processStartTime. 4. Set mock processStartTime in tests that use non-existent PIDs. Log: Test-only fix; no functional change Influence: 1. Verify all authorizeRegistrar and addCaller tests pass without /proc access. fix: 将 getProcessStartTime 改为可 mock 结构体字段,修复测试 1. 在 allowCallerRegistry 中添加 processStartTime 函数字段。 2. newAllowCallerRegistryWithConfig 默认赋值为 getProcessStartTime。 3. authorizeRegistrar 中两处调用改为 r.processStartTime。 4. 测试用例设置 mock 返回固定值,避免依赖 /proc。 Log: 仅测试修复,无功能变更 Influence: 1. 验证所有 authorizeRegistrar 和 addCaller 测试无需 /proc 即可通过。
This reverts commit 062dd62.
回退 security-loader 安全启动方案及其相关提交,包括:
集成 security-loader 及 AllowCaller 权限控制、LocaleHelper接口的鉴权改造、polkit 提权回退机制
原因
该方案影响范围过广,涉及 dde-session-daemon、langselector、polkit 策略、systemd 服务等多处改动,且与 V25 项目当前架构存在不匹配之处,不适合在此阶段落地。如果上层应用适配会影响其项目架构。
后续计划
需重新评估安全方案的整体设计,制定更契合 V25 架构的分阶段实施方案。
Summary by Sourcery
Revert the D-Bus caller whitelist authorization mechanism for locale-helper and return to direct Polkit authorization.
Enhancements:
Chores:
Summary by Sourcery
Improve process identity validation in allow-caller authorization by making process start-time checks injectable.
Enhancements:
Tests: