cyberark / conjur-service-broker

Implementation of the Open Service Broker API for Conjur

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[SalesForce Case] 00694861 Cloud Foundry Integration - Error when unbind app from conjur service broker

garkler-zz opened this issue · comments

SaleForce Case

From the Customer:
Conjur version 10.9
PCF Dev Version 1.2.0
conjur-service-broker 1.1.0

Deleting or unbinding app from conjur service instance will throw below error.
The workaround is to purge-service-instance but this will remove service from all other apps and will need to recreate conjur service instance for that org/space.


Apichets-MacBook-Pro:cf-jeep-test jeep$ cf unbind-service cityapp conjur 
Unbinding app cityapp from service conjur in org cfdev-org / space cfdev-space as admin... 
An unbind operation for the service binding between app cityapp and service instance conjur failed: Service broker error: The property '#/' did not contain a required property of 'service_id' 
FAILED

Log from service broker

2019-05-14T23:22:36.470+07:00 [APP/PROC/WEB/0] [OUT] I, [2019-05-14T16:22:36.470257 #121] INFO -- : [dd194fb7-fa7f-4fcb-8850-2545fccad168] Started DELETE "//v2/service_instances/5e001ccf-54bd-4528-be1d-e18d5b2099e7/service_bindings/6167055e-327b-4c2c-b2b5-b7ec535fa8c5accepts_incomplete=true&plan_id=3a116ac2-fc8b-496f-a715-e9a1b205d05c.community&service_id=c024e536-6dc4-45c6-8a53-127e7f8275ab" for 10.255.32.76 at 2019-05-14 16:22:36 +0000 
2019-05-14T23:22:36.474+07:00 [APP/PROC/WEB/0] [OUT] I, [2019-05-14T16:22:36.473827 #121] INFO -- : [dd194fb7-fa7f-4fcb-8850-2545fccad168] Processing by BindController#delete as 
2019-05-14T23:22:36.474+07:00 [APP/PROC/WEB/0] [OUT] I, [2019-05-14T16:22:36.474086 #121] INFO -- : [dd194fb7-fa7f-4fcb-8850-2545fccad168] Parameters: {"instance_id"=>"5e001ccf-54bd-4528-be1d-e18d5b2099e7", "binding_id"=>"6167055e-327b-4c2c-b2b5-b7ec535fa8c5accepts_incomplete=true&plan_id=3a116ac2-fc8b-496f-a715-e9a1b205d05c"} 
2019-05-14T23:22:36.475+07:00 [APP/PROC/WEB/0] [OUT] W, [2019-05-14T16:22:36.475133 #121] WARN -- : [dd194fb7-fa7f-4fcb-8850-2545fccad168] The property '#/' did not contain a required property of 'service_id' 
2019-05-14T23:22:36.476+07:00 [APP/PROC/WEB/0] [OUT] I, [2019-05-14T16:22:36.476680 #121] INFO -- : [dd194fb7-fa7f-4fcb-8850-2545fccad168] Completed 400 Bad Request in 2ms (Views: 1.3ms) 
2019-05-14T23:22:36.478+07:00 [RTR/0] [OUT] conjur-service-broker-reliable-springhare.dev.cfdev.sh - [2019-05-14T16:22:36.461+0000] "DELETE //v2/service_instances/5e001ccf-54bd-4528-be1d-e18d5b2099e7/service_bindings/6167055e-327b-4c2c-b2b5-b7ec535fa8c5?accepts_incomplete=true&plan_id=3a116ac2-fc8b-496f-a715-e9a1b205d05c.community&service_id=c024e536-6dc4-45c6-8a53-127e7f8275ab HTTP/1.1" 400 0 113 "-" "HTTPClient/1.0 (2.8.3, ruby 2.4.2 (2017-09-14))" "10.144.0.5:44112" "10.144.0.6:61006" x_forwarded_for:"10.144.0.5" x_forwarded_proto:"https" vcap_request_id:"65f089f7-d3fa-48b7-703b-9ad3de5b005c" response_time:0.0163522 app_id:"d52169bf-f114-478d-af9f-9adb043e60d5" app_index:"0" x_b3_traceid:"3bc1a4cef241f743" x_b3_spanid:"3bc1a4cef241f743" x_b3_parentspanid:"-"

Triage notes:

The DELETE path is missing the ? before the query parameters:

2019-05-14T23:22:36.470+07:00 [APP/PROC/WEB/0] [OUT] I, [2019-05-14T16:22:36.470257 #121] INFO -- : [dd194fb7-fa7f-4fcb-8850-2545fccad168] Started DELETE "//v2/service_instances/5e001ccf-54bd-4528-be1d-e18d5b2099e7/service_bindings/6167055e-327b-4c2c-b2b5-b7ec535fa8c5accepts_incomplete=true&plan_id=3a116ac2-fc8b-496f-a715-e9a1b205d05c.community&service_id=c024e536-6dc4-45c6-8a53-127e7f8275ab" for 10.255.32.76 at 2019-05-14 16:22:36 +0000 

This leads the binding_id in the parameters containing more than just the binding id:

"binding_id"=>"6167055e-327b-4c2c-b2b5-b7ec535fa8c5accepts_incomplete=true&plan_id=3a116ac2-fc8b-496f-a715-e9a1b205d05c"

Which causes the actually error message from json-schema validation:

The property '#/' did not contain a required property of 'service_id' 

The DELETE path itself should be coming from from the CF cloud controller.

Closing as not reproducible.