@tdxvolt/volt-client-grpc 0.11.8 → 0.14.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +2 -2
- package/package.json +2 -2
- package/protobuf/tdx/volt_api/data/v1/sqlite_database_api.proto +5 -1
- package/protobuf/tdx/volt_api/relay/v1/relay_api.proto +1 -1
- package/protobuf/tdx/volt_api/volt/v1/file_api.proto +1 -1
- package/protobuf/tdx/volt_api/volt/v1/remote.proto +0 -1
- package/protobuf/tdx/volt_api/volt/v1/volt.proto +70 -44
- package/protobuf/tdx/volt_api/volt/v1/volt_api.proto +183 -75
- package/protobuf/tdx/volt_api/volt/v1/wire_api.proto +1 -1
- package/src/volt-client-internal.js +2 -2
package/lib/index.cjs
CHANGED
|
@@ -1268,10 +1268,10 @@ function issueBind(bindRequest, ttl) {
|
|
|
1268
1268
|
// This is the certificate assigned to us by the volt.
|
|
1269
1269
|
this._credential.cache.cert = bindResponse.cert;
|
|
1270
1270
|
|
|
1271
|
-
// This is the signing CA used by the volt
|
|
1271
|
+
// This is the signing CA used by the volt.
|
|
1272
1272
|
this._credential.cache.ca = bindResponse.chain;
|
|
1273
1273
|
|
|
1274
|
-
//
|
|
1274
|
+
// Identity resource id is assigned by the volt.
|
|
1275
1275
|
this._credential.cache.client_id = bindResponse.identity_id;
|
|
1276
1276
|
this._credential.saveCache();
|
|
1277
1277
|
break;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.14.58",
|
|
7
7
|
"description": "tdx Volt library for nodejs clients",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
@@ -48,4 +48,4 @@
|
|
|
48
48
|
"node-forge": "^0.9.0",
|
|
49
49
|
"uuid": "^8.1.0"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|
|
@@ -16,6 +16,9 @@ service SqliteDatabaseAPI {
|
|
|
16
16
|
rpc Execute(stream SqlExecuteRequest) returns (stream SqlExecuteResponse);
|
|
17
17
|
|
|
18
18
|
// Import CSV data into a table.
|
|
19
|
+
// The import handler will inspect the incoming CSV data, infer the columns and data types required, and create and populate the SQL table.
|
|
20
|
+
// The CSV must contain a header row containing the column names and at least one row of data so that the types can be inferred.
|
|
21
|
+
// The importer assumes all data in any given CSV file relates to a single table.
|
|
19
22
|
// The data can either be streamed in chunks or retrieved from an existing resource.
|
|
20
23
|
// If the data is streamed in chunks, the client must call the Close() method on the stream to indicate that it has finished.
|
|
21
24
|
rpc ImportCSV(stream SqlImportCSVRequest) returns (stream SqlImportCSVResponse);
|
|
@@ -51,7 +54,7 @@ message SqlExecuteRequest {
|
|
|
51
54
|
// This field is only relevant to 'query' databases, i.e. those with kind `tdx:sqlite-query`.
|
|
52
55
|
// The values in the list should be in the same order as the parameters defined by the query attributes.
|
|
53
56
|
// A query may have no parameters defined, in which case leave this field empty.
|
|
54
|
-
|
|
57
|
+
map<string, tdx.volt_api.volt.v1.AttributeValue> parameter = 4;
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
// One of the following fields will be present in any given message.
|
|
@@ -88,6 +91,7 @@ message SqlImportCSVConfiguration {
|
|
|
88
91
|
uint32 progress_interval = 5;
|
|
89
92
|
}
|
|
90
93
|
|
|
94
|
+
// Each message must contain one and only one of the following fields.
|
|
91
95
|
message SqlImportCSVRequest {
|
|
92
96
|
oneof payload {
|
|
93
97
|
// The initial request must contain the configuration parameters for the import.
|
|
@@ -7,7 +7,7 @@ import "tdx/volt_api/volt/v1/remote.proto";
|
|
|
7
7
|
import "tdx/volt_api/volt/v1/volt.proto";
|
|
8
8
|
|
|
9
9
|
service RelayAPI {
|
|
10
|
-
// Retrieve the list of Volts available on the Relay Volt
|
|
10
|
+
// Retrieve the list of Volts available on the Relay Volt.
|
|
11
11
|
rpc GetVoltEndpoint(GetVoltEndpointRequest) returns (GetVoltEndpointResponse);
|
|
12
12
|
|
|
13
13
|
// This is the actual tunnel stream.
|
|
@@ -8,7 +8,7 @@ import "tdx/volt_api/volt/v1/file.proto";
|
|
|
8
8
|
// The File API exposes basic file management functions.
|
|
9
9
|
service FileAPI {
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// A server-stream to download contents from a file resource.
|
|
12
12
|
rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse);
|
|
13
13
|
|
|
14
14
|
// Get file resource metadata.
|
|
@@ -53,8 +53,7 @@ enum ShareMode {
|
|
|
53
53
|
|
|
54
54
|
// Represents an outbound connection from a Volt to a remote service that will act as a proxy for that Volt.
|
|
55
55
|
// This enables Volts to bypass firewall and NATs.
|
|
56
|
-
// Example
|
|
57
|
-
// Example 2 - connection from a Volt to Relay Volt running on the public internet, such as tdxvolt.com
|
|
56
|
+
// Example - connection from a Volt to a Relay Volt running on the public internet, such as tdxvolt.com
|
|
58
57
|
message ProxyConnection {
|
|
59
58
|
// Unique connection id.
|
|
60
59
|
string id = 1;
|
|
@@ -74,9 +73,6 @@ message ProxyConnection {
|
|
|
74
73
|
// Indicates this connection is currently in use.
|
|
75
74
|
bool connected = 6;
|
|
76
75
|
|
|
77
|
-
// Indicates this is a connection to a cloud-based tunnel, rather than to a Relay Volt.
|
|
78
|
-
bool is_cloud_connection = 7;
|
|
79
|
-
|
|
80
76
|
// Indicates that this connection will handle HTTP proxying as well as GRPC.
|
|
81
77
|
bool enable_http_proxy = 8;
|
|
82
78
|
|
|
@@ -196,12 +192,15 @@ message VoltParameters {
|
|
|
196
192
|
// The certificate authority of the Relay if this is a remote connection via a Relay.
|
|
197
193
|
string relay_ca_pem = 33;
|
|
198
194
|
|
|
199
|
-
// Set to indicate this is a remote connection to a Volt via a cloud tunnel.
|
|
200
|
-
bool is_cloud_relay = 34;
|
|
201
|
-
|
|
202
195
|
// An optional alias that can be used to refer to the Volt rather than the `id` field.
|
|
203
196
|
// This alias must be unique within the scope of the Battery in which the Volt is stored.
|
|
204
197
|
string alias = 35;
|
|
198
|
+
|
|
199
|
+
// The runtime version this Volt is running.
|
|
200
|
+
Version version = 36;
|
|
201
|
+
|
|
202
|
+
// If set, indicates that any client that provides the correct challenge in the bind phase will automatically be approved to access the Volt.
|
|
203
|
+
bool approve_on_challenge = 37;
|
|
205
204
|
}
|
|
206
205
|
|
|
207
206
|
message VoltEndpoint {
|
|
@@ -260,28 +259,54 @@ message ProtoFile {
|
|
|
260
259
|
repeated string service_name = 3;
|
|
261
260
|
}
|
|
262
261
|
|
|
262
|
+
enum ServiceHostType {
|
|
263
|
+
SERVICE_HOST_TYPE_UNKNOWN = 0;
|
|
264
|
+
SERVICE_HOST_TYPE_BUILTIN = 1;
|
|
265
|
+
SERVICE_HOST_TYPE_SERVER = 2;
|
|
266
|
+
SERVICE_HOST_TYPE_RELAYED = 3;
|
|
267
|
+
}
|
|
268
|
+
|
|
263
269
|
// Describes a Volt service.
|
|
264
270
|
message ServiceDescription {
|
|
271
|
+
ServiceHostType host_type = 1;
|
|
272
|
+
|
|
265
273
|
// The id of the server resource that is hosting this service.
|
|
266
|
-
|
|
274
|
+
// For built-in services, i.e. those hosted by the Volt, this will set to the Volt id.
|
|
275
|
+
string host_service_id = 2;
|
|
276
|
+
|
|
277
|
+
// The identity of the client that is exposing the service via a relay connection.
|
|
278
|
+
// This will be empty if the service is exposed via a grpc server.
|
|
279
|
+
string host_client_id = 3;
|
|
267
280
|
|
|
268
281
|
// The address of the grpc server hosting this service.
|
|
269
|
-
|
|
282
|
+
// This will be empty if the service is hosted by a relay client (see `relay_public_key` below).
|
|
283
|
+
string host_address = 4;
|
|
284
|
+
|
|
285
|
+
// The certificate authority (chain) that signed the service server certificate.
|
|
286
|
+
// This is only relevant to grpc-hosted services.
|
|
287
|
+
string host_ca_pem = 5;
|
|
288
|
+
|
|
289
|
+
// The public key of the service host, which is used to encrypt payloads.
|
|
290
|
+
// This may change as the service comes and goes online.
|
|
291
|
+
string host_public_key = 6;
|
|
292
|
+
|
|
293
|
+
// The fingerprint derived from `host_public_key`, included for convenience.
|
|
294
|
+
string host_fingerprint = 7;
|
|
295
|
+
|
|
296
|
+
// The connection id currently used to host this service.
|
|
297
|
+
string host_connection_id = 8;
|
|
270
298
|
|
|
271
299
|
// The discovery mode.
|
|
272
|
-
DiscoveryMode discoverable =
|
|
300
|
+
DiscoveryMode discoverable = 10;
|
|
273
301
|
|
|
274
302
|
// The ping timestamp of the server hosting this service.
|
|
275
|
-
int64 ping_timestamp =
|
|
303
|
+
int64 ping_timestamp = 11;
|
|
276
304
|
|
|
277
305
|
// The protobuf definitions of the APIs exposed by this service.
|
|
278
|
-
repeated ProtoFile proto_file =
|
|
306
|
+
repeated ProtoFile proto_file = 12;
|
|
279
307
|
|
|
280
308
|
// The fully qualified names of the protobuf services, for example tdx.volt_api.webcam.v1.WebcamControlAPI.
|
|
281
|
-
repeated string service_api =
|
|
282
|
-
|
|
283
|
-
// The certificate authority (chain) that signed the service server certificate.
|
|
284
|
-
string ca_pem = 8;
|
|
309
|
+
repeated string service_api = 13;
|
|
285
310
|
|
|
286
311
|
// Internal use only.
|
|
287
312
|
repeated MethodDescription method = 100;
|
|
@@ -376,7 +401,7 @@ message Resource {
|
|
|
376
401
|
repeated string kind = 110;
|
|
377
402
|
|
|
378
403
|
// The online status.
|
|
379
|
-
// For most kinds of resource this indicates that the server hosting the resource is online, the exception being identity resources, in which case the status reflects whether or not the identity has a live
|
|
404
|
+
// For most kinds of resource this indicates that the server hosting the resource is online, the exception being identity resources, in which case the status reflects whether or not the identity has a live connection.
|
|
380
405
|
// All built-in resources are hosted by the Volt itself and are therefore always online when the Volt is running.
|
|
381
406
|
// Resources hosted by external servers are online if the server itself is online and has registered the resource as online using `setServiceStatus`.
|
|
382
407
|
OnlineStatus online_status = 111;
|
|
@@ -403,28 +428,6 @@ enum IdentityType {
|
|
|
403
428
|
IDENTITY_TYPE_GROUP = 3;
|
|
404
429
|
}
|
|
405
430
|
|
|
406
|
-
enum IdentityAliasType {
|
|
407
|
-
IDENTITY_ALIAS_TYPE_UNKNOWN = 0;
|
|
408
|
-
IDENTITY_ALIAS_TYPE_PUBLIC_KEY = 1;
|
|
409
|
-
IDENTITY_ALIAS_TYPE_COMMON_NAME = 2;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
enum IdentityAliasSubType {
|
|
413
|
-
IDENTITY_ALIAS_SUB_TYPE_UNKNOWN = 0;
|
|
414
|
-
|
|
415
|
-
// Identifies email common name aliases.
|
|
416
|
-
IDENTITY_ALIAS_SUB_TYPE_EMAIL = 1;
|
|
417
|
-
|
|
418
|
-
// Identifies phone number common name aliases.
|
|
419
|
-
IDENTITY_ALIAS_SUB_TYPE_PHONE = 2;
|
|
420
|
-
|
|
421
|
-
// Identifies DNS common name aliases.
|
|
422
|
-
IDENTITY_ALIAS_SUB_TYPE_DNS = 3;
|
|
423
|
-
|
|
424
|
-
// Identifies public key aliases that originate from owner credentials rather than the identity itself.
|
|
425
|
-
IDENTITY_ALIAS_SUB_TYPE_OWNER = 4;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
431
|
message IdentityAlias {
|
|
429
432
|
// The corresponding identity id.
|
|
430
433
|
string identity_id = 1;
|
|
@@ -432,15 +435,15 @@ message IdentityAlias {
|
|
|
432
435
|
// The actual alias, e.g. a common name or key fingerprint.
|
|
433
436
|
string alias = 2;
|
|
434
437
|
|
|
435
|
-
// This will only be populated if alias_type ==
|
|
438
|
+
// This will only be populated if alias_type == tdx:public-key
|
|
436
439
|
string public_key = 3;
|
|
437
440
|
|
|
438
|
-
// This will only be populated if alias_type ==
|
|
441
|
+
// This will only be populated if alias_type == tdx:public-key
|
|
439
442
|
string private_key = 4;
|
|
440
443
|
|
|
441
|
-
|
|
444
|
+
string alias_type = 5;
|
|
442
445
|
|
|
443
|
-
|
|
446
|
+
string issuer_id = 6;
|
|
444
447
|
|
|
445
448
|
// Indicates if this alias has an 'authenticate' policy decision assigned.
|
|
446
449
|
PolicyDecision authenticate = 7;
|
|
@@ -561,6 +564,29 @@ message Access {
|
|
|
561
564
|
uint32 request_count = 17;
|
|
562
565
|
}
|
|
563
566
|
|
|
567
|
+
enum SessionStatus {
|
|
568
|
+
SESSION_STATUS_UNKNOWN = 0;
|
|
569
|
+
SESSION_STATUS_PENDING = 1;
|
|
570
|
+
SESSION_STATUS_ESTABLISHED = 2;
|
|
571
|
+
SESSION_STATUS_REJECTED = 3;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
message Session {
|
|
575
|
+
string id = 1;
|
|
576
|
+
|
|
577
|
+
string identity_id = 2;
|
|
578
|
+
|
|
579
|
+
string identity_name = 3;
|
|
580
|
+
|
|
581
|
+
string ip = 4;
|
|
582
|
+
|
|
583
|
+
uint64 created = 5;
|
|
584
|
+
|
|
585
|
+
uint64 modified = 6;
|
|
586
|
+
|
|
587
|
+
SessionStatus status = 7;
|
|
588
|
+
}
|
|
589
|
+
|
|
564
590
|
message VerifiableCredential {
|
|
565
591
|
string encoded = 1;
|
|
566
592
|
}
|
|
@@ -24,12 +24,18 @@ service VoltAPI {
|
|
|
24
24
|
|
|
25
25
|
rpc CheckCompatibility(CheckCompatibilityRequest) returns (CheckCompatibilityResponse);
|
|
26
26
|
|
|
27
|
-
// Creates a long-lived, bi-directional connection
|
|
27
|
+
// Creates a long-lived, bi-directional connection to the Volt.
|
|
28
28
|
// The connection stream serves several purposes, including remote invocations via a Relay, Volt event notifications, pings and service registration management.
|
|
29
|
-
// A connection
|
|
29
|
+
// A connection stream is required in order for a client to be able to register services with the Volt.
|
|
30
30
|
// When the stream is closed, any services registered on it will be set to offline.
|
|
31
31
|
rpc Connect(stream ConnectRequest) returns (stream ConnectResponse);
|
|
32
32
|
|
|
33
|
+
// Copy a resource from one folder to another.
|
|
34
|
+
// The resource metadata, attributes and store are copied.
|
|
35
|
+
// The shares attributed to the resource are **not** currently copied.
|
|
36
|
+
// n.b. Copy resources between Volts is not supported by this API. This is achieved by creating an API instance for the source and target Volts, getting the resource from the source and creating it on the target.
|
|
37
|
+
rpc CopyResource(CopyResourceRequest) returns (CopyResourceResponse);
|
|
38
|
+
|
|
33
39
|
// This is a work in progress - do not use.
|
|
34
40
|
rpc CreateVerifiableCredentialSession(CreateVerifiableCredentialSessionRequest) returns (CreateVerifiableCredentialSessionResponse);
|
|
35
41
|
|
|
@@ -84,10 +90,14 @@ service VoltAPI {
|
|
|
84
90
|
// Get descendants of a resource.
|
|
85
91
|
rpc GetResourceDescendants(GetResourceDescendantsRequest) returns (GetResourceDescendantsResponse);
|
|
86
92
|
|
|
93
|
+
// Get session(s).
|
|
94
|
+
rpc GetSession(GetSessionRequest) returns (GetSessionResponse);
|
|
95
|
+
|
|
87
96
|
// Invoke a method.
|
|
88
97
|
// This is primarily for use by Relay connections when proxying invocations.
|
|
89
98
|
rpc Invoke(stream InvokeRequest) returns (stream InvokeResponse);
|
|
90
99
|
|
|
100
|
+
// Move a resource from one folder to another.
|
|
91
101
|
rpc MoveResource(MoveResourceRequest) returns (MoveResourceResponse);
|
|
92
102
|
|
|
93
103
|
// Request access to a resource.
|
|
@@ -97,8 +107,7 @@ service VoltAPI {
|
|
|
97
107
|
// Create or update an access rule.
|
|
98
108
|
rpc SaveAccess(SaveAccessRequest) returns (SaveAccessResponse);
|
|
99
109
|
|
|
100
|
-
|
|
101
|
-
rpc SaveCloudConnection(SaveCloudConnectionRequest) returns (SaveCloudConnectionResponse);
|
|
110
|
+
rpc SaveAuthentication(SaveAuthenticationRequest) returns (SaveAuthenticationResponse);
|
|
102
111
|
|
|
103
112
|
// Create or update an identity.
|
|
104
113
|
rpc SaveIdentity(SaveIdentityRequest) returns (SaveIdentityResponse);
|
|
@@ -110,6 +119,12 @@ service VoltAPI {
|
|
|
110
119
|
// Create or update resource in this volt.
|
|
111
120
|
rpc SaveResource(SaveResourceRequest) returns (SaveResourceResponse);
|
|
112
121
|
|
|
122
|
+
// Save a session.
|
|
123
|
+
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
124
|
+
|
|
125
|
+
// Experimental - please ignore.
|
|
126
|
+
rpc Session(SessionRequest) returns (SessionResponse);
|
|
127
|
+
|
|
113
128
|
// Set Volt access request decision.
|
|
114
129
|
// This is a privileged call that requires Volt root access.
|
|
115
130
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
@@ -144,17 +159,17 @@ message BindRequest {
|
|
|
144
159
|
|
|
145
160
|
// The host name to add as a SAN to the issued certificate.
|
|
146
161
|
// This is optional, if you don't intend to host services with the certificate this can be omitted.
|
|
147
|
-
string host =
|
|
162
|
+
string host = 4;
|
|
148
163
|
|
|
149
164
|
// DO NOT USE
|
|
150
165
|
// Additional credentials to support the bind request.
|
|
151
166
|
// If a certificate chain is presented (in the form of a concatenated list of PEM format x509 certificates) that includes a certificate with a public key matching the `public_key` field and that certificate is signed by another certificate for which the volt policy has a trust rule, this can be used to automatically permit/deny the request.
|
|
152
167
|
// This is probably deprecated in favour of verifiable credentials.
|
|
153
|
-
repeated string x509_credential =
|
|
168
|
+
repeated string x509_credential = 5;
|
|
154
169
|
|
|
155
170
|
// Optional verifiable credentials describing the client.
|
|
156
171
|
// This is a work in progress.
|
|
157
|
-
repeated VerifiablePresentation verifiable_presentation =
|
|
172
|
+
repeated VerifiablePresentation verifiable_presentation = 6;
|
|
158
173
|
}
|
|
159
174
|
|
|
160
175
|
message BindResponse {
|
|
@@ -245,19 +260,28 @@ message ConnectHello {
|
|
|
245
260
|
// Set to receive notification of resource events.
|
|
246
261
|
bool subscribe_resource_events = 3;
|
|
247
262
|
|
|
248
|
-
// Set this to support
|
|
263
|
+
// Set this to support Relayed service invocation.
|
|
249
264
|
// This indicates that the callee is happy to receive method invocations from other clients of the Relay.
|
|
250
265
|
// Currently this will usually be set to the `id` of the calling Volt, but in theory any client could receive remote invocation requests in this way.
|
|
251
266
|
string relay_id = 4;
|
|
252
267
|
|
|
253
|
-
// A friendly name to present to
|
|
268
|
+
// A friendly name to present to Relay clients.
|
|
254
269
|
string relay_name = 5;
|
|
255
270
|
|
|
256
|
-
// The certificate authority to present to
|
|
271
|
+
// The certificate authority to present to Relay clients.
|
|
257
272
|
string relay_ca_pem = 6;
|
|
258
273
|
|
|
259
274
|
// Set to indicate the connection is discoverable to other Relay clients.
|
|
260
275
|
bool relay_discoverable = 7;
|
|
276
|
+
|
|
277
|
+
// Set to receive notification of authentication requests.
|
|
278
|
+
bool subscribe_auth_requests = 8;
|
|
279
|
+
|
|
280
|
+
bool accept_invocation = 9;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
message ConnectAcknowledge {
|
|
284
|
+
string connection_id = 1;
|
|
261
285
|
}
|
|
262
286
|
|
|
263
287
|
// A session ping message.
|
|
@@ -285,25 +309,25 @@ enum ConnectMessageRelay {
|
|
|
285
309
|
message ConnectMessage {
|
|
286
310
|
string id = 1;
|
|
287
311
|
string thread_id = 2;
|
|
288
|
-
string to_id =
|
|
289
|
-
string to_identity_id =
|
|
290
|
-
string to_name =
|
|
291
|
-
string message =
|
|
292
|
-
uint64 timestamp =
|
|
293
|
-
string from_id =
|
|
294
|
-
string from_identity_id =
|
|
295
|
-
string from_name =
|
|
312
|
+
string to_id = 3;
|
|
313
|
+
string to_identity_id = 4;
|
|
314
|
+
string to_name = 5;
|
|
315
|
+
string message = 6;
|
|
316
|
+
uint64 timestamp = 7;
|
|
317
|
+
string from_id = 8;
|
|
318
|
+
string from_identity_id = 9;
|
|
319
|
+
string from_name = 10;
|
|
296
320
|
|
|
297
|
-
repeated string receipt =
|
|
298
|
-
ConnectMessageType message_type =
|
|
299
|
-
ConnectMessageRelay message_relay =
|
|
321
|
+
repeated string receipt = 11;
|
|
322
|
+
ConnectMessageType message_type = 12;
|
|
323
|
+
ConnectMessageRelay message_relay = 13;
|
|
300
324
|
}
|
|
301
325
|
|
|
302
326
|
message ConnectGoodbye {
|
|
303
327
|
// Details of any error that occurred on the call.
|
|
304
328
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
305
329
|
|
|
306
|
-
// Set if the
|
|
330
|
+
// Set if the connection was ended gracefully, as opposed to errored.
|
|
307
331
|
bool ended = 2;
|
|
308
332
|
}
|
|
309
333
|
|
|
@@ -323,19 +347,28 @@ enum ConnectResourceEvent {
|
|
|
323
347
|
|
|
324
348
|
message ConnectResource {
|
|
325
349
|
// The type of resource event that has occurred.
|
|
326
|
-
ConnectResourceEvent
|
|
350
|
+
ConnectResourceEvent event = 1;
|
|
327
351
|
|
|
328
352
|
// Details of the resource.
|
|
329
353
|
Resource resource = 2;
|
|
330
354
|
}
|
|
331
355
|
|
|
356
|
+
message ConnectAuthRequest {
|
|
357
|
+
Session session = 1;
|
|
358
|
+
|
|
359
|
+
string context = 5;
|
|
360
|
+
|
|
361
|
+
string challenge = 6;
|
|
362
|
+
|
|
363
|
+
uint64 timestamp = 7;
|
|
364
|
+
}
|
|
365
|
+
|
|
332
366
|
message ConnectEvent {
|
|
333
367
|
oneof event {
|
|
334
|
-
|
|
335
|
-
ConnectResource connect_resource = 3;
|
|
368
|
+
ConnectAuthRequest connect_auth_request = 1;
|
|
336
369
|
|
|
337
|
-
//
|
|
338
|
-
|
|
370
|
+
// A resource event notification, such as updated or deleted.
|
|
371
|
+
ConnectResource connect_resource = 2;
|
|
339
372
|
}
|
|
340
373
|
}
|
|
341
374
|
|
|
@@ -345,7 +378,7 @@ message ConnectRequest {
|
|
|
345
378
|
// A ConnectHello message is the first message a client sends to the target upon successfully starting the call.
|
|
346
379
|
ConnectHello hello = 1;
|
|
347
380
|
|
|
348
|
-
// Indicates the client is closing the
|
|
381
|
+
// Indicates the client is closing the connection.
|
|
349
382
|
ConnectGoodbye goodbye = 2;
|
|
350
383
|
|
|
351
384
|
// Reserved for internal use.
|
|
@@ -366,32 +399,63 @@ message ConnectRequest {
|
|
|
366
399
|
|
|
367
400
|
// One of the following payloads will be present in a given ConnectResponse message.
|
|
368
401
|
message ConnectResponse {
|
|
402
|
+
// Details of any error that occurred on the call.
|
|
403
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
404
|
+
|
|
369
405
|
oneof payload {
|
|
370
406
|
// Server response to initial handshake.
|
|
371
|
-
|
|
407
|
+
ConnectAcknowledge acknowledge = 2;
|
|
372
408
|
|
|
373
|
-
// Indicates the server is ending the
|
|
374
|
-
ConnectGoodbye goodbye =
|
|
409
|
+
// Indicates the server is ending the connection.
|
|
410
|
+
ConnectGoodbye goodbye = 3;
|
|
375
411
|
|
|
376
412
|
// Notifies clients of various events on the Volt.
|
|
377
|
-
ConnectEvent evt =
|
|
413
|
+
ConnectEvent evt = 4;
|
|
378
414
|
|
|
379
415
|
// Reserved for internal use.
|
|
380
|
-
ConnectMessage msg =
|
|
416
|
+
ConnectMessage msg = 5;
|
|
381
417
|
|
|
382
418
|
// Periodic ping response.
|
|
383
|
-
ConnectPing ping =
|
|
419
|
+
ConnectPing ping = 6;
|
|
384
420
|
|
|
385
421
|
// Send an invocation request to a remote target.
|
|
386
422
|
// n.b. The 'request' and 'response' semantics are inverted for remote invocations because the Relayed connection is established by a request **from** the 'target' Volt to the Relay. Hence any invocation on behalf of a client of the Relay involves sending a **response** back down the Relay connection to the 'target' Volt.
|
|
387
|
-
InvokeRequest invoke_request =
|
|
423
|
+
InvokeRequest invoke_request = 7;
|
|
388
424
|
|
|
389
425
|
// Send an HTTP request to a remote target.
|
|
390
426
|
// n.b. The 'request' and 'response' semantics are inverted for HTTP requests for the same reason as `invoke_request` above.
|
|
391
|
-
HttpRequest http_request =
|
|
427
|
+
HttpRequest http_request = 8;
|
|
392
428
|
}
|
|
393
429
|
}
|
|
394
430
|
|
|
431
|
+
enum CopyResourceMode {
|
|
432
|
+
COPY_RESOURCE_MODE_UNKNOWN = 0;
|
|
433
|
+
COPY_RESOURCE_MODE_COPY = 1;
|
|
434
|
+
COPY_RESOURCE_MODE_LINK = 2;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
message CopyResourceRequest {
|
|
438
|
+
// The id of the resource to copy.
|
|
439
|
+
string resource_id = 1;
|
|
440
|
+
|
|
441
|
+
// The id of the resource to receive the new copy.
|
|
442
|
+
string to_resource_id = 2;
|
|
443
|
+
|
|
444
|
+
// The copy mode to use.
|
|
445
|
+
CopyResourceMode mode = 3;
|
|
446
|
+
|
|
447
|
+
// Indicates if all descendants of the resource should be copied too. Only relevant for COPY_RESOURCE_MODE_COPY mode.
|
|
448
|
+
bool recursive = 4;
|
|
449
|
+
|
|
450
|
+
// The parent resource to link from, only relevant for COPY_RESOURCE_MODE_LINK mode.
|
|
451
|
+
string from_resource_id = 5;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
message CopyResourceResponse {
|
|
455
|
+
// Details of any error that occurred on the call.
|
|
456
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
457
|
+
}
|
|
458
|
+
|
|
395
459
|
message CreateVerifiableCredentialSessionRequest {
|
|
396
460
|
string presentation = 1;
|
|
397
461
|
}
|
|
@@ -434,13 +498,13 @@ message DiscoverServicesRequest {
|
|
|
434
498
|
// List the service APIs that should be discovered.
|
|
435
499
|
// The response will include services that match **any of** the terms given.
|
|
436
500
|
// Use of '*' to indicate wildcards is supported.
|
|
437
|
-
repeated string service_api =
|
|
501
|
+
repeated string service_api = 1;
|
|
438
502
|
|
|
439
503
|
// Set to indicate that offline services should be included in the response.
|
|
440
|
-
bool include_offline =
|
|
504
|
+
bool include_offline = 2;
|
|
441
505
|
|
|
442
506
|
// Set to include the service protobuf in the response.
|
|
443
|
-
bool include_protobuf =
|
|
507
|
+
bool include_protobuf = 3;
|
|
444
508
|
}
|
|
445
509
|
|
|
446
510
|
message DiscoverServicesResponse {
|
|
@@ -571,7 +635,7 @@ message GetResourceRequest {
|
|
|
571
635
|
string resource_id = 1;
|
|
572
636
|
|
|
573
637
|
// Set to include service description protobuf in the response, if applicable.
|
|
574
|
-
bool include_protobuf =
|
|
638
|
+
bool include_protobuf = 2;
|
|
575
639
|
}
|
|
576
640
|
|
|
577
641
|
message GetResourceResponse {
|
|
@@ -603,22 +667,22 @@ message GetResourcesRequest {
|
|
|
603
667
|
// Wildcards permitted.
|
|
604
668
|
repeated string service_api = 6;
|
|
605
669
|
|
|
606
|
-
repeated string owner =
|
|
670
|
+
repeated string owner = 7;
|
|
607
671
|
|
|
608
|
-
repeated string store =
|
|
672
|
+
repeated string store = 8;
|
|
609
673
|
|
|
610
674
|
// Indicates that the above terms should be combined using 'or' rather than 'and' (the default).
|
|
611
|
-
bool combine_terms_exclusive =
|
|
675
|
+
bool combine_terms_exclusive = 9;
|
|
612
676
|
|
|
613
677
|
// Attributes to search by.
|
|
614
678
|
// n.b. currently this API is mutually exclusive in that if any attribute queries are specified the rpc will only search on those attributes, ignoring any parameters defined above.
|
|
615
|
-
repeated ResourceAttributeQuery attribute =
|
|
679
|
+
repeated ResourceAttributeQuery attribute = 10;
|
|
616
680
|
|
|
617
681
|
// If set, will return resources where *any of* the attribute queries apply, otherwise will only return resources where *all of* the attribute queries apply.
|
|
618
|
-
bool any_of =
|
|
682
|
+
bool any_of = 11;
|
|
619
683
|
|
|
620
684
|
// Set to include service description protobuf in the response where applicable.
|
|
621
|
-
bool include_protobuf =
|
|
685
|
+
bool include_protobuf = 12;
|
|
622
686
|
}
|
|
623
687
|
|
|
624
688
|
message GetResourcesResponse {
|
|
@@ -686,16 +750,31 @@ message GetResourceDescendantsResponse {
|
|
|
686
750
|
repeated Resource descendant = 2;
|
|
687
751
|
}
|
|
688
752
|
|
|
753
|
+
message GetSessionRequest {
|
|
754
|
+
string id = 1;
|
|
755
|
+
|
|
756
|
+
string identity_id = 2;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
message GetSessionResponse {
|
|
760
|
+
// Details of any error that occurred on the call.
|
|
761
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
762
|
+
|
|
763
|
+
repeated Session session = 2;
|
|
764
|
+
}
|
|
765
|
+
|
|
689
766
|
message InvokeRequest {
|
|
690
767
|
// Client-assigned identifier for the request. Will be used to match responses and any subsequent requests.
|
|
691
768
|
uint64 invoke_id = 1;
|
|
692
769
|
|
|
693
770
|
// The client token to use for the invocation.
|
|
771
|
+
// This contains the key and iv used to encrypt the payload, which only the token audience can access because the key and iv are themselves encrypted using the public key of the invocation target.
|
|
694
772
|
string token = 2;
|
|
695
773
|
|
|
696
774
|
// Key fingerprint of the target Volt.
|
|
697
775
|
// This is used by Relays to route the request.
|
|
698
|
-
|
|
776
|
+
// We can't (currently) use the target Volt id here, since there is currently no way to universally 'reason about' a given identity (Volt). For example, Alice may have assigned Bob an identity of 123, whereas Carol assigned Bob an identity of 456.
|
|
777
|
+
repeated string target_fingerprint = 3;
|
|
699
778
|
|
|
700
779
|
oneof request_payload {
|
|
701
780
|
// A serialised and encrypted instance of `RemoteResponse` in pure binary format.
|
|
@@ -707,6 +786,10 @@ message InvokeRequest {
|
|
|
707
786
|
|
|
708
787
|
// Indicates the client has ended the invocation.
|
|
709
788
|
bool client_end = 6;
|
|
789
|
+
|
|
790
|
+
uint32 hop_index = 7;
|
|
791
|
+
|
|
792
|
+
string target_service_id = 8;
|
|
710
793
|
}
|
|
711
794
|
|
|
712
795
|
message InvokeResponse {
|
|
@@ -728,18 +811,15 @@ message InvokeResponse {
|
|
|
728
811
|
bool server_end = 5;
|
|
729
812
|
}
|
|
730
813
|
|
|
731
|
-
enum MoveResourceMode {
|
|
732
|
-
MOVE_RESOURCE_MODE_UNKNOWN = 0;
|
|
733
|
-
MOVE_RESOURCE_MODE_MOVE = 1;
|
|
734
|
-
MOVE_RESOURCE_MODE_LINK = 2;
|
|
735
|
-
MOVE_RESOURCE_MODE_COPY = 3;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
814
|
message MoveResourceRequest {
|
|
815
|
+
// The id of the resource to move.
|
|
739
816
|
string resource_id = 1;
|
|
817
|
+
|
|
818
|
+
// The resource the parent folder to move the resource from.
|
|
740
819
|
string from_resource_id = 2;
|
|
820
|
+
|
|
821
|
+
// The target folder to move the resource into.
|
|
741
822
|
string to_resource_id = 3;
|
|
742
|
-
MoveResourceMode move_mode = 4;
|
|
743
823
|
}
|
|
744
824
|
|
|
745
825
|
message MoveResourceResponse {
|
|
@@ -763,25 +843,25 @@ message RequestAccessResponse {
|
|
|
763
843
|
string resource_id = 2;
|
|
764
844
|
|
|
765
845
|
// The identity attempting access.
|
|
766
|
-
string identity_id =
|
|
846
|
+
string identity_id = 3;
|
|
767
847
|
|
|
768
848
|
// The identity of the issuer of the access.
|
|
769
|
-
string issuer_id =
|
|
849
|
+
string issuer_id = 4;
|
|
770
850
|
|
|
771
851
|
// Requested access.
|
|
772
|
-
string access =
|
|
852
|
+
string access = 5;
|
|
773
853
|
|
|
774
854
|
// Assigned decision.
|
|
775
|
-
PolicyDecision decision =
|
|
855
|
+
PolicyDecision decision = 6;
|
|
776
856
|
|
|
777
857
|
// Time at which the request was made.
|
|
778
|
-
int64 request_time =
|
|
858
|
+
int64 request_time = 7;
|
|
779
859
|
|
|
780
860
|
// Time at which the decision was taken.
|
|
781
|
-
int64 decision_time =
|
|
861
|
+
int64 decision_time = 8;
|
|
782
862
|
|
|
783
863
|
// Counter of number times this access was requested.
|
|
784
|
-
int32 request_count =
|
|
864
|
+
int32 request_count = 9;
|
|
785
865
|
}
|
|
786
866
|
|
|
787
867
|
message ResourceAttributeQuery {
|
|
@@ -800,23 +880,25 @@ message SaveAccessResponse {
|
|
|
800
880
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
801
881
|
}
|
|
802
882
|
|
|
803
|
-
message
|
|
804
|
-
|
|
805
|
-
ProxyConnection connection = 1;
|
|
883
|
+
message SaveAuthenticationRequest {
|
|
884
|
+
string id = 1;
|
|
806
885
|
|
|
807
|
-
|
|
808
|
-
bool create = 2;
|
|
886
|
+
string identity_id = 2;
|
|
809
887
|
|
|
810
|
-
|
|
811
|
-
|
|
888
|
+
string identity_did = 3;
|
|
889
|
+
|
|
890
|
+
string public_key = 4;
|
|
891
|
+
|
|
892
|
+
string encrypt_key = 5;
|
|
893
|
+
|
|
894
|
+
string encrypt_iv = 6;
|
|
895
|
+
|
|
896
|
+
PolicyDecision decision = 7;
|
|
812
897
|
}
|
|
813
898
|
|
|
814
|
-
message
|
|
899
|
+
message SaveAuthenticationResponse {
|
|
815
900
|
// Details of any error that occurred on the call.
|
|
816
901
|
tdx.volt_api.volt.v1.Status status = 1;
|
|
817
|
-
|
|
818
|
-
// The updated connection details.
|
|
819
|
-
ProxyConnection connection = 2;
|
|
820
902
|
}
|
|
821
903
|
|
|
822
904
|
message SaveIdentityRequest {
|
|
@@ -890,6 +972,32 @@ message SaveResourceResponse {
|
|
|
890
972
|
Resource resource = 2;
|
|
891
973
|
}
|
|
892
974
|
|
|
975
|
+
message SaveSessionRequest {
|
|
976
|
+
Session session = 1;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
message SaveSessionResponse {
|
|
980
|
+
// Details of any error that occurred on the call.
|
|
981
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
982
|
+
|
|
983
|
+
Session session = 2;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
message SessionRequest {
|
|
987
|
+
string session_id = 1;
|
|
988
|
+
oneof payload {
|
|
989
|
+
string fingerprint = 2;
|
|
990
|
+
string signature = 3;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
message SessionResponse {
|
|
995
|
+
// Details of any error that occurred on the call.
|
|
996
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
997
|
+
string proof = 2;
|
|
998
|
+
string session_id = 3;
|
|
999
|
+
}
|
|
1000
|
+
|
|
893
1001
|
message SetServiceStatusRequest {
|
|
894
1002
|
// The service description details.
|
|
895
1003
|
Resource service = 2;
|
|
@@ -968,9 +1076,9 @@ message SignVerifyResponse {
|
|
|
968
1076
|
|
|
969
1077
|
oneof payload {
|
|
970
1078
|
// The signature in raw binary form.
|
|
971
|
-
bytes digest =
|
|
1079
|
+
bytes digest = 2;
|
|
972
1080
|
|
|
973
1081
|
// The signature encoded using base64.
|
|
974
|
-
string digest_encoded =
|
|
1082
|
+
string digest_encoded = 3;
|
|
975
1083
|
}
|
|
976
1084
|
}
|
|
@@ -6,7 +6,7 @@ import "tdx/volt_api/volt/v1/status.proto";
|
|
|
6
6
|
|
|
7
7
|
// The Wire API allows clients to subscribe and publish to Volt wire resources.
|
|
8
8
|
service WireAPI {
|
|
9
|
-
// Establishes a
|
|
9
|
+
// Establishes a bi-directional streaming call to the wire resource.
|
|
10
10
|
rpc PublishWire(stream PublishWireRequest) returns (stream PublishWireResponse);
|
|
11
11
|
|
|
12
12
|
// Establishes a bi-directional streaming call to the wire resource.
|
|
@@ -42,10 +42,10 @@ function issueBind(bindRequest, ttl) {
|
|
|
42
42
|
// This is the certificate assigned to us by the volt.
|
|
43
43
|
this._credential.cache.cert = bindResponse.cert;
|
|
44
44
|
|
|
45
|
-
// This is the signing CA used by the volt
|
|
45
|
+
// This is the signing CA used by the volt.
|
|
46
46
|
this._credential.cache.ca = bindResponse.chain;
|
|
47
47
|
|
|
48
|
-
//
|
|
48
|
+
// Identity resource id is assigned by the volt.
|
|
49
49
|
this._credential.cache.client_id = bindResponse.identity_id;
|
|
50
50
|
this._credential.saveCache();
|
|
51
51
|
break;
|