0
votes

A request to list all service instances to the Cloud Controller API of Cloud Foundry (API Docs) shows a credentials property in the response body.

I know you can provide credentials in service bindings and service keys through the Open Service Broker API, but how do I fill this global credentials object in a service instance?

Imo, this can only happen during Service Provisioning, but all the Service Broker API defines in the response of the provisioning is a dashboard url and an operation.

1

1 Answers

1
votes

I looked at a couple of my lab environments, which have a number of different service brokers installed on them. None of them used the field you're asking about.

i.e. cf curl /v2/service_instances. The dictionary resources[].entity.credentials was always empty.

My understanding is that service credentials are associated with a service binding or a service key, not the service itself. If you want to see the service bindings or service keys, you need to use a different API call.

Ex: service binding cf curl /v2/service_instances/<service-instance-guid>/service_bindings. In that output resources[].entity.credentials should be populated with the service information (ie. hostname, port, username, password, etc...; whatever is provided by the service).

Similarly, service key credentials would be under the API cf curl /v2/service_instances/<service-instance-guid>/service_keys.

Maybe someone else can come along and tell us the purpose of this global field, but at the time of me writing this it appears to be unused.

Hope that helps!