Skip to content

Route services and user-provided services cannot be shared - #989

Merged
elenasharma merged 13 commits into
cloudfoundry:masterfrom
cloudfoundry-incubator:pr-service-instance-sharing-disable-sharing-route-services-or-user-provided-services
Nov 16, 2017
Merged

Route services and user-provided services cannot be shared#989
elenasharma merged 13 commits into
cloudfoundry:masterfrom
cloudfoundry-incubator:pr-service-instance-sharing-disable-sharing-route-services-or-user-provided-services

Conversation

@deniseyu

@deniseyu deniseyu commented Nov 10, 2017

Copy link
Copy Markdown
Contributor

As an app dev, I cannot share user provided services. #151997784

As an app dev, I cannot share a route service. #152036417

NOTE: This PR builds on top of #987, which should be merged first. The actual changes on top of #987 can be viewed in this diff.

What

This PR adds explicit error messages when a user attempts to share a user-provided service instance or a route service instance. In both cases, a 400 error will be returned, which is consistent with the error scenario where a user attempts to share a service instance that does not have the shareable flag set to true. Because some user-provided service instances can be route services, we check whether a service instance is a route service before checking whether it is user-provided in order to return the most descriptive error message.

Changes:

  • Raise 400 with 'Route services cannot be shared' when attempting to share route service
  • Raise 400 with 'User-Provided services cannot be shared' when attempting to share user-provided service

PR

  • I have viewed signed and have submitted the Contributor License Agreement
  • I have made this pull request to the master branch
  • I have run all the unit tests using bundle exec rake
  • I have run CF Acceptance Tests on bosh lite

Thanks, sapi

@cfdreddbot

Copy link
Copy Markdown

Hey deniseyu!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@cf-gitbot

Copy link
Copy Markdown

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/152760721

The labels on this github issue will be updated when the story is started.

@ablease
ablease force-pushed the pr-service-instance-sharing-disable-sharing-route-services-or-user-provided-services branch from b5e33f9 to dd88840 Compare November 14, 2017 10:39
Derik Evangelista and others added 13 commits November 16, 2017 16:38
* The broker can return a shareable field as part of the service metadata
response to /v2/catalog.

[#152540454]

Signed-off-by: Sam Gunaratne <sgunaratne@pivotal.io>
… instance

* This behaviour already existed, this commit just adds additional tests

[#150973376]

Signed-off-by: Denise Yu <dyu@pivotal.io>
* Only developers who have write access to the service instance
can perform an update.

[#150973390]

Signed-off-by: Derik Evangelista <devangelista@pivotal.io>
or unshare

[#151441010]

Signed-off-by: Denise Yu <dyu@pivotal.io>
* The intended behavior is that users who have
access to a shared service instance, but not developer access to the
originating space of the instance may not create service keys from the
instance.
* This behavior was already correct. This commit simply adds tests to
lock down the behavior.

[#152592943]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
* The intended behavior is that users who have access to a shared service instance, but not developer access to the
originating space of the instance may not list service keys for the instance.
* This behavior was already correct. This commit simply adds tests to lock down the behavior.

[#151950132]

Signed-off-by: Denise Yu <dyu@pivotal.io>
* The intended behavior is that users who have access to a shared service instance, but not developer access to the originating space of the instance may not delete service key associated with the instance.
* This behavior was already correct. This commit simply adds tests to lock down the behavior.

[#152721273]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
* The intended behavior is that users who have access to a shared service instance, but not developer access to the originating space of the instance may not GET specific service keys for the instance.
* This behavior was already correct. This commit simply adds tests to lock down the behavior.

[#152721273]

Signed-off-by: Denise Yu <dyu@pivotal.io>
* Add explicit check in ServiceInstanceShare.create
* Add new API error type

[#151997784]

Signed-off-by: Denise Yu <dyu@pivotal.io>
* Add explicit check in ServiceInstanceShare.create
* Add new API error type

[#152036417]

Signed-off-by: Denise Yu <dyu@pivotal.io>
@deniseyu
deniseyu force-pushed the pr-service-instance-sharing-disable-sharing-route-services-or-user-provided-services branch from dd88840 to c132f6b Compare November 16, 2017 16:47
@elenasharma
elenasharma merged commit 668bba8 into cloudfoundry:master Nov 16, 2017
@deniseyu
deniseyu deleted the pr-service-instance-sharing-disable-sharing-route-services-or-user-provided-services branch November 28, 2017 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants