Skip to content

Enforce UserWriteMask for special attribute writes#1750

Merged
kevinherron merged 3 commits into
eclipse-milo:mainfrom
kevinherron:codex/propose-fix-for-userwritemask-bypass
May 17, 2026
Merged

Enforce UserWriteMask for special attribute writes#1750
kevinherron merged 3 commits into
eclipse-milo:mainfrom
kevinherron:codex/propose-fix-for-userwritemask-bypass

Conversation

@kevinherron

Copy link
Copy Markdown
Contributor

Motivation

  • Fix a privilege escalation where writes to authorization-relevant attributes could bypass per-user UserWriteMask checks for RolePermissions and Historizing attributes.
  • Prevent an unchecked IllegalArgumentException path when UserRolePermissions is evaluated by WriteMask.forAttribute.

Description

  • Apply the UserWriteMask check to all non-Value attribute writes before running the special-case RolePermissions and Historizing role-permission checks in DefaultAccessController.
  • Treat UserRolePermissions as explicitly denied during the UserWriteMask evaluation (exclude it from the WriteMask.forAttribute lookup) so it cannot trigger WriteMask.forAttribute's default exception while preserving non-writability semantics.
  • Retain the existing role-permission checks for RolePermissions and Historizing after the UserWriteMask check and short-circuit further checks when UserWriteMask denies access.
  • Add regression tests in DefaultAccessControllerTest that cover denial and allowance scenarios for RolePermissions, Historizing, and UserRolePermissions w.r.t. UserWriteMask.

Codex Task

kevinherron and others added 3 commits May 17, 2026 12:27
…-userwritemask-bypass

# Conflicts:
#	opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/servicesets/impl/DefaultAccessController.java

Co-authored-by: kevinherron <340273+kevinherron@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kevinherron/milo/sessions/a7c23c2b-bcfe-4c11-a4c8-a56cc8d388b3

Co-authored-by: kevinherron <340273+kevinherron@users.noreply.github.com>
@kevinherron kevinherron added this to the 1.1.4 milestone May 17, 2026
@kevinherron kevinherron changed the title Codex/propose fix for userwritemask bypass Enforce UserWriteMask for special attribute writes May 17, 2026
@kevinherron kevinherron merged commit 69e77fa into eclipse-milo:main May 17, 2026
3 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.

2 participants