Skip to content

Commit 7f50305

Browse files
author
Matt McNeeney
committed
add x-api-info-location header
1 parent e7dc9b4 commit 7f50305

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

openapi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ paths:
4949
parameters:
5050
- $ref: '#/components/parameters/APIVersion'
5151
- $ref: '#/components/parameters/OriginatingIdentity'
52+
- $ref: '#/components/parameters/InfoLocation'
5253
- name: instance_id
5354
in: path
5455
description: instance id of instance to provision
@@ -112,6 +113,7 @@ paths:
112113
parameters:
113114
- $ref: '#/components/parameters/APIVersion'
114115
- $ref: '#/components/parameters/OriginatingIdentity'
116+
- $ref: '#/components/parameters/InfoLocation'
115117
- name: instance_id
116118
in: path
117119
description: instance id of instance to update
@@ -163,6 +165,7 @@ paths:
163165
parameters:
164166
- $ref: '#/components/parameters/APIVersion'
165167
- $ref: '#/components/parameters/OriginatingIdentity'
168+
- $ref: '#/components/parameters/InfoLocation'
166169
- name: instance_id
167170
in: path
168171
description: id of instance being deleted
@@ -225,6 +228,7 @@ paths:
225228
parameters:
226229
- $ref: '#/components/parameters/APIVersion'
227230
- $ref: '#/components/parameters/OriginatingIdentity'
231+
- $ref: '#/components/parameters/InfoLocation'
228232
- name: instance_id
229233
in: path
230234
description: instance id of instance to fetch
@@ -370,6 +374,7 @@ paths:
370374
parameters:
371375
- $ref: '#/components/parameters/APIVersion'
372376
- $ref: '#/components/parameters/OriginatingIdentity'
377+
- $ref: '#/components/parameters/InfoLocation'
373378
- name: instance_id
374379
in: path
375380
description: instance id of instance to create a binding on
@@ -439,6 +444,7 @@ paths:
439444
parameters:
440445
- $ref: '#/components/parameters/APIVersion'
441446
- $ref: '#/components/parameters/OriginatingIdentity'
447+
- $ref: '#/components/parameters/InfoLocation'
442448
- name: instance_id
443449
in: path
444450
description: id of the instance associated with the binding being deleted
@@ -501,6 +507,7 @@ paths:
501507
parameters:
502508
- $ref: '#/components/parameters/APIVersion'
503509
- $ref: '#/components/parameters/OriginatingIdentity'
510+
- $ref: '#/components/parameters/InfoLocation'
504511
- name: instance_id
505512
in: path
506513
description: instance id of instance associated with the binding
@@ -545,6 +552,13 @@ components:
545552
schema:
546553
type: string
547554

555+
InfoLocation:
556+
name: X-Api-Info-Location
557+
in: header
558+
description: endpoint for fetching additional information about the Platform
559+
schema:
560+
type: string
561+
548562
schemas:
549563
Catalog:
550564
type: object

profile.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ or REQUIRED level requirements defined herein.
1515
- [Notations and Terminology](#notations-and-terminology)
1616
- [Notational Conventions](#notational-conventions)
1717
- [Terminology](#terminology)
18+
- [Info Location Header](#info-location-header)
19+
- [Cloud Foundry Info Location Header](#cloud-foundry-info-location-header)
1820
- [Originating Identity Header](#originating-identity-header)
1921
- [Cloud Foundry Originating Identity Header](#cloud-foundry-originating-identity-header)
2022
- [Kubernetes Originating Identity Header](#kubernetes-originating-identity-header)
@@ -113,6 +115,42 @@ X-Broker-API-Originating-Identity: kubernetes ew0KICAidXNlcm5hbWUiOiAiZHVrZSIsDQ
113115
```
114116

115117

118+
## Info Location Header
119+
120+
This header can be used by Platforms to provide Service Brokers with an endpoint
121+
that can be used to fetch information about the specific Platform deployment
122+
from which the request originated.
123+
124+
The header consists of two parts: a `platform` string and `value` string,
125+
where the `value` is a Base64 encoded serialized JSON object.
126+
Both parts will vary based on the Platform which is being used. The
127+
following sections define the values to be used based on the Platform
128+
and which properties are expected to appear in the `value` JSON.
129+
130+
### Cloud Foundry Info Location Header
131+
132+
*`platform` Value*: `cloudfoundry`
133+
134+
The following properties MUST appear within the JSON encoded `value`:
135+
136+
| Property | Type | Description |
137+
| --- | --- | --- |
138+
| info_location_url | string | The URL of an endpoint that can be used to fetch information about the Cloud Foundry deployment from which the request originated. |
139+
140+
Platforms MAY include additional properties.
141+
142+
For example, a `value` of:
143+
```json
144+
{
145+
"info_location_url": "https://api.platform.example.com/v2/info"
146+
}
147+
```
148+
would appear in the HTTP Header as:
149+
```
150+
X-Broker-API-Originating-Identity: cloudfoundry ewogICJpbmZvX2xvY2F0aW9uX3VybCI6ICJodHRwczovL2FwaS5wbGF0Zm9ybS5leGFtcGxlLmNvbS92Mi9pbmZvIgp9
151+
```
152+
153+
116154
## Context Object
117155

118156
In the [Open Service Broker API specification](spec.md) there are certain

spec.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ The following HTTP Headers are defined for the operations detailed in this spec:
154154
| X-Broker-API-Version* | string | See [API Version Header](#api-version-header). |
155155
| X-Broker-API-Originating-Identity | string | See [Originating Identity](#originating-identity). |
156156
| X-Broker-API-Request-Identity | string | See [Request Identity](#request-identity). |
157+
| X-API-Info-Location | string | See [Info Location Header](profile.md#info-location-header). |
157158

158159
\* Headers with an asterisk are REQUIRED.
159160

swagger.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ paths:
3535
- $ref: '#/parameters/APIVersion'
3636
- $ref: '#/parameters/OriginatingIdentity'
3737
- $ref: '#/parameters/RequestIdentity'
38+
- $ref: '#/parameters/InfoLocation'
3839
get:
3940
summary: get the catalog of services that the service broker offers
4041
tags:
@@ -56,6 +57,7 @@ paths:
5657
- $ref: '#/parameters/APIVersion'
5758
- $ref: '#/parameters/OriginatingIdentity'
5859
- $ref: '#/parameters/RequestIdentity'
60+
- $ref: '#/parameters/InfoLocation'
5961
- name: instance_id
6062
in: path
6163
description: instance id of instance to provision
@@ -184,6 +186,7 @@ paths:
184186
- $ref: '#/parameters/APIVersion'
185187
- $ref: '#/parameters/OriginatingIdentity'
186188
- $ref: '#/parameters/RequestIdentity'
189+
- $ref: '#/parameters/InfoLocation'
187190
- name: instance_id
188191
in: path
189192
description: instance id of instance to provision
@@ -231,6 +234,7 @@ paths:
231234
- $ref: '#/parameters/APIVersion'
232235
- $ref: '#/parameters/OriginatingIdentity'
233236
- $ref: '#/parameters/RequestIdentity'
237+
- $ref: '#/parameters/InfoLocation'
234238
- name: instance_id
235239
in: path
236240
description: instance id of instance to provision
@@ -283,6 +287,7 @@ paths:
283287
- $ref: '#/parameters/APIVersion'
284288
- $ref: '#/parameters/OriginatingIdentity'
285289
- $ref: '#/parameters/RequestIdentity'
290+
- $ref: '#/parameters/InfoLocation'
286291
- name: instance_id
287292
in: path
288293
description: instance id of instance to provision
@@ -399,6 +404,11 @@ parameters:
399404
in: header
400405
description: idenity of the request from the Platform
401406
type: string
407+
InfoLocation:
408+
name: X-Api-Info-Location
409+
in: header
410+
description: endpoint for fetching additional information about the Platform
411+
type: string
402412
accepts_incomplete:
403413
name: accepts_incomplete
404414
in: query

0 commit comments

Comments
 (0)