swisscom / open-service-broker

Open Service Broker is an implementation of the "Open Service Broker API" based on Spring Boot & Groovy. It enables platforms such as Cloud Foundry & Kubernetes to provision and manage services.
Apache License 2.0
70 stars 25 forks source link

Support many Platforms for 1 Service Broker #44

Closed meip closed 6 years ago

meip commented 6 years ago

We're facing the challenge to support many platforms for 1 service. These platforms must be identified to support proper orchestration across them. The context.platform field just indicates the platform and doesn't allow further identification.

Solution Proposal To identify the platform the user and password field can be used so that many users are supported. Further the model should be extended so that catalog items and service instances can be assigned to a platforms. The authentication configuration should be sourced from the application.yml.

mcelep commented 6 years ago

@meip https://github.com/openservicebrokerapi/servicebroker/blob/v2.13/spec.md 'Originating Identity' section might be interesting to look into. Moreover, it would perhaps make sense that, there is a default platform which is used for all services that are not bound a specific platform and in order to not make the whole service definition more complex than it already is.

MatthiasWinzeler commented 6 years ago

@mcelep Agree that we need sane default behavior.

As far as I understand, Originating identity refers to the end user's identity; for this use case, we only need the identity of the platform (i.e. which cloud is requesting the service instance). Unless there is JWT support (both in the API and in the platforms, i.e. Cloud controller), we can only use the basic auth to identify the platform.

thanks btw for the input 👍

meip commented 6 years ago

@mcelep thank you for the hint 👍

On a discussion with @kristianszoke we agreed on these implementation steps

  1. Extend the data model with new entity platform
    1. Store username, password, context.platform
    2. Add SQL Schema Migration
    3. Add SQL Data Migration
  2. Add support to configure any platform from application.yml
    1. Throw exception if a platform doesn't exists in the application.yml but Service Instances still refer to it
  3. Implement platform on ServiceInstance object
mcelep commented 6 years ago

Implement platform on ServiceInstance object

why not just on Service object? I thought every Service would need to belong to a platform and every ServiceInstance has a reference to a Service object.

meip commented 6 years ago

@mcelep Because considering the reuse the Service Object across many platforms and instead introduce kind of a "Service Access" which controls which services are offered to a platform and not. But this can follow in a later state.

meip commented 6 years ago

Implemented in #47