Peripli / service-manager

Service Manager Core
Apache License 2.0
69 stars 28 forks source link

Unable to update the Broker with a new Broker URL #796

Open valiparsa opened 4 months ago

valiparsa commented 4 months ago

Describe the problem:

I'm trying to update the registration of the Broker by the ServiceManager and it fails with this error:

$ smctl update-broker my-broker '{"credentials":{"tls":{"sm_provided_tls_credentials": true}}, "broker_url":"*****"}'
Error: request PATCH https://*****?async=false failed: StatusCode: 400 Body: {"error":"BadRequest","description":"updating a url of a broker requires its credentials"}

As per the implementation, if the "sm_provided_tls_credentials": true is set it should not return this error message updating a url of a broker requires its credentials, am I right?

Steps to reproduce:

  1. Register the Broker
  2. Update the Broker with different broker_url

Observed Results:

$ smctl update-broker my-broker '{"credentials":{"tls":{"sm_provided_tls_credentials": true}}, "broker_url":"*****"}'
Error: request PATCH https://*****?async=false failed: StatusCode: 400 Body: {"error":"BadRequest","description":"updating a url of a broker requires its credentials"}

Expected Results:

Relevant Code Snippet: