chore: enhance D-Bus service security configuration#104
chore: enhance D-Bus service security configuration#104deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
- Remove allow own from default policy, restrict to root only - Remove redundant interface-specific allow rules - Simplify configuration while maintaining functionality Log: Tighten D-Bus permissions by restricting service ownership to root user
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR tightens the D-Bus security policy for com.deepin.bootmaker by removing broad ownership and redundant interface-specific permissions, leaving a simpler configuration that still allows clients to send messages to the service while restricting bus name ownership to root (configured elsewhere). Sequence diagram for D-Bus message flow under tightened policysequenceDiagram
actor ClientApp
participant SystemBus
participant BootmakerService
Note over SystemBus,BootmakerService: BootmakerService owns com.deepin.bootmaker (root-only)
ClientApp->>SystemBus: Method call
Note over ClientApp,SystemBus: send_destination=com.deepin.bootmaker
SystemBus->>BootmakerService: Deliver method call
BootmakerService-->>SystemBus: Reply
SystemBus-->>ClientApp: Return result
Note over ClientApp,SystemBus: Client cannot own com.deepin.bootmaker (allow own removed)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The description mentions restricting service ownership to root, but this diff only removes the
<allow own>rule without adding a root-only policy block; verify that an explicit root-onlyallow ownis defined elsewhere or update the config here to reflect that intent. - Since the interface-specific
allowrules were removed as redundant, consider adding a brief inline comment near the remainingsend_destinationrule to clarify that it intentionally covers all interfaces for this service to avoid future reintroduction of per-interface rules.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The description mentions restricting service ownership to root, but this diff only removes the `<allow own>` rule without adding a root-only policy block; verify that an explicit root-only `allow own` is defined elsewhere or update the config here to reflect that intent.
- Since the interface-specific `allow` rules were removed as redundant, consider adding a brief inline comment near the remaining `send_destination` rule to clarify that it intentionally covers all interfaces for this service to avoid future reintroduction of per-interface rules.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
deepin pr auto review这段代码是对 D-Bus 系统服务配置文件 以下是对该 diff 的详细审查意见,分为语法逻辑、代码质量、代码性能和代码安全四个方面: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全 —— 重点关注
改进建议
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: itsXuSt, max-lvs 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 |
|
/merge |
|
This pr cannot be merged! (status: unstable) |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
Log: Tighten D-Bus permissions by restricting service ownership to root user
Summary by Sourcery
Tighten D-Bus configuration for the com.deepin.bootmaker service to reduce unnecessary permissions while preserving method access.
Enhancements: