Skip to content

Remove related link from service instance sharing endpoint#1034

Merged
anniesing merged 18 commits into
cloudfoundry:masterfrom
cloudfoundry-incubator:pr-service-instance-sharing-remove-related-link
Dec 21, 2017
Merged

Remove related link from service instance sharing endpoint#1034
anniesing merged 18 commits into
cloudfoundry:masterfrom
cloudfoundry-incubator:pr-service-instance-sharing-remove-related-link

Conversation

@jenspinney

Copy link
Copy Markdown
Contributor

As an app dev (sharer) I no longer get a related shared_spaces link in the shared spaces endpoint #153566266

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

What

When we first implemented the POST /v3/service_instances/:guid/relationships/shared_spaces endpoint, we returned a response that looked like this:

{
  "data": [
    {
      "guid": "885de116-1313-46a3-a578-f152eea17af6"
    },
    {
      "guid": "05e472b8-ff7d-4f2f-bd00-dd874aa822eb"
    }
  ],
  "links": {
    "self": {
      "href": "https://api.example.com/v3/service_instances/ddaa57af-eeaf-4098-9f7e-31aad16c36f5/relationships/shared_spaces"
    },
    "related": {
      "href": "https://api.example.com/v3/service_instances/ddaa57af-eeaf-4098-9f7e-31aad16c36f5/shared_spaces"
    }
  }
}

As we're rounding out the API and filling in the gaps, we looked into implementing the GET endpoints to the two links listed in the links section. We found that the related link above is somewhat strange to implement and consume, since it would need to be heavily redacted if the querying user doesn't have full read permission to all the target spaces. This PR removes the related link. The work to implement the GET method on the self link, on the other hand, will be coming shortly in a following PR.

Changes:

  • Removed related link from being return by the response of POST /v3/service_instances/:guid/relationships/shared_spaces
  • Removed related link from documentation of this endpoint.

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 team (@jenspinney and @ablease)

@cfdreddbot

Copy link
Copy Markdown

Hey jenspinney!

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/153665574

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

Denise Yu and others added 18 commits December 15, 2017 13:49
[#152922808]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
[#152922808]

Signed-off-by: Sam Gunaratne <sgunaratne@pivotal.io>
[#152922808]

Signed-off-by: Denise Yu <dyu@pivotal.io>
[#152922808]

Signed-off-by: Denise Yu <dyu@pivotal.io>
* Add additional tests for user provided services and service instance sharing

Signed-off-by: Sam Gunaratne <sgunaratne@pivotal.io>
422 Unprocessable is a more appropriate error message as
the syntax of the request is correct, however the semantics of the
request are wrong.

[#153176525]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
* This allows developers who does not have cross space access to
discover the space_guid when using service instance sharing.

[#153244755]

Signed-off-by: Sam Gunaratne <sgunaratne@pivotal.io>
* This could introduce a name clash in spaces receiving a shared
instance

[#152109574]
[#153244755]

Signed-off-by: Alex Blease <ablease@pivotal.io>
* If the service_instance_sharing feature flag has been disabled after
service instances have been shared, users should still be allowed to
unshare existing shares. These existing shares will continue to work
with existing app bindings, but new bindings cannot be created as long
as the feature flag is disabled.

[#150970623]

Signed-off-by: Denise Yu <dyu@pivotal.io>
…ead access

* Previous to this change, service bindings would be displayed if the
requesting user had read access to the service instance of the service
binding. This included read access to spaces to which the service
instance had been shared. Now we are restricting this such that only
users who can view the app can view the binding.

[#153456495]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
* Previously, we restricted binding apps to shared service instances
such that it was only allowed when the `service_instance_sharing`
feature flag was enabled.
* For better UX in the situation where the feature flag was enabled,
a service instance was shared, and then the feature flag was disabled,
we now allow users to bind apps to shared spaces, even when the
flag is disabled.

[#153438338]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
… plan

[#150801609]

Signed-off-by: Denise Yu <dyu@pivotal.io>
[#153566266]

Signed-off-by: Denise Yu <dyu@pivotal.io>
[#153566266]

Signed-off-by: Jen Spinney <jennifer.spinney@suse.com>
@deniseyu deniseyu force-pushed the pr-service-instance-sharing-remove-related-link branch from 24aae0d to 2ed311e Compare December 15, 2017 14:48
@anniesing

Copy link
Copy Markdown

Changes looks good. Docs looks good. Merging now.

@anniesing anniesing merged commit cae3975 into cloudfoundry:master Dec 21, 2017
@jenspinney jenspinney deleted the pr-service-instance-sharing-remove-related-link branch December 27, 2017 09:26
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.

5 participants