Skip to content

Service binding parameters in manifest are not passed to the service broker when cf push #2161

@svkrieger

Description

@svkrieger

Issue

When parameters are added to a service binding in the manifest and cf push is executed, the service broker won't receive the provided parameters.

Context

The manifest could look like this:

applications:
- buildpacks:
  - binary_buildpack
  disk_quota: 128M
  instances: 1
  memory: 128M
  name: my-app
  services:
  - name: myservice
    parameters:
      myparameter: "myvalue"
      mysecondparameter: "mysecondvalue"

Setup:
CF CLI version: 7.2.0+be4a5ce2b.2020-12-10
CC API version: 3.98.0 (main branch, but does occur in previous releases too)

Steps to Reproduce

Put some parameters into the manifest for a service binding and execute cf push.
Then check whether the service broker received a request containing the provided parameters.

Expected result

The service broker receives the provided parameters with the service binding request.
The following shows how a request, which arrives at the service broker should look like:

Request: PUT /v2/service_instances/0c028742-0d9f-4618-9f1c-e90847343d0f/service_bindings/c381bc54-9b0a-49df-a006-22f515799f80 HTTP/1.1
Host: service-broker:3000
Accept: application/json
Authorization: Basic YnJva2VyLXVzZXI6YnJva2VyLXBhc3N3b3Jk
Content-Length: 739
Content-Type: application/json
Date: Wed, 24 Mar 2021 10:40:12 GMT
User-Agent: HTTPClient/1.0 (2.8.3, ruby 2.7.2 (2020-10-01))
X-Api-Info-Location: localhost/v2/info
X-Broker-Api-Originating-Identity: cloudfoundry ewogICJ1c2VyX2lkIjogImRmYWZmZjczLTYyZDAtNDVhMi1hNWFjLTUyYTJjZTA4ZWJhZCIKfQ==
X-Broker-Api-Request-Identity: a621a2cd-a8bd-40e3-8ba9-16de18c30932
X-Broker-Api-Version: 2.15
X-Vcap-Request-Id: 00943c2d-db21-4c14-b396-cc08dfc1f4d0

{
  "service_id": "1234-5678-8765-4321-service-my-service",
  "plan_id": "1234-5678-8765-4321-plan-unlimited",
  "app_guid": "ecde9a4f-7e68-4e88-8cb1-7951f5648b7a",
  "bind_resource": {
    "app_guid": "ecde9a4f-7e68-4e88-8cb1-7951f5648b7a",
    "space_guid": "d5c3bbb9-5393-40e7-83d2-1f321e87eae0",
    "app_annotations": {

    }
  },
  "context": {
    "platform": "cloudfoundry",
    "organization_guid": "bee3329f-13f7-4b1c-bc15-bef8fc416a22",
    "space_guid": "d5c3bbb9-5393-40e7-83d2-1f321e87eae0",
    "organization_name": "sap",
    "space_name": "sap",
    "organization_annotations": {

    },
    "space_annotations": {

    }
  },
  "parameters": {
    "myparameter": "myvalue",
    "mysecondparameter": "mysecondvalue"
  }
}

Current result

The request does not contain the parameters. The following shows the incoming request at the service broker:

Request: PUT /v2/service_instances/0c028742-0d9f-4618-9f1c-e90847343d0f/service_bindings/f0be3a39-3589-459c-be55-4ee48423fe97 HTTP/1.1
Host: service-broker:3000
Accept: application/json
Authorization: Basic YnJva2VyLXVzZXI6YnJva2VyLXBhc3N3b3Jk
Content-Length: 645
Content-Type: application/json
Date: Wed, 24 Mar 2021 10:43:04 GMT
User-Agent: HTTPClient/1.0 (2.8.3, ruby 2.7.2 (2020-10-01))
X-Api-Info-Location: localhost/v2/info
X-Broker-Api-Originating-Identity: cloudfoundry ewogICJ1c2VyX2lkIjogImRmYWZmZjczLTYyZDAtNDVhMi1hNWFjLTUyYTJjZTA4ZWJhZCIKfQ==
X-Broker-Api-Request-Identity: 833d1ac9-137f-46af-89a4-831a5cb06ca7
X-Broker-Api-Version: 2.15
X-Vcap-Request-Id: 16bc11ae-5f57-42ca-a30e-5a1269b53c79

{
  "service_id": "1234-5678-8765-4321-service-my-service",
  "plan_id": "1234-5678-8765-4321-plan-unlimited",
  "app_guid": "ecde9a4f-7e68-4e88-8cb1-7951f5648b7a",
  "bind_resource": {
    "app_guid": "ecde9a4f-7e68-4e88-8cb1-7951f5648b7a",
    "space_guid": "d5c3bbb9-5393-40e7-83d2-1f321e87eae0",
    "app_annotations": {

    }
  },
  "context": {
    "platform": "cloudfoundry",
    "organization_guid": "bee3329f-13f7-4b1c-bc15-bef8fc416a22",
    "space_guid": "d5c3bbb9-5393-40e7-83d2-1f321e87eae0",
    "organization_name": "sap",
    "space_name": "sap",
    "organization_annotations": {

    },
    "space_annotations": {

    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions