Skip to content

Commit 65387e7

Browse files
Merge pull request #34 from veraison/disco-api-plusplus
Disco API - add some missing info
2 parents 4d194c8 + 86b1a02 commit 65387e7

File tree

3 files changed

+35
-12
lines changed

3 files changed

+35
-12
lines changed

.github/workflows/api-checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ jobs:
2323

2424
- name: Check Endorsement provisioning API
2525
run: make -C api/endorsement-provisioning check
26+
27+
- name: Check Discovery API
28+
run: make -C api/well-known check

api/well-known/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Discovery APIs
2-
The APIs described here allow a user of the Veraison to obtain and view meta information about the Veraison deployment. Information about deployment can be queried according to the service e.g. provisioning or verification.
2+
The APIs described here allow a user of the Veraison to obtain and view meta information about the Veraison deployment. Information about a deployment can be queried according to the service - e.g., provisioning or verification.
33

44
The relevant resource is created in response to a client `GET`. The queried information is then outputted as shown in the examples below.
55

66
## Well-known API: Provisioning service
77
The information for the provisioning service has the following attributes:
88

99
* The allowed provisioning media types;
10-
* The version of the provisioning service.
10+
* The version of the provisioning service;
11+
* The current operational state of the service;
12+
* The exposed API endpoints and the corresponding URLs (relative to the request's base URL).
1113

1214
### Querying information about the Provisioning service
1315

@@ -29,7 +31,7 @@ Content-format: application/vnd.veraison.discovery+json
2931
"application/corim-unsigned+cbor; profile=http://enacttrust.com/veraison/1.0.0"
3032
],
3133
"version": "commit-a8056d0",
32-
"state": "READY",
34+
"service-state": "READY",
3335
"api-endpoints": {
3436
"provisioningSubmit": "/endorsement-provisioning/v1/submit"
3537
}
@@ -42,7 +44,10 @@ The information for the verification service has the following attributes:
4244

4345
* The public key used to verify the Attestation Result;
4446
* The allowed media types for attestation evidence;
45-
* The version of the verification service.
47+
* The version of the verification service;
48+
* The current operational state of the service;
49+
* The exposed API endpoints and the corresponding URLs (relative to the request's base URL).
50+
4651

4752
### Querying information about the Verification service
4853

@@ -59,6 +64,7 @@ Content-format: application/vnd.veraison.discovery+json
5964
6065
{
6166
"ear-verification-key": {
67+
"alg": "ES256",
6268
"crv": "P-256",
6369
"kty": "EC",
6470
"x": "usWxHK2PmfnHKwXPS54m0kTcGJ90UiglWiGahtagnv8",
@@ -72,9 +78,9 @@ Content-format: application/vnd.veraison.discovery+json
7278
"application/vnd.enacttrust.tpm-evidence"
7379
],
7480
"version": "commit-a8056d0",
75-
"state": "READY",
81+
"service-state": "READY",
7682
"api-endpoints": {
7783
"newChallengeResponseSession": "/challenge-response/v1/newSession"
7884
}
7985
}
80-
```
86+
```

api/well-known/schemas/components.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ components:
44
required:
55
- media-types
66
- version
7-
- state
7+
- service-state
88
- api-endpoints
99
properties:
10-
public-key:
11-
type: string
12-
format: json
10+
ear-verification-key:
11+
$ref: '#/components/schemas/PublicKey'
1312
description:
14-
Public key used to verify the Attestation Result
13+
Public key and algorithm to be used to verify the Attestation Result
1514
media-types:
1615
type: array
1716
items:
@@ -26,8 +25,9 @@ components:
2625
Version of the current service running represented using a unique
2726
commit hash. This value can change as new commits are made to the service
2827
example: commit-cb11fa0
29-
state:
28+
service-state:
3029
type: string
30+
enum: [ DOWN, INITIALIZING, READY, TERMINATING ]
3131
description:
3232
State of the VTS service
3333
api-endpoints:
@@ -38,9 +38,23 @@ components:
3838
MediaType:
3939
type: string
4040
example: 'application/eat-collection; profile=http://arm.com/CCA-SSD/1.0.0'
41+
description: an Evidence media type
4142

4243
PublicApiMap:
4344
type: object
4445
additionalProperties:
4546
type: string
47+
description: >
48+
a dictionary with the API names as keys and their relative URLs as values
4649
50+
PublicKey:
51+
required:
52+
- alg
53+
properties:
54+
alg:
55+
type: string
56+
description: >
57+
Identifier of the algorithm used to sign the Attestation Result
58+
example: ES256
59+
description: >
60+
A public key in JSON Web Key (https://www.rfc-editor.org/rfc/rfc7517) format

0 commit comments

Comments
 (0)