Skip to content

Gate POST /api/v1/publishing/retry and /push with requiredPortlet("publishing-queue") #36414

Description

@hmoreras

Description

Two state-changing endpoints on PublishingResource currently authenticate the backend user but do not check portlet access:

  • POST /api/v1/publishing/retry — re-queues one or more bundles for publishing
  • POST /api/v1/publishing/push/{bundleId} — schedules a bundle push to one or more environments

Their sibling destructive endpoints already gate on requiredPortlet("publishing-queue"):

  • DELETE /api/v1/publishing/{bundleId}PublishingResource.java:489
  • DELETE /api/v1/publishing/purgePublishingResource.java:954

Impact: any authenticated backend user (even one whose role is intentionally denied access to the Publishing Queue portlet in the admin UI) can call these two endpoints directly via curl / Postman / the browser console and cause real push work to fire on remote environments.

The fix is one line per endpoint — add .requiredPortlet("publishing-queue") to the WebResource.InitBuilder chain. But it needs a team review first because it narrows access for the small set of backend users who have API access but no explicit Publishing Queue portlet grant.

Acceptance Criteria

To be refined. (Quick draft — details to be added after team confirms scope.)

  • Confirm with team whether narrowing access via portlet gate is the correct behavior
  • Add .requiredPortlet("publishing-queue") to retryBundles (PublishingResource.java:602) and pushBundle (:760) if approved
  • Update Postman coverage to assert 403 for a user without the portlet grant

Priority

Medium — no known exploit path from the shipped UI (the UI only reaches these endpoints from the portlet the user already has access to). This closes a defense-in-depth gap for direct API callers.

Additional Context

The inconsistency was surfaced during code review of the Publishing Queue Angular migration.

Metadata

Metadata

Assignees

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions