@tdxvolt/volt-client-grpc 0.16.0-beta.9 → 0.18.0

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.
@@ -92,17 +92,27 @@ message ProxyConnection {
92
92
  // Set to indicate the Volt API itself is not automatically exposed to the connection.
93
93
  bool disable_volt_api = 9;
94
94
 
95
- // Optional challenge that can be presented in the bind phase when initialising the connection.
95
+ // Optional challenge that can be presented in the authentication request.
96
96
  string challenge = 10;
97
97
 
98
+ // The id of the target Volt that this connection is bound to.
99
+ string target_id = 11;
100
+
98
101
  // Indicates that this connection hosts a DID registry that we should synchronise with.
99
- bool sync_did_registry = 11;
102
+ bool sync_did_registry = 12;
100
103
 
101
104
  // The id of the last DID registry operation that was synchronised.
102
- uint64 did_registry_sync_id = 12;
105
+ uint64 did_registry_sync_id = 13;
103
106
 
104
- // The id of the target Volt that this connection is bound to.
105
- string target_id = 13;
107
+ // Indicates that this connection hosts a DID registry that we should synchronise with.
108
+ bool sync_vc_registry = 14;
109
+
110
+ // The timestamp of the last VC registry operation that was synchronised.
111
+ uint64 vc_registry_sync_timestamp = 15;
112
+
113
+ string session_id = 16;
114
+
115
+ string certificate = 17;
106
116
  }
107
117
 
108
118
  enum SecureMode {
@@ -160,15 +170,11 @@ message VoltParameters {
160
170
  // Indicates the Volt will be discoverable by clients using the discovery api.
161
171
  bool discoverable = 16;
162
172
 
163
- // Optional base-64 encoded verifiable credential issued by the owner of this Volt.
164
- // @Toby - why is this base64 encoded?
165
- string owner_credential = 17;
173
+ // Optional challenge code that can be used aid in the process of authenticating clients.
174
+ string authenticate_challenge = 18;
166
175
 
167
- // Optional challenge code that can be used aid in the process of verifying clients attempting to bind to the Volt.
168
- string bind_challenge = 18;
169
-
170
- // Indicates that clients must present the correct challenge code in order to be able to bind to the Volt.
171
- bool require_bind_challenge = 19;
176
+ // Indicates that clients must present the correct challenge code in order to be able to authenticate.
177
+ bool require_authenticate_challenge = 19;
172
178
 
173
179
  // Internal use only.
174
180
  bool confirm_stop = 20;
@@ -183,7 +189,7 @@ message VoltParameters {
183
189
  // This means this Volt can act as a proxy for other Volts (or in fact any client) that connect to it.
184
190
  bool has_relay = 23;
185
191
 
186
- // Set to run the Relay open to any client, i.e. clients can utilise the Relay without first binding to this Volt.
192
+ // Set to run the Relay open to any client, i.e. clients can utilise the Relay without first authenticating.
187
193
  bool relay_open = 24;
188
194
 
189
195
  // Determines if the Volt HTTP server is enabled.
@@ -228,51 +234,92 @@ message VoltParameters {
228
234
  // The runtime version this Volt is running.
229
235
  Version version = 36;
230
236
 
231
- // If set, indicates that any client that provides the correct challenge in the bind phase will automatically be approved to access the Volt.
237
+ // If set, indicates that any client that provides the correct challenge during authentication will automatically be approved to access the Volt.
232
238
  bool approve_on_challenge = 37;
233
239
 
234
- // Maintain and expose a database of DIDs.
235
- bool enable_did_registry = 38;
240
+ // If set, indicates that any client that proves ownership of a DID known to the Volt will automatically be approved to access the Volt.
241
+ bool approve_on_did = 38;
242
+
243
+ // If set, indicates that clients can register DIDs with this Volt.
244
+ bool enable_did_registry = 39;
236
245
 
237
246
  // Zero or more URLs of trusted peer DID registries.
238
247
  repeated string did_registry = 40;
248
+
249
+ // If set, enables outbound SMTP.
250
+ bool enable_outbound_smtp = 41;
251
+
252
+ // The SMTP host to use for sending emails.
253
+ string outbound_smtp_host = 42;
254
+
255
+ // The SMTP port to use for sending emails.
256
+ uint32 outbound_smtp_port = 43;
257
+
258
+ // The SMTP username to use for sending emails.
259
+ string outbound_smtp_user = 44;
260
+
261
+ // The SMTP password to use for sending emails.
262
+ string outbound_smtp_password = 45;
263
+
264
+ // If set, enables sessions that authenticate using credentials rather than a DID to create resources in the 'anonymous' system folder.
265
+ bool enable_anonymous_create = 46;
266
+
267
+ // The decision to apply to all authentication requests that do not match any other policy.
268
+ // The default is PROMPT.
269
+ PolicyDecision catch_all_auth_decision = 47;
270
+
271
+ // If set, enables caching of policy decisions.
272
+ bool enable_policy_cache = 48;
273
+
274
+ // If set, enables the terminal API.
275
+ bool enable_terminal = 49;
276
+
277
+ // The time at which the Volt was started.
278
+ uint64 start_time = 50;
239
279
  }
240
280
 
241
281
  message VoltEndpoint {
242
282
  // The globally unique Volt id.
243
283
  string id = 1;
244
284
 
245
- // Optional owner credential, base 64 encoded.
246
- string owner_credential = 2;
247
-
248
285
  // Human-readable name of the Volt.
249
286
  string display_name = 3;
250
287
 
251
288
  // The actual host/ip the volt is physically running on (might be a local ip if behind firewall).
252
289
  string local_address = 4;
253
290
 
291
+ // The address of the endpoint HTTP server.
292
+ string http_address = 5;
293
+
254
294
  // The global (Relay) address of the volt. Any given volt may be advertising on more than one Relay instance. The value given here will depend on the Relay instance that handled the endpoint query response.
255
- string relay_address = 5;
295
+ string relay_address = 6;
256
296
 
257
297
  // The root certificate of the Relay instance referred to in `relay_address`.
258
- string relay_ca_pem = 6;
298
+ string relay_ca_pem = 7;
259
299
 
260
300
  // The self-signed certificate used by the volt to sign client certificates.
261
- string ca_pem = 7;
301
+ string ca_pem = 8;
262
302
 
263
303
  // The Volt public key in PEM format.
264
- string public_key = 8;
304
+ string public_key = 9;
265
305
 
266
306
  // The base58 fingerprint of the Volt public key.
267
- string fingerprint = 9;
307
+ string fingerprint = 10;
268
308
 
269
309
  // The online status of the Volt.
270
- OnlineStatus online_status = 10;
310
+ OnlineStatus online_status = 11;
271
311
 
272
- // Set to indicate that this Volt acts as a Relay.
273
- bool has_relay = 11;
312
+ // Indicates that this Volt acts as a Relay.
313
+ bool has_relay = 12;
274
314
 
275
- Version api_version = 12;
315
+ // The API version supported by the endpoint.
316
+ Version api_version = 13;
317
+
318
+ // Optional description of the endpoint.
319
+ string description = 14;
320
+
321
+ // The list of DID registries that this Volt trusts.
322
+ repeated string did_registry = 15;
276
323
  }
277
324
 
278
325
  // Internal use only.
@@ -306,10 +353,11 @@ enum ServiceHostType {
306
353
 
307
354
  // Describes a Volt service.
308
355
  message ServiceDescription {
356
+ // The configuration used by the host of this service.
309
357
  ServiceHostType host_type = 1;
310
358
 
311
359
  // 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).
360
+ // For example, if a third party is exposing a database service via a Volt, it will first authenticate and obtain a client DID and credentials in order to be able to create service resource(s).
313
361
  // 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
362
  // This will be empty if the service is a built-in Volt service.
315
363
  string host_client_id = 2;
@@ -334,6 +382,9 @@ message ServiceDescription {
334
382
  // The connection id currently used to host this service.
335
383
  string host_connection_id = 8;
336
384
 
385
+ // Internal use only.
386
+ string host_session_id = 9;
387
+
337
388
  // The discovery mode.
338
389
  DiscoveryMode discoverable = 10;
339
390
 
@@ -414,10 +465,10 @@ message Resource {
414
465
  string owner = 101;
415
466
 
416
467
  // Creation timestamp, milliseconds since epoch.
417
- int64 created = 105;
468
+ uint64 created = 105;
418
469
 
419
470
  // Last modification timestamp, milliseconds since epoch.
420
- int64 modified = 106;
471
+ uint64 modified = 106;
421
472
 
422
473
  // Not in use.
423
474
  ResourceStatus status = 108;
@@ -442,23 +493,19 @@ message Resource {
442
493
  // No format restrictions are currently applied to alias, but this may change in future, for the time being it makes sense to stick to alphanumeric characters and '_' or '-'.
443
494
  repeated string alias = 115;
444
495
 
496
+ // The hash of the resource content contained in the store.
497
+ string content_hash = 116;
498
+
445
499
  // Not yet supported.
446
500
  repeated Resource child = 200;
447
501
  }
448
502
 
449
- enum IdentityType {
450
- IDENTITY_TYPE_UNKNOWN = 0;
451
- IDENTITY_TYPE_USER = 1;
452
- IDENTITY_TYPE_AUTHORITY = 2;
453
- IDENTITY_TYPE_GROUP = 3;
454
- }
455
-
456
503
  message IdentityAlias {
457
504
  // The alias id.
458
505
  uint32 id = 1;
459
506
 
460
507
  // The corresponding identity id.
461
- string identity_id = 2;
508
+ string identity_did = 2;
462
509
 
463
510
  // The actual alias, e.g. a common name or key fingerprint.
464
511
  string alias = 3;
@@ -475,8 +522,8 @@ message IdentityAlias {
475
522
  // The identity that issued this alias.
476
523
  string issuer_id = 7;
477
524
 
478
- // Indicates if this alias has an 'bind' policy decision assigned.
479
- PolicyDecision bind = 8;
525
+ // Indicates if this alias has an authenticate policy decision assigned.
526
+ PolicyDecision authenticate = 8;
480
527
 
481
528
  // Optional description of this alias.
482
529
  string description = 9;
@@ -489,68 +536,6 @@ message Identity {
489
536
  repeated IdentityAlias alias = 2;
490
537
  }
491
538
 
492
- enum BindCredentialType {
493
- BIND_CREDENTIAL_TYPE_UNKNOWN = 0;
494
- BIND_CREDENTIAL_TYPE_OWNER = 1;
495
- BIND_CREDENTIAL_TYPE_X509 = 2;
496
- }
497
-
498
- message BindCredential {
499
- BindCredentialType credential_type = 1;
500
- string issuer_id = 2;
501
- string issuer_name = 3;
502
- string issuer_fingerprint = 4;
503
- string issuer_public_key = 5;
504
- PolicyDecision decision = 6;
505
- }
506
-
507
- message Binding {
508
- // The bind request public key fingerprint.
509
- string fingerprint = 1;
510
-
511
- // The bind request public key.
512
- string public_key = 2;
513
-
514
- // A human-readable short identifier of the binding.
515
- string friendly_name = 3;
516
-
517
- // The host name to add as a SAN to the issued certificate. See also `ip`.
518
- string host = 4;
519
-
520
- // The IP address to add as a SAN to the issued certificate as an alternative
521
- // to `host`.
522
- string ip = 5;
523
-
524
- // Counter of number times a binding was requested.
525
- uint32 request_count = 6;
526
-
527
- int64 request_time = 7;
528
-
529
- int64 decision_time = 8;
530
-
531
- // The policy decision assigned to this binding.
532
- PolicyDecision decision = 9;
533
-
534
- // The identity id associated with this binding.
535
- // Only valid if the bind request has been permitted.
536
- string identity_id = 10;
537
-
538
- string status = 11;
539
-
540
- // All credentials supplied as part of bind request.
541
- repeated BindCredential credential = 12;
542
-
543
- // The chosen 'owner' credential.
544
- BindCredential owner_credential = 14;
545
-
546
- // Set if the bind request presented a valid challenge code.
547
- bool volt_challenge = 15;
548
-
549
- string did_document = 16;
550
-
551
- string did_document_signature = 17;
552
- }
553
-
554
539
  message Access {
555
540
  string id = 1;
556
541
 
@@ -566,44 +551,48 @@ message Access {
566
551
  // The kind of resource.
567
552
  repeated string resource_kind = 5;
568
553
 
569
- // The identity attempting access.
570
- string identity_id = 6;
554
+ oneof subject {
555
+ // The identity attempting access.
556
+ string identity_did = 6;
557
+
558
+ // The JSON path array for looking up verifiable credentials.
559
+ string credential_lookup = 7;
560
+ }
571
561
 
572
562
  // A human-readable short identifier of the subject.
573
- string identity_name = 7;
563
+ string identity_name = 8;
574
564
 
575
565
  // The kind of identity.
576
- repeated string identity_kind = 8;
577
-
578
- string issuer_id = 9;
579
-
580
- string issuer_name = 10;
581
-
582
- repeated string issuer_kind = 11;
566
+ repeated string identity_kind = 9;
583
567
 
584
568
  // Requested access.
585
- string access = 12;
569
+ string access = 10;
570
+
571
+ // Optional extra data.
572
+ string extra = 11;
586
573
 
587
574
  // Assigned decision.
588
- PolicyDecision decision = 13;
575
+ PolicyDecision decision = 12;
589
576
 
590
- bool recursive = 14;
577
+ bool recursive = 13;
591
578
 
592
579
  // Time at which the request was made.
593
- int64 request_time = 15;
580
+ int64 request_time = 14;
594
581
 
595
582
  // Time at which the decision was taken.
596
- int64 decision_time = 16;
583
+ int64 decision_time = 15;
597
584
 
598
585
  // Counter of number times this access was requested.
599
- uint32 request_count = 17;
586
+ uint32 request_count = 16;
600
587
  }
601
588
 
602
589
  enum SessionStatus {
603
590
  SESSION_STATUS_UNKNOWN = 0;
604
591
  SESSION_STATUS_PENDING = 1;
605
- SESSION_STATUS_ESTABLISHED = 2;
606
- SESSION_STATUS_REJECTED = 3;
592
+ SESSION_STATUS_LIVE = 2;
593
+ SESSION_STATUS_EXPIRED = 3;
594
+ SESSION_STATUS_REVOKED = 4;
595
+ SESSION_STATUS_REJECTED = 5;
607
596
  }
608
597
 
609
598
  message SessionCredential {
@@ -613,42 +602,65 @@ message SessionCredential {
613
602
  // The corresponding session id.
614
603
  string session_id = 2;
615
604
 
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.
605
+ // The credential type, for example public key, verifiable credential, challenge etc.
620
606
  string credential_type = 4;
621
607
 
622
- // The identity that issued this alias.
623
- string issuer_id = 5;
608
+ // Optional description of this credential.
609
+ string description = 5;
624
610
 
625
- // Optional description of this alias.
626
- string description = 6;
611
+ // The id of the verifiable credential, if the credential type is volt:vc-claim.
612
+ string vc_id = 6;
613
+
614
+ // The verifiable credential in JSON format, if the credential type is volt:vc-claim.
615
+ string vc_json = 7;
616
+
617
+ // The subject id extracted from the `vc_json` field.
618
+ string vc_subject_id = 8;
619
+
620
+ // The issuer id extracted from the `vc_json` field.
621
+ string vc_issuer_id = 9;
622
+
623
+ // The comma-separated type(s) extracted from the `vc_json` field.
624
+ string vc_type = 10;
625
+
626
+ // The challenge string, if the credential type is volt:challenge.
627
+ string challenge = 11;
628
+
629
+ // The key fingerprint, if the credential type is volt:public-key.
630
+ string key_fingerprint = 12;
631
+
632
+ // The PEM-encoded public key, if the credential type is volt:public-key.
633
+ string public_key = 13;
634
+
635
+ // Optional PEM-encoded private key, if the credential type is volt:public-key. Only used for ephemeral REST-base sessions created dynamically after OTP authentication.
636
+ string private_key = 14;
627
637
 
628
638
  // Type-specific extra data stored with the credential.
629
- string extra = 7;
639
+ string extra = 15;
630
640
 
631
641
  // More type-specific data stored with the credential.
632
- string extra_2 = 8;
642
+ string extra_2 = 16;
633
643
  }
634
644
 
635
645
  message Session {
636
646
  string id = 1;
637
647
 
638
- // string public_key = 2;
648
+ string identity_did = 2;
649
+
650
+ string identity_name = 3;
639
651
 
640
- string identity_id = 3;
652
+ string ip = 4;
641
653
 
642
- string identity_name = 4;
654
+ uint64 created = 5;
643
655
 
644
- string ip = 5;
656
+ uint64 modified = 6;
645
657
 
646
- repeated SessionCredential credential = 6;
658
+ uint64 expires = 7;
647
659
 
648
- uint64 created = 7;
660
+ repeated SessionCredential credential = 8;
649
661
 
650
- uint64 modified = 8;
662
+ string origin = 9;
651
663
 
652
- SessionStatus status = 9;
664
+ SessionStatus status = 10;
653
665
  }
654
666