@tdxvolt/volt-client-grpc 0.15.1 → 0.16.0-beta.1

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.
@@ -0,0 +1,126 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.volt.v1;
4
+
5
+ import "tdx/volt_api/volt/v1/ssi.proto";
6
+ import "tdx/volt_api/volt/v1/status.proto";
7
+
8
+ service SsiAPI {
9
+ rpc DeleteDID(DeleteDIDRequest) returns (DeleteDIDResponse);
10
+ rpc GetDIDDocument(GetDIDDocumentRequest) returns (GetDIDDocumentResponse);
11
+ rpc GetDIDRegistryUpdates(GetDIDRegistryUpdatesRequest) returns (GetDIDRegistryUpdatesResponse);
12
+ rpc ParseCredential(ParseCredentialRequest) returns (ParseCredentialResponse);
13
+ rpc ResolveDID(ResolveDIDRequest) returns (ResolveDIDResponse);
14
+ rpc RegisterDIDDocument(RegisterDIDDocumentRequest) returns (RegisterDIDDocumentResponse);
15
+ }
16
+
17
+ message DeleteDIDRequest {
18
+ // The id of the identity to delete.
19
+ string did = 1;
20
+ }
21
+
22
+ message DeleteDIDResponse {
23
+ // Details of any error that occurred on the call.
24
+ tdx.volt_api.volt.v1.Status status = 1;
25
+ }
26
+
27
+ message GetDIDDocumentRequest {
28
+ // The id of the identity to retrieve.
29
+ string did = 1;
30
+
31
+ // If set, the search is restricted to the local registry only, otherwise all configured registries are searched.
32
+ bool local_only = 2;
33
+ }
34
+
35
+ message GetDIDDocumentResponse {
36
+ // Details of any error that occurred on the call.
37
+ tdx.volt_api.volt.v1.Status status = 1;
38
+
39
+ DIDRegistryUpdate did_document = 2;
40
+ }
41
+
42
+ message GetDIDRegistryUpdatesRequest {
43
+ // The id of the last update received.
44
+ // All updates since this id will be returned, limited to the maximum number of updates specified in the request.
45
+ // To fully synchronise, clients should continue calling this method until the response contains no updates.
46
+ // If this is the first call, then this should be set to 0.
47
+ uint64 since_id = 1;
48
+
49
+ // The maximum number of updates to return, defaults to 1000.
50
+ uint32 max_updates = 2;
51
+
52
+ string origin_volt = 3;
53
+ }
54
+
55
+ message GetDIDRegistryUpdatesResponse {
56
+ // Details of any error that occurred on the call.
57
+ tdx.volt_api.volt.v1.Status status = 1;
58
+
59
+ // The updates.
60
+ repeated DIDRegistryUpdate update = 2;
61
+ }
62
+
63
+ message ResolveDIDRequest {
64
+ // The DID to resolve.
65
+ string did = 1;
66
+
67
+ // Set to search all known registries rather than just the local registry.
68
+ bool include_registries = 2;
69
+ }
70
+
71
+ message ResolveDIDResponse {
72
+ tdx.volt_api.volt.v1.Status status = 1;
73
+
74
+ // The JSON representation of the DID document.
75
+ string did_document = 2;
76
+
77
+ // The signature used to save this version of the DID document.
78
+ string update_signature = 3;
79
+
80
+ // The DID of the Volt that saved this version of the DID document.
81
+ string origin_volt = 4;
82
+ }
83
+
84
+ message RegisterDIDDocumentRequest {
85
+ bool create = 1;
86
+
87
+ // The DID document to save.
88
+ DIDRegistryUpdate did_update = 2;
89
+
90
+ // When updating an existing DID document, it is necessary to include a signature of the document JSON, signed by the DID document's current owner.
91
+ // This is different from the proof contained in the DID document itself.
92
+ string update_signature = 3;
93
+ }
94
+
95
+ message RegisterDIDDocumentResponse {
96
+ // Details of any error that occurred on the call.
97
+ tdx.volt_api.volt.v1.Status status = 1;
98
+
99
+ DIDRegistryUpdate did_document = 2;
100
+ }
101
+
102
+
103
+ // Empty ATM - a VC is issued for the authenticated identity.
104
+ message TrustVerifiableCredentialRequest {
105
+ }
106
+
107
+ message TrustVerifiableCredentialResponse {
108
+ tdx.volt_api.volt.v1.Status status = 1;
109
+ string verifiable_credential_json = 2;
110
+ }
111
+
112
+ message ParseCredentialRequest {
113
+ oneof credential {
114
+ VerifiablePresentation verifiable_presentation = 1;
115
+ string url = 2;
116
+ }
117
+ string public_key = 3;
118
+ }
119
+
120
+ message ParseCredentialResponse {
121
+ tdx.volt_api.volt.v1.Status status = 1;
122
+ string id = 2;
123
+ string issuer_id = 3;
124
+ string subject_id = 4;
125
+ string claim_json = 5;
126
+ }
@@ -24,18 +24,6 @@ enum OnlineStatus {
24
24
  ONLINE_STATUS_OFFLINE = 2;
25
25
  }
26
26
 
27
- // @todo currently this must align with AuthorisationDecision enum in policy library, but some of the values are irrelevant outside of the public API so we need a public-facing enum and some translation.
28
- enum PolicyDecision {
29
- POLICY_DECISION_UNKNOWN = 0;
30
- POLICY_DECISION_PROMPT = 1;
31
- POLICY_DECISION_PERMIT = 2;
32
- POLICY_DECISION_DENY = 3;
33
- POLICY_DECISION_INDETERMINATE = 4;
34
- POLICY_DECISION_NOT_APPLICABLE = 5;
35
- POLICY_DECISION_APPLICABLE = 6;
36
- POLICY_DECISION_PENDING = 7;
37
- }
38
-
39
27
  // Not used ATM.
40
28
  enum ResourceStatus {
41
29
  RESOURCE_STATUS_UNKNOWN = 0;
@@ -51,6 +39,31 @@ enum ShareMode {
51
39
  SHARE_MODE_PUBLIC_READ = 2;
52
40
  }
53
41
 
42
+ // @todo currently this must align with AuthorisationDecision enum in policy library, but some of the values are irrelevant outside of the public API so we need a public-facing enum and some translation.
43
+ enum PolicyDecision {
44
+ POLICY_DECISION_UNKNOWN = 0;
45
+ POLICY_DECISION_PROMPT = 1;
46
+ POLICY_DECISION_PERMIT = 2;
47
+ POLICY_DECISION_DENY = 3;
48
+ POLICY_DECISION_INDETERMINATE = 4;
49
+ POLICY_DECISION_NOT_APPLICABLE = 5;
50
+ POLICY_DECISION_APPLICABLE = 6;
51
+ POLICY_DECISION_PENDING = 7;
52
+ }
53
+
54
+ // Attribute data types.
55
+ enum AttributeDataType {
56
+ ATTRIBUTE_DATA_TYPE_UNKNOWN = 0;
57
+ ATTRIBUTE_DATA_TYPE_STRING = 1;
58
+ ATTRIBUTE_DATA_TYPE_INTEGER = 2;
59
+ ATTRIBUTE_DATA_TYPE_REAL = 3;
60
+ ATTRIBUTE_DATA_TYPE_BOOLEAN = 4;
61
+ ATTRIBUTE_DATA_TYPE_BYTES = 5;
62
+
63
+ ATTRIBUTE_DATA_TYPE_IDENTITY = 100;
64
+ ATTRIBUTE_DATA_TYPE_RESOURCE = 101;
65
+ }
66
+
54
67
  // Represents an outbound connection from a Volt to a remote service that will act as a proxy for that Volt.
55
68
  // This enables Volts to bypass firewall and NATs.
56
69
  // Example - connection from a Volt to a Relay Volt running on the public internet, such as tdxvolt.com
@@ -81,6 +94,15 @@ message ProxyConnection {
81
94
 
82
95
  // Optional challenge that can be presented in the bind phase when initialising the connection.
83
96
  string challenge = 10;
97
+
98
+ // Indicates that this connection hosts a DID registry that we should synchronise with.
99
+ bool sync_did_registry = 11;
100
+
101
+ // The id of the last DID registry operation that was synchronised.
102
+ uint64 did_registry_sync_id = 12;
103
+
104
+ // The id of the target Volt that this connection is bound to.
105
+ string target_id = 13;
84
106
  }
85
107
 
86
108
  enum SecureMode {
@@ -192,6 +214,13 @@ message VoltParameters {
192
214
  // The certificate authority of the Relay if this is a remote connection via a Relay.
193
215
  string relay_ca_pem = 33;
194
216
 
217
+ // Optional override of the http address, rather than using the default of fixed_host:http_port.
218
+ // This is useful if the Volt is behind a firewall or NAT, and the http server is listening on a different port
219
+ // from 80 or 443 but this is hidden by the proxy. For example, if the `fixed_host` is `coreid.com` and http server is
220
+ // listening on 2115, but the proxy is forwarding 443 to 2115, then the http_address_override would be set to
221
+ // `https://coreid.com`.
222
+ string http_address_override = 34;
223
+
195
224
  // An optional alias that can be used to refer to the Volt rather than the `id` field.
196
225
  // This alias must be unique within the scope of the Battery in which the Volt is stored.
197
226
  string alias = 35;
@@ -201,6 +230,12 @@ message VoltParameters {
201
230
 
202
231
  // If set, indicates that any client that provides the correct challenge in the bind phase will automatically be approved to access the Volt.
203
232
  bool approve_on_challenge = 37;
233
+
234
+ // Maintain and expose a database of DIDs.
235
+ bool enable_did_registry = 38;
236
+
237
+ // Zero or more URLs of trusted peer DID registries.
238
+ repeated string did_registry = 40;
204
239
  }
205
240
 
206
241
  message VoltEndpoint {
@@ -261,8 +296,11 @@ message ProtoFile {
261
296
 
262
297
  enum ServiceHostType {
263
298
  SERVICE_HOST_TYPE_UNKNOWN = 0;
299
+ // A built-in service hosted by the Volt.
264
300
  SERVICE_HOST_TYPE_BUILTIN = 1;
301
+ // A service hosted by a grpc server other than the Volt.
265
302
  SERVICE_HOST_TYPE_SERVER = 2;
303
+ // A service hosted by a Volt client via a relay connection, i.e. the service is not exposed by a server as such, rather a Volt client implements the service and a Volt acts as a proxy, calling back to the client to implement the methods.
266
304
  SERVICE_HOST_TYPE_RELAYED = 3;
267
305
  }
268
306
 
@@ -270,16 +308,19 @@ enum ServiceHostType {
270
308
  message ServiceDescription {
271
309
  ServiceHostType host_type = 1;
272
310
 
273
- // The id of the server resource that is hosting this service.
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;
311
+ // The identity of the client that is exposing the service.
312
+ // For example, if a third party is exposing a database service via a Volt, it will first bind to the Volt and obtain a client DID and credentials in order to be able to create service resource(s).
313
+ // Any resources that are owned by this client will be marked as online if the client itself is online, i.e. has a live connection to the Volt.
314
+ // This will be empty if the service is a built-in Volt service.
315
+ string host_client_id = 2;
276
316
 
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;
317
+ // The id of the resource that holds the protobuf definition for this resource.
318
+ // For example, if a third party is exposing a database service via a Volt, it will create a service resource that holds details of the protobuf methods exposed by the service.
319
+ // For built-in services, i.e. those hosted by the Volt, this will set to the Volt id.
320
+ string host_service_id = 3;
280
321
 
281
322
  // The address of the grpc server hosting this service.
282
- // This will be empty if the service is hosted by a relay client (see `relay_public_key` below).
323
+ // Only relevant to grpc-hosted services.
283
324
  string host_address = 4;
284
325
 
285
326
  // The certificate authority (chain) that signed the service server certificate.
@@ -290,9 +331,6 @@ message ServiceDescription {
290
331
  // This may change as the service comes and goes online.
291
332
  string host_public_key = 6;
292
333
 
293
- // The fingerprint derived from `host_public_key`, included for convenience.
294
- string host_fingerprint = 7;
295
-
296
334
  // The connection id currently used to host this service.
297
335
  string host_connection_id = 8;
298
336
 
@@ -312,24 +350,11 @@ message ServiceDescription {
312
350
  repeated MethodDescription method = 100;
313
351
  }
314
352
 
315
- // Resource attribute data types.
316
- enum AttributeDataType {
317
- ATTRIBUTE_DATA_TYPE_UNKNOWN = 0;
318
- ATTRIBUTE_DATA_TYPE_STRING = 1;
319
- ATTRIBUTE_DATA_TYPE_INTEGER = 2;
320
- ATTRIBUTE_DATA_TYPE_REAL = 3;
321
- ATTRIBUTE_DATA_TYPE_BOOLEAN = 4;
322
- ATTRIBUTE_DATA_TYPE_BYTES = 5;
323
-
324
- ATTRIBUTE_DATA_TYPE_IDENTITY = 100;
325
- ATTRIBUTE_DATA_TYPE_RESOURCE = 101;
326
- }
327
-
328
- // Resource attribute value will be one of the following fields, depending on the data type.
353
+ // Attribute value will be one of the following fields, depending on the data type.
329
354
  message AttributeValue {
330
355
  oneof value {
331
356
  string string = 1;
332
- int32 integer = 2;
357
+ int64 integer = 2;
333
358
  double real = 3;
334
359
  bool boolean = 4;
335
360
  bytes bytes = 5;
@@ -429,32 +454,38 @@ enum IdentityType {
429
454
  }
430
455
 
431
456
  message IdentityAlias {
457
+ // The alias id.
458
+ uint32 id = 1;
459
+
432
460
  // The corresponding identity id.
433
- string identity_id = 1;
461
+ string identity_id = 2;
434
462
 
435
463
  // The actual alias, e.g. a common name or key fingerprint.
436
- string alias = 2;
437
-
438
- // This will only be populated if alias_type == tdx:public-key
439
- string public_key = 3;
464
+ string alias = 3;
440
465
 
441
466
  // This will only be populated if alias_type == tdx:public-key
442
- string private_key = 4;
467
+ string public_key = 4;
443
468
 
444
- string alias_type = 5;
469
+ // This will only be populated if alias_type == tdx:public-key, and the key is stored in the Volt.
470
+ string private_key = 5;
445
471
 
446
- string issuer_id = 6;
472
+ // The alias type, for example public key, email, phone number etc.
473
+ string alias_type = 6;
447
474
 
448
- // Indicates if this alias has an 'authenticate' policy decision assigned.
449
- PolicyDecision authenticate = 7;
475
+ // The identity that issued this alias.
476
+ string issuer_id = 7;
450
477
 
451
478
  // Indicates if this alias has an 'bind' policy decision assigned.
452
479
  PolicyDecision bind = 8;
480
+
481
+ // Optional description of this alias.
482
+ string description = 9;
453
483
  }
454
484
 
455
485
  // A Volt identity encompasses a Resource and a set of identity aliases.
456
486
  message Identity {
457
487
  Resource resource = 1;
488
+
458
489
  repeated IdentityAlias alias = 2;
459
490
  }
460
491
 
@@ -514,6 +545,10 @@ message Binding {
514
545
 
515
546
  // Set if the bind request presented a valid challenge code.
516
547
  bool volt_challenge = 15;
548
+
549
+ string did_document = 16;
550
+
551
+ string did_document_signature = 17;
517
552
  }
518
553
 
519
554
  message Access {
@@ -571,27 +606,49 @@ enum SessionStatus {
571
606
  SESSION_STATUS_REJECTED = 3;
572
607
  }
573
608
 
609
+ message SessionCredential {
610
+ // The alias id.
611
+ uint32 id = 1;
612
+
613
+ // The corresponding session id.
614
+ string session_id = 2;
615
+
616
+ // The actual credential, e.g. a key fingerprint or VC.
617
+ string credential = 3;
618
+
619
+ // The credential type, for example public key, email, phone number etc.
620
+ string credential_type = 4;
621
+
622
+ // The identity that issued this alias.
623
+ string issuer_id = 5;
624
+
625
+ // Optional description of this alias.
626
+ string description = 6;
627
+
628
+ // Type-specific extra data stored with the credential.
629
+ string extra = 7;
630
+
631
+ // More type-specific data stored with the credential.
632
+ string extra_2 = 8;
633
+ }
634
+
574
635
  message Session {
575
636
  string id = 1;
576
637
 
577
- string identity_id = 2;
638
+ // string public_key = 2;
578
639
 
579
- string identity_name = 3;
640
+ string identity_id = 3;
580
641
 
581
- string ip = 4;
642
+ string identity_name = 4;
582
643
 
583
- uint64 created = 5;
644
+ string ip = 5;
584
645
 
585
- uint64 modified = 6;
646
+ repeated SessionCredential credential = 6;
586
647
 
587
- SessionStatus status = 7;
588
- }
648
+ uint64 created = 7;
589
649
 
590
- message VerifiableCredential {
591
- string encoded = 1;
592
- }
650
+ uint64 modified = 8;
593
651
 
594
- message VerifiablePresentation {
595
- VerifiableCredential credential = 1;
596
- string signature = 2;
652
+ SessionStatus status = 9;
597
653
  }
654
+
@@ -4,6 +4,7 @@ package tdx.volt_api.volt.v1;
4
4
 
5
5
  import "tdx/volt_api/volt/v1/status.proto";
6
6
  import "tdx/volt_api/volt/v1/remote.proto";
7
+ import "tdx/volt_api/volt/v1/ssi.proto";
7
8
  import "tdx/volt_api/volt/v1/volt.proto";
8
9
 
9
10
  // The top-level volt management service.
@@ -11,9 +12,11 @@ import "tdx/volt_api/volt/v1/volt.proto";
11
12
  // A client certificate can be obtained from the `Bind` method.
12
13
  // All methods include a `tdx.volt_api.volt.v1.Status` in the response. If the status contains a non-OK error code the client should assume the remainder of the message is invalid, unless otherwise indicated in the response documentation.
13
14
  service VoltAPI {
15
+ rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse);
16
+
14
17
  // Issues a request to bind to the volt.
15
18
  // All clients must successfully bind to the Volt in order to gain any kind of access.
16
- // A client certificate is optional for this RPC, in which case a JWT must be provided in the call metadata.
19
+ // A client certificate is optional for this RPC, if omitted a JWT must be provided in the call metadata.
17
20
  // If the client plans to register one or more services with the Volt, it should use the 'host' field of the request so that the returned certificate has the appropriate SAN extension in place. Note that if the client IP address changes it will be necessary to re-Bind the client and obtain a new certificate.
18
21
  // If the bind decision is 'permit', the bind response contains various details that should be persisted by the client, including the unique identifier assigned by the Volt and a signed client certificate along with the Volt CA certificate.
19
22
  rpc Bind(BindRequest) returns (BindResponse);
@@ -122,9 +125,6 @@ service VoltAPI {
122
125
  // Save a session.
123
126
  rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
124
127
 
125
- // Experimental - please ignore.
126
- rpc Session(SessionRequest) returns (SessionResponse);
127
-
128
128
  // Set Volt access request decision.
129
129
  // This is a privileged call that requires Volt root access.
130
130
  rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
@@ -133,6 +133,8 @@ service VoltAPI {
133
133
  // This is a privileged call that requires Volt root access.
134
134
  rpc SetBindingDecision(SetBindingDecisionRequest) returns (SetBindingDecisionResponse);
135
135
 
136
+ rpc SetPolicy(SetPolicyRequest) returns (SetPolicyResponse);
137
+
136
138
  // Set the status of a Volt service.
137
139
  rpc SetServiceStatus(SetServiceStatusRequest) returns (SetServiceStatusResponse);
138
140
 
@@ -145,31 +147,112 @@ service VoltAPI {
145
147
  }
146
148
 
147
149
  // Describes a request to bind to a volt.
148
- message BindRequest {
150
+ message AuthenticateRequest {
151
+
152
+ oneof client_identifier {
153
+ // An existing DID owned by the client.
154
+ // The JWT presented with the Bind call must be signed by the private key corresponding to this DID.
155
+ string did = 1;
156
+
157
+ // If the client doesn't have an existing DID, a DID document can be provided here.
158
+ // The document must include a proof that the client owns the public key given in `public_key`.
159
+ // The Volt will register the DID on behalf of the client.
160
+ // The JWT presented with the Bind call must be signed by the private key corresponding to this document.
161
+ string did_document = 2;
162
+
163
+ // The client public key - must be in PEM format. If the client DID is lost or unknown for some reason, providing the public key here will allow the Volt to match it with the previously registered DID.
164
+ // Note this is only valid when a DID has previously been registered using this public key.
165
+ string public_key = 3;
166
+ }
149
167
 
150
- // The client public key - must be in PEM format.
151
- string public_key = 1;
168
+ // A base64-encoded signature of the DID document, only required if `did_document` is provided above.
169
+ string did_document_signature = 4;
152
170
 
153
171
  // A human-readable name of the entity requesting to bind.
154
- string binding_name = 2;
172
+ string binding_name = 5;
155
173
 
156
174
  // The volt challenge code, signed by the private key component of the `public_key` field above, and base64 encoded.
157
175
  // This is optional.
158
- string challenge = 3;
176
+ string challenge = 6;
159
177
 
160
178
  // The host name to add as a SAN to the issued certificate.
161
179
  // This is optional, if you don't intend to host services with the certificate this can be omitted.
162
- string host = 4;
180
+ string host = 7;
181
+
182
+ // Optional verifiable credentials describing the client.
183
+ // This is a work in progress.
184
+ repeated VerifiablePresentation verifiable_presentation = 8;
185
+
186
+ // Reserved for internal use.
187
+ bool purge_aliases = 9;
188
+ }
189
+
190
+ message AuthenticateResponse {
191
+ // Details of any error that occurred on the call.
192
+ tdx.volt_api.volt.v1.Status status = 1;
193
+
194
+ string session_id = 2;
195
+
196
+ // The identity id assigned to this binding.
197
+ // Only valid for PERMIT bind decisions.
198
+ string identity_id = 3;
199
+
200
+ // A certificate issued by the volt CA, binding the request public key to the identity.
201
+ // Only valid for PERMIT bind decisions.
202
+ string cert = 4;
203
+
204
+ // The volt CA chain. This is used by the client in subsequent API calls to secure the connection.
205
+ string chain = 5;
206
+
207
+ // The bind decision.
208
+ PolicyDecision decision = 6;
209
+
210
+ // Reserved for internal use.
211
+ int64 request_time = 7;
163
212
 
164
- // DO NOT USE
165
- // Additional credentials to support the bind request.
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.
167
- // This is probably deprecated in favour of verifiable credentials.
168
- repeated string x509_credential = 5;
213
+ // Reserved for internal use.
214
+ int64 decision_time = 8;
215
+ }
216
+
217
+ // Describes a request to bind to a volt.
218
+ message BindRequest {
219
+
220
+ oneof client_identifier {
221
+ // An existing DID owned by the client.
222
+ // The JWT presented with the Bind call must be signed by the private key corresponding to this DID.
223
+ string did = 1;
224
+
225
+ // If the client doesn't have an existing DID, a DID document can be provided here.
226
+ // The document must include a proof that the client owns the public key given in `public_key`.
227
+ // The Volt will register the DID on behalf of the client.
228
+ // The JWT presented with the Bind call must be signed by the private key corresponding to this document.
229
+ string did_document = 2;
230
+
231
+ // The client public key - must be in PEM format. If the client DID is lost or unknown for some reason, providing the public key here will allow the Volt to match it with the previously registered DID.
232
+ // Note this is only valid when a DID has previously been registered using this public key.
233
+ string public_key = 3;
234
+ }
235
+
236
+ // A base64-encoded signature of the DID document, only required if `did_document` is provided above.
237
+ string did_document_signature = 4;
238
+
239
+ // A human-readable name of the entity requesting to bind.
240
+ string binding_name = 5;
241
+
242
+ // The volt challenge code, signed by the private key component of the `public_key` field above, and base64 encoded.
243
+ // This is optional.
244
+ string challenge = 6;
245
+
246
+ // The host name to add as a SAN to the issued certificate.
247
+ // This is optional, if you don't intend to host services with the certificate this can be omitted.
248
+ string host = 7;
169
249
 
170
250
  // Optional verifiable credentials describing the client.
171
251
  // This is a work in progress.
172
- repeated VerifiablePresentation verifiable_presentation = 6;
252
+ repeated VerifiablePresentation verifiable_presentation = 8;
253
+
254
+ // Reserved for internal use.
255
+ bool purge_aliases = 9;
173
256
  }
174
257
 
175
258
  message BindResponse {
@@ -278,13 +361,15 @@ message ConnectHello {
278
361
  bool subscribe_auth_requests = 8;
279
362
 
280
363
  bool accept_invocation = 9;
364
+
365
+ bool subscribe_did_registry_updates = 10;
281
366
  }
282
367
 
283
368
  message ConnectAcknowledge {
284
369
  string connection_id = 1;
285
370
  }
286
371
 
287
- // A session ping message.
372
+ // A connection ping message.
288
373
  message ConnectPing {
289
374
  // The time on the originating server.
290
375
  uint64 timestamp = 1;
@@ -343,6 +428,7 @@ enum ConnectResourceEvent {
343
428
  CONNECT_RESOURCE_EVENT_DELETE = 3;
344
429
  CONNECT_RESOURCE_EVENT_CREATE_CHILD = 4;
345
430
  CONNECT_RESOURCE_EVENT_DELETE_CHILD = 5;
431
+ CONNECT_RESOURCE_EVENT_DATABASE_WRITE = 6;
346
432
  }
347
433
 
348
434
  message ConnectResource {
@@ -363,12 +449,18 @@ message ConnectAuthRequest {
363
449
  uint64 timestamp = 7;
364
450
  }
365
451
 
452
+ message ConnectDIDRegistryUpdate {
453
+ DIDRegistryUpdate update = 1;
454
+ }
455
+
366
456
  message ConnectEvent {
367
457
  oneof event {
368
458
  ConnectAuthRequest connect_auth_request = 1;
369
459
 
370
460
  // A resource event notification, such as updated or deleted.
371
461
  ConnectResource connect_resource = 2;
462
+
463
+ ConnectDIDRegistryUpdate did_registry_update = 3;
372
464
  }
373
465
  }
374
466
 
@@ -620,6 +712,8 @@ message GetParametersResponse {
620
712
 
621
713
  // This an empty message.
622
714
  message GetPolicyRequest {
715
+ // Set to only retrieve the custom policy document.
716
+ bool custom_policy = 1;
623
717
  }
624
718
 
625
719
  message GetPolicyResponse {
@@ -771,10 +865,9 @@ message InvokeRequest {
771
865
  // 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.
772
866
  string token = 2;
773
867
 
774
- // Key fingerprint of the target Volt.
868
+ // The DID of the target identity hosting the service.
775
869
  // This is used by Relays to route the request.
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;
870
+ repeated string target_did = 3;
778
871
 
779
872
  oneof request_payload {
780
873
  // A serialised and encrypted instance of `RemoteResponse` in pure binary format.
@@ -916,6 +1009,17 @@ message SaveIdentityRequest {
916
1009
 
917
1010
  // Reserved for system use.
918
1011
  string create_in_parent_id = 4;
1012
+
1013
+ // Set to indicate the identity aliases should be purged before saving the identity.
1014
+ // If the `identity` field contains aliases they will be saved after the purge.
1015
+ // If the `identity` field does not contain aliases this effectively deletes all aliases for this identity.
1016
+ // This allows you to selectively update aliases if required, i.e. don't set this flag and include a single alias in the update.
1017
+ bool purge_aliases = 5;
1018
+
1019
+ string did_document = 6;
1020
+
1021
+ // The signature of the identity did document, if present.
1022
+ string did_update_signature = 7;
919
1023
  }
920
1024
 
921
1025
  message SaveIdentityResponse {
@@ -985,19 +1089,13 @@ message SaveSessionResponse {
985
1089
  Session session = 2;
986
1090
  }
987
1091
 
988
- message SessionRequest {
989
- string session_id = 1;
990
- oneof payload {
991
- string fingerprint = 2;
992
- string signature = 3;
993
- }
1092
+ message SetPolicyRequest {
1093
+ string custom_policy = 1;
994
1094
  }
995
1095
 
996
- message SessionResponse {
1096
+ message SetPolicyResponse {
997
1097
  // Details of any error that occurred on the call.
998
1098
  tdx.volt_api.volt.v1.Status status = 1;
999
- string proof = 2;
1000
- string session_id = 3;
1001
1099
  }
1002
1100
 
1003
1101
  message SetServiceStatusRequest {