Skip to content

feat: add polkit authorization for uadp manager methods#1177

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:release/2500from
52cyb:security2
Jul 17, 2026
Merged

feat: add polkit authorization for uadp manager methods#1177
deepin-bot[bot] merged 1 commit into
linuxdeepin:release/2500from
52cyb:security2

Conversation

@52cyb

@52cyb 52cyb commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
  1. Add polkit rules file allowing lightdm active sessions to call the uadp action without password
  2. Implement checkAuthorization function using polkit authority to verify caller authorization
  3. Add authorization checks to all sensitive uadp methods: ListName, Set, Get, Delete, Release
  4. Return empty results with authorization error when caller is not authorized

Log: Added polkit authorization protection for uadp manager operations

Influence:

  1. Test all uadp methods (ListName, Set, Get, Delete, Release) with unauthorized caller
  2. Verify lightdm active sessions can call methods without password prompt
  3. Test lightdm inactive sessions are denied access
  4. Verify polkit rules file is installed correctly
  5. Test normal user calls with proper authorization prompt
  6. Verify error handling when authorization is denied

feat: 为 uadp 管理器方法添加 polkit 授权

  1. 添加 polkit 规则文件,允许 lightdm 活跃会话无需密码调用 uadp 操作
  2. 实现 checkAuthorization 函数,使用 polkit 权限验证调用者授权
  3. 为所有敏感 uadp 方法添加授权检查:ListName、Set、Get、Delete、Release
  4. 当调用者未授权时返回空结果和授权错误

Log: 为 uadp 管理操作添加 polkit 授权保护

Influence:

  1. 使用未授权调用者测试所有 uadp 方法(ListName、Set、Get、Delete、 Release)
  2. 验证 lightdm 活跃会话可无需密码调用方法
  3. 测试 lightdm 非活跃会话被拒绝访问
  4. 验证 polkit 规则文件正确安装
  5. 测试普通用户调用时弹出授权提示
  6. 验证授权被拒绝时的错误处理

PMS: BUG-367555 BUG-367575
Change-Id: I5a77779ab915aaae8fca23c25fda3173752aa5e4 (cherry picked from commit fdfc101)

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @52cyb, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

Hi @52cyb. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 52cyb, fly602

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1. Add polkit rules file allowing lightdm active sessions to call the
uadp action without password
2. Implement checkAuthorization function using polkit authority to
verify caller authorization
3. Add authorization checks to all sensitive uadp methods: ListName,
Set, Get, Delete, Release
4. Return empty results with authorization error when caller is not
authorized

Log: Added polkit authorization protection for uadp manager operations

Influence:
1. Test all uadp methods (ListName, Set, Get, Delete, Release) with
unauthorized caller
2. Verify lightdm active sessions can call methods without password
prompt
3. Test lightdm inactive sessions are denied access
4. Verify polkit rules file is installed correctly
5. Test normal user calls with proper authorization prompt
6. Verify error handling when authorization is denied

feat: 为 uadp 管理器方法添加 polkit 授权

1. 添加 polkit 规则文件,允许 lightdm 活跃会话无需密码调用 uadp 操作
2. 实现 checkAuthorization 函数,使用 polkit 权限验证调用者授权
3. 为所有敏感 uadp 方法添加授权检查:ListName、Set、Get、Delete、Release
4. 当调用者未授权时返回空结果和授权错误

Log: 为 uadp 管理操作添加 polkit 授权保护

Influence:
1. 使用未授权调用者测试所有 uadp 方法(ListName、Set、Get、Delete、
Release)
2. 验证 lightdm 活跃会话可无需密码调用方法
3. 测试 lightdm 非活跃会话被拒绝访问
4. 验证 polkit 规则文件正确安装
5. 测试普通用户调用时弹出授权提示
6. 验证授权被拒绝时的错误处理

PMS: BUG-367555 BUG-367575
Change-Id: I5a77779ab915aaae8fca23c25fda3173752aa5e4
(cherry picked from commit fdfc101)
@52cyb

52cyb commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

This pr force merged! (status: unstable)

@deepin-bot
deepin-bot Bot merged commit e6c312a into linuxdeepin:release/2500 Jul 17, 2026
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants