CI Number
No response
Duplicates
Latest version
Describe the issue
A user who belongs only to a no_group group (no site membership, empty global permissions) can successfully call Content APIs that require content_read. Those endpoints return HTTP 200 with content data instead of HTTP 403 Unauthorized.
This happens because Editorial site permission-mappings-config.xml includes a wildcard role:
<role name="*">
<rule regex=".*">
<allowed-permissions>
<permission>content_read</permission>
<permission>content_search</permission>
<permission>get_children</permission>
<!-- also: s3_read, webdav_read, list_plugins, publish_status -->
</allowed-permissions>
</rule>
</role>
That * role grants baseline read permissions to any authenticated user, even when they are not a member of the site and have no mapped site role. Mutating Content APIs (write/delete/lock/move/etc.) correctly return 403 for the same user.
Affected endpoints (require content_read, return 200 unexpectedly):
- GET /studio/api/2/content/descriptor
- GET /studio/api/2/content/item_by_path
- POST /studio/api/2/content/sandbox_items_by_path
- POST /studio/api/2/content/{siteId}/children
- GET /studio/api/2/content/item_history
- GET /studio/api/2/content/list_quick_create_content
- POST /studio/api/2/content/get_delete_package
- GET /studio/api/2/content/get_content_by_commit_id
- GET /studio/api/2/content/exists
- GET /studio/api/2/content/{siteId}/history
Steps to reproduce
Steps:
- In
crafter-authoring/data/repos/global/configuration/global-role-mappings-config.xml, add a no_group role mapping:
<group name="no_group">
<role>no_group</role>
</group>
- In
crafter-authoring/data/repos/global/configuration/global-permission-mappings-config.xml, add an empty permission mapping for that role:
<role name="no_group">
<rule regex="/.*">
<allowed-permissions>
</allowed-permissions>
</rule>
</role>
- Create a
no_group group in Studio.
- Create a user and assign it only to the
no_group group (no site groups / no site membership).
- Authenticate as that user (session or access token).
- Call any of the Content APIs listed above against an existing site (e.g. Editorial), using a valid
siteId and path such as /site/website/index.xml.
- Observe the response: HTTP 200 with content/data, instead of HTTP 403 Unauthorized.
Relevant log output
Screenshots and/or videos
No response
CI Number
No response
Duplicates
Latest version
Describe the issue
A user who belongs only to a
no_groupgroup (no site membership, empty global permissions) can successfully call Content APIs that requirecontent_read. Those endpoints return HTTP 200 with content data instead of HTTP 403 Unauthorized.This happens because Editorial site permission-mappings-config.xml includes a wildcard role:
That
*role grants baseline read permissions to any authenticated user, even when they are not a member of the site and have no mapped site role. Mutating Content APIs (write/delete/lock/move/etc.) correctly return 403 for the same user.Affected endpoints (require
content_read, return 200 unexpectedly):Steps to reproduce
Steps:
crafter-authoring/data/repos/global/configuration/global-role-mappings-config.xml, add ano_grouprole mapping:crafter-authoring/data/repos/global/configuration/global-permission-mappings-config.xml, add an empty permission mapping for that role:no_groupgroup in Studio.no_groupgroup (no site groups / no site membership).siteIdand path such as/site/website/index.xml.Relevant log output
Screenshots and/or videos
No response