cloudfoundry / cloudfoundry/stratos
Hint to display service binding credentials
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 267
- Forks
- 137
- Avg merge
- 5h 14m
- Merged PRs (30d)
- 77
Description
Stratos Version
What version of Stratos does this related to?
4.4.0-defcc460f-cap
Detailed Description
As a CF developer
- in order to troubleshoot access to a service instance bound to my application
- I need a way to display the service binding credentials
Currently, the environment page does not include the VCAP_SERVICES nor VCAP_APPLICATION environment variables (unlike the CF-CLI)

Output of CF CLI v7
$ cf env backend-service-bindings
Getting env variables for app backend-service-bindings in org acdc-demo-iaas-consumption-sosh-care / space backend as gberche...
System-Provided:
VCAP_SERVICES: {
"p-mysql": [
{
"binding_name": null,
"credentials": {
"hostname": "192.168.30.150",
"jdbcUrl": "jdbc:mysql://192.168.30.150:3306/cf_4e2accf3_823b_4f07_99d0_f4560fef63ec?user=l1bOKPdlZWq1OibN\u0026password=redacted",
"name": "cf_4e2accf3_823b_4f07_99d0_f4560fef63ec",
"password": "redacted",
"port": 3306,
"uri": "mysql://l1bOKPdlZWq1OibN:redacted@192.168.30.150:3306/cf_4e2accf3_823b_4f07_99d0_f4560fef63ec?reconnect=true",
"username": "l1bOKPdlZWq1OibN"
},
"instance_name": "backend-db",
"label": "p-mysql",
"name": "backend-db",
"plan": "1gb",
"provider": null,
"syslog_drain_url": null,
"tags": [
"mysql"
],
"volume_mounts": []
}
]
}
VCAP_APPLICATION: {
...
}
No user-provided env variables have been set
No running env variables have been set
Staging Environment Variable Groups:
http_proxy: http://system-internet-http-proxy.internal.paas:3128
https_proxy: http://system-internet-http-proxy.internal.paas:3128
Associated CC API V3 calls in CF CLI V7, the envs are formatted in the GET /v3/apps/:guid/env endpoint
$ CF_TRACE=true cf env backend-service-bindings | grep 'GET '
GET / HTTP/1.1
GET /v3 HTTP/1.1
GET /login HTTP/1.1
GET /v3/apps?names=backend-service-bindings&space_guids=cfb23f5a-44ed-4f60-add5-5545ed78f4a3 HTTP/1.1
GET /v3/apps/10e8f16d-bce2-497a-996c-0f984251eeb1/env HTTP/1.1
Similar with cf v6 and V2 APIs:
$ CF_TRACE=true cf env backend-service-bindings | grep 'GET '
GET /v2/spaces/cfb23f5a-44ed-4f60-add5-5545ed78f4a3/apps?q=name%3Abackend-service-bindings&inline-relations-depth=1 HTTP/1.1
GET /v2/apps/10e8f16d-bce2-497a-996c-0f984251eeb1/env HTTP/1.1
Context
Why is this change important to you? How would you use it?
How can it benefit other users?
This feature is a potential workaround for lack of support of service keys (which is detailed in https://github.com/cloudfoundry/stratos/issues/3487 )
Possible Implementation
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the environment page and review the Cloud Foundry environment data returned by GET /v3/apps/:guid/env, with the V2 /v2/apps/:guid/env endpoint as the older API reference. Done means the page can display VCAP_SERVICES and VCAP_APPLICATION for an application, similar to the CF CLI output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- cloud, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100