cloudfoundry / cloudfoundry/cloud_controller_ng

Route destination operations should require write permissions in the app's space

Open
#5,285 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
207
Forks
373
Avg merge
2d 12h
Merged PRs (30d)
56

Description

Issue

Currently, the permission model for route destination operations is inconsistent with respect to the app's space. The table below shows which roles in the app's space/org are sufficient (assuming the user already has space_developer in the route's space and the route has been explicitly shared with the app's space):

Role in app's space/org Add destination Replace destinations Update destination Delete destination
space_developer
space_supporter
space_manager
space_auditor
org_manager
org_auditor
org_billing_manager
no role
admin
admin_read_only
global_auditor

Three problems stand out:

  1. Add/Replace: read-only roles (space_manager, space_auditor, org_manager) are sufficient to wire up routing to an app they cannot write to.
  2. Update/Delete: no role in the app's space is required at all — any user with write access to the route's space can modify or remove destinations regardless of which space the app lives in.
  3. admin_read_only and global_auditor: these read-only global roles can perform all four mutating operations, which contradicts their intended purpose.
Context

No response

Steps to Reproduce

see #5284

Expected Result

No response

Current Result

No response

Possible Fix

Proposed change: All four operations should require space_developer or space_supporter in the app's space. Only admin should be exempt as the global write role.
admin_read_only and global_auditor should be denied just like any other role without write access to the app's space.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the route destination operations referenced in #5284: add destination, replace destinations, update destination, and delete destination. Trace their authorization checks and existing permission coverage, then verify that all four require space_developer or space_supporter in the app's space, with only admin exempt and read-only global roles denied.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, authorization, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.