Gate operator reports behind their own grant
Operator report screenshots are an uncontrolled capture of whatever was on the operator's screen when they filed the report, so they can carry part numbers, customer names, or other shopfloor content. The rest of endpoints.view is uniform machine-collected telemetry. Reading a PC's CPU load does not imply a right to read someone's screen, so the reports and their images move to endpoints.operatorreports. The image route is the real control point, not the panel: the panel only decides whether a tab is drawn, while the bytes stay reachable by URL to anyone who can guess an id. Both GET routes now require the new grant. Migration 7d47 backfills the grant to everyone holding endpoints.view so nobody loses a panel they were already using; tightening from there is a per-account decision in the user editor. The grant is in the scope denylist, so it is a per-user direct grant and Reporter cannot hold it. Also adds test_user_editor_checkboxes_match_the_server_action_list. The SCOPE_ENDPOINT_ACTIONS comment claimed a sync guard kept the Vue checkbox list aligned with the Python tuple, but no such test existed. The lists had already drifted: endpoints.operatorreports reached a running container with no way to grant it through the UI. The guard catches drift in both directions - a name only in Python ships the feature dark, and a name only in Vue is worse, since the admin ticks a box and believes access was granted while the server refuses to store it.
This commit is contained in:
@@ -177,6 +177,16 @@ class EndpointsPlugin(BasePlugin):
|
||||
# shop-floor PC is a heavier grant than reading its telemetry.
|
||||
('endpoints.command',
|
||||
'Send allowlisted commands to endpoint agents', 'endpoints'),
|
||||
# Operator-submitted issue reports and their screenshots. Separate
|
||||
# from endpoints.view because the screenshot is whatever was on the
|
||||
# operator's screen when they hit report: it can carry part numbers,
|
||||
# customer names or other shopfloor content that reading telemetry
|
||||
# does not imply a right to see. Telemetry is machine-collected and
|
||||
# uniform; this is an uncontrolled human capture, so it is its own
|
||||
# grant rather than a facet of endpoints.view.
|
||||
('endpoints.operatorreports',
|
||||
'View operator-submitted reports and their screenshots',
|
||||
'endpoints'),
|
||||
# Elevated grant for destructive endpoint actions (system_restart).
|
||||
# Required IN ADDITION to endpoints.command by the enqueue route, so a
|
||||
# remote reboot is a strictly heavier grant than a routine toggle.
|
||||
@@ -702,6 +712,11 @@ class EndpointsPlugin(BasePlugin):
|
||||
'empty': 'No operator reports for this endpoint.',
|
||||
'position': 18,
|
||||
'group': 'reports',
|
||||
# Not endpoints.view: the screenshots can carry shopfloor
|
||||
# content that reading telemetry does not imply a right to see.
|
||||
# The panel route and the image route re-check this server-side;
|
||||
# withholding the declaration only keeps the tab from appearing.
|
||||
'permission': 'endpoints.operatorreports',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user