cloudfoundry / cloudfoundry/cloud_controller_ng
Variable behavior in accessing service plans in v2 depending on endpoint
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 207
- Forks
- 373
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 56
Description
Issue
Variable behavior in accessing service plans in v2 depending on endpoint
Steps to Reproduce
- Target space alice
- Enable a service offering. This should create a service plan. Lets call this plan bob.
- Create a service instance of bob
- Change the visibility of bob to
public: false - Log in as a space dev
- query /v2/service_plans | [grep bob.guid] and get no results
- query /v2/spaces/[alice.guid]/summary and get:
cf curl /v2/spaces/33666dbb-0bcb-4372-8078-0c53746072c0/summary
{
"guid": "33666dbb-0bcb-4372-8078-0c53746072c0",
"name": "alice",
"services": [
{
"guid": "8648f264-9a45-40a7-b31f-6538eb0f9f2c",
"name": "bob's service offering",
...
"service_plan": {
"guid": "ba65e2e1-a784-44cd-9da6-2145bb9297e1",
"name": "bob",
"maintenance_info": {
"version": "1.0.0"
},
}
}
]
}
- query
/v2/service_plans/[bob.guid]and see bob
Current behavior
In the services list endpoint we are not able to see bob
in the service get and space summary endpoints we are able to see bob
Expected behavior
I would argue that theres no security risk allowing space devs to read service plans that are being used in the space. I would like to see v2/service_plans show bob.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the discrepancy using /v2/service_plans, /v2/service_plans/[bob.guid], and /v2/spaces/[alice.guid]/summary with a private plan used in the space. Trace the endpoint authorization and visibility filtering, then make the service-plans list behavior consistent with the expected access for space developers. Confirm the result with endpoint-level tests covering private plans in use.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100