-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy patheservice.json
171 lines (171 loc) · 6.79 KB
/
eservice.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
"$schema": "http://json-schema.org/schema#",
"title": "PDO Contract Enclave Service Requests",
"id": "http://tradenet.org/pdo/eservice/requests#",
"definitions": {
"ContractEnclaveServiceRequest": {
"id": "#ContractEnclaveServiceRequest",
"description": "General schema for requests to the PDO contract enclave service",
"type": "object",
"properties": {
"request": {
"description": "the request to process",
"type": "object",
"required": true,
"oneOf": [
{
"$ref": "#UpdateContractRequest"
},
{
"$ref": "#EnclaveDataRequest"
},
{
"$ref": "#VerifySecretRequest"
}
]
}
}
},
"UpdateContractRequest": {
"id": "#UpdateContractRequest",
"description": "a request to apply a method to an existing instance of a contract",
"type": "object",
"properties": {
"operation": {
"description": "field describing the type of the request",
"type": "string",
"enum": [
"UpdateContractRequest"
],
"required": true
},
"encrypted_session_key": {
"description": "an AES key encrypted with enclave RSA key",
"type": "string",
"minLength": 344,
"maxLength": 344,
"format": "base64 urlsafe encoded, no padding",
"required": true
},
"encrypted_request": {
"description": "contract request encrypted with the AES session key",
"type": "string",
"minLength": 0,
"maxLength": 0,
"format": "base64 urlsafe encoded, no padding",
"required": true
}
}
},
"UpdateContractResponse": {
"id": "#UpdateContractResponse",
"description": "a response for an UpdateContractRequest",
"type": "object",
"properties": {
"result": {
"description": "response to the update request, encrypted with the sessions key",
"type": "string",
"minLength": 0,
"maxLength": 0,
"format": "base64 urlsafe encoded, no padding",
"required": true
}
}
},
"VerifySecretRequest": {
"id": "#VerifySecretRequest",
"description": "request to verify secrets generated by the provisioning services",
"type": "object",
"properties": {
"operation": {
"description": "field describing the type of the request",
"type": "string",
"enum": [
"verifySecretRequest"
],
"required": true
},
"contract_id": {
"description": "unique identifier for the contract",
"$ref": "#/pdo/basetypes/contractid",
"required": true
},
"creator_id": {
"description": "identifier for the creator of the contract",
"$ref": "#/pdo/basetypes/transactorid",
"required": true
},
"Secrets": {
"description": "List of dependent contract commits",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"pspk": {
"description": "public key of the provisioning service that created the secret",
"$ref": "#/pdo/basetypes/ecdsapublickey",
"required": true
},
"encrypted_secret": {
"description": "secret and provisioning service signature encrypted with the enclave's RSA key",
"$ref": "#/pdo/basetypes/contract-secret",
"required": true
}
}
}
}
}
},
"VerifySecretResponse": {
"id": "#VerifySecretResponse",
"description": "response to the verify secrets request",
"type": "object",
"properties": {
"encrypted_state_encryption_key": {
"description": "the encrypted secret created for use by an enclave for this contract instance",
"$ref": "#/pdo/basetypes/state-encryption-key",
"required": true
},
"signature": {
"description": "signature of the request/response",
"$ref": "#/pdo/basetypes/signature",
"required": true
}
}
},
"EnclaveDataRequest": {
"id": "#EnclaveDataRequest",
"description": "request information about the enclave for registration in the ledger",
"type": "object",
"properties": {
"operation": {
"description": "field describing the type of the request",
"type": "string",
"enum": [
"EnclaveDataRequest"
],
"required": true
}
}
},
"EnclaveDataResponse": {
"id": "#EnclaveDataResponse",
"description": "response to the sign up request message",
"type": "object",
"properties": {
"verifying_key": {
"description": "ECDSA key used by the enclave to sign results",
"$ref": "#/pdo/basetypes/ecdsa-public-key",
"required": true
},
"encryption_key": {
"description": "RSA key used to encrypt secrets passed to the enclave",
"$ref": "#/pdo/basetypes/rsa-public-key",
"required": true
}
}
}
}
}