@tdxvolt/volt-client-grpc 0.1.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.
- package/README.md +5 -0
- package/lib/index.cjs +1883 -0
- package/package.json +50 -0
- package/protobuf/README.md +4 -0
- package/protobuf/tdx/volt_api/data/v1/sqlite.proto +43 -0
- package/protobuf/tdx/volt_api/data/v1/sqlite_database_api.proto +105 -0
- package/protobuf/tdx/volt_api/data/v1/sqlite_server_api.proto +42 -0
- package/protobuf/tdx/volt_api/ssi/v1/ssi_api.proto +37 -0
- package/protobuf/tdx/volt_api/sync/v1/sync.proto +14 -0
- package/protobuf/tdx/volt_api/tunnel/v1/proxy_api.proto +9 -0
- package/protobuf/tdx/volt_api/tunnel/v1/tunnel_api.proto +77 -0
- package/protobuf/tdx/volt_api/volt/v1/discovery_api.proto +39 -0
- package/protobuf/tdx/volt_api/volt/v1/file.proto +17 -0
- package/protobuf/tdx/volt_api/volt/v1/file_api.proto +117 -0
- package/protobuf/tdx/volt_api/volt/v1/remote.proto +94 -0
- package/protobuf/tdx/volt_api/volt/v1/status.proto +15 -0
- package/protobuf/tdx/volt_api/volt/v1/volt.proto +563 -0
- package/protobuf/tdx/volt_api/volt/v1/volt_api.proto +943 -0
- package/protobuf/tdx/volt_api/volt/v1/wire_api.proto +50 -0
- package/src/constants.js +75 -0
- package/src/grpc-call.js +254 -0
- package/src/grpc-utils.js +197 -0
- package/src/index.js +7 -0
- package/src/proto-utils.js +81 -0
- package/src/tunnel.pb.js +0 -0
- package/src/utils.js +105 -0
- package/src/volt-client-internal.js +288 -0
- package/src/volt-client.js +491 -0
- package/src/volt-connection.js +157 -0
- package/src/volt-crypto.js +213 -0
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package tdx.volt_api.volt.v1;
|
|
4
|
+
|
|
5
|
+
enum DiscoveryMode {
|
|
6
|
+
DISCOVERY_MODE_UNKNOWN = 0;
|
|
7
|
+
|
|
8
|
+
// Only local identities with explicit policy PERMIT can discover.
|
|
9
|
+
DISCOVERY_MODE_TRUSTED = 1;
|
|
10
|
+
|
|
11
|
+
// Any bound local identity can discover.
|
|
12
|
+
DISCOVERY_MODE_PUBLIC = 2;
|
|
13
|
+
|
|
14
|
+
// Only identities with explicit policy PERMIT can discover, and the service will be available to local and non-local (tunnelled) clients.
|
|
15
|
+
DISCOVERY_MODE_TRUSTED_GLOBAL = 3;
|
|
16
|
+
|
|
17
|
+
// Any bound identity can discover, and the service will be available to local and non-local (tunnelled) clients.
|
|
18
|
+
DISCOVERY_MODE_PUBLIC_GLOBAL = 4;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
enum OnlineStatus {
|
|
22
|
+
ONLINE_STATUS_UNKNOWN = 0;
|
|
23
|
+
ONLINE_STATUS_ONLINE = 1;
|
|
24
|
+
ONLINE_STATUS_OFFLINE = 2;
|
|
25
|
+
}
|
|
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
|
+
// Not used ATM.
|
|
40
|
+
enum ResourceStatus {
|
|
41
|
+
RESOURCE_STATUS_UNKNOWN = 0;
|
|
42
|
+
RESOURCE_STATUS_LIVE = 1;
|
|
43
|
+
RESOURCE_STATUS_INACTIVE = 2;
|
|
44
|
+
RESOURCE_STATUS_DELETED = 999;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Not used ATM.
|
|
48
|
+
enum ShareMode {
|
|
49
|
+
SHARE_MODE_UNKNOWN = 0;
|
|
50
|
+
SHARE_MODE_TRUSTED = 1;
|
|
51
|
+
SHARE_MODE_PUBLIC_READ = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Represents an outbound connection from a Volt to a remote service that will act as a proxy for that Volt.
|
|
55
|
+
// This enables Volts to bypass firewall and NATs.
|
|
56
|
+
// Example 1 - connection from a Volt to the cloud-based Volt tunnel at volt.tdxcloud.com
|
|
57
|
+
// Example 2 - connection from a Volt to another Volt running on the public internet, such as tdxvolt.com
|
|
58
|
+
message ProxyConnection {
|
|
59
|
+
// Unique connection id.
|
|
60
|
+
string id = 1;
|
|
61
|
+
|
|
62
|
+
// A human-readable name for the connection.
|
|
63
|
+
string name = 2;
|
|
64
|
+
|
|
65
|
+
// The remote address of the proxy service.
|
|
66
|
+
string address = 3;
|
|
67
|
+
|
|
68
|
+
// The certificate authority of the proxy service.
|
|
69
|
+
string ca_pem = 4;
|
|
70
|
+
|
|
71
|
+
// Indicates this connection is enabled.
|
|
72
|
+
bool enabled = 5;
|
|
73
|
+
|
|
74
|
+
// Indicates this connection is currently in use.
|
|
75
|
+
bool connected = 6;
|
|
76
|
+
|
|
77
|
+
// Indicates this is a connection to a cloud-based tunnel, rather than to another Volt.
|
|
78
|
+
bool is_cloud_connection = 7;
|
|
79
|
+
|
|
80
|
+
// Indicates that this connection will handle HTTP proxying as well as GRPC.
|
|
81
|
+
bool enable_http_proxy = 8;
|
|
82
|
+
|
|
83
|
+
// Set to indicate the Volt API itself is not automatically exposed to the connection.
|
|
84
|
+
bool disable_volt_api = 9;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
enum SecureMode {
|
|
88
|
+
SECURE_MODE_UNKNOWN = 0;
|
|
89
|
+
SECURE_MODE_INSECURE = 1;
|
|
90
|
+
SECURE_MODE_TLS = 2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Encapsulates the various Volt parameters that are configurable by the Volt owner.
|
|
94
|
+
message VoltParameters {
|
|
95
|
+
string id = 1;
|
|
96
|
+
|
|
97
|
+
// The name of the Volt.
|
|
98
|
+
string name = 2;
|
|
99
|
+
|
|
100
|
+
// Human-readable description of the Volt.
|
|
101
|
+
string description = 3;
|
|
102
|
+
|
|
103
|
+
// The database driver in use.
|
|
104
|
+
string db_driver = 4;
|
|
105
|
+
|
|
106
|
+
// The local file path location of the Volt storage.
|
|
107
|
+
string location = 5;
|
|
108
|
+
|
|
109
|
+
// The key strategy in use, this determines how the root key is stored.
|
|
110
|
+
string key_strategy = 6;
|
|
111
|
+
|
|
112
|
+
// The identifier for the key, the semantics depend on the key strategy in use.
|
|
113
|
+
string key_id = 7;
|
|
114
|
+
|
|
115
|
+
// The Volt certificate authority.
|
|
116
|
+
string ca_pem = 8;
|
|
117
|
+
|
|
118
|
+
// The Volt API server certificate.
|
|
119
|
+
string cert_pem = 9;
|
|
120
|
+
|
|
121
|
+
// Optional hostname of the Volt if using DNS or a static IP address, e.g. tdxvolt.com
|
|
122
|
+
string fixed_host = 10;
|
|
123
|
+
|
|
124
|
+
// Port to use for hosting the Volt management service.
|
|
125
|
+
int32 grpc_port = 11;
|
|
126
|
+
|
|
127
|
+
// Port to use for hosting the Volt grpc service.
|
|
128
|
+
int32 http_port = 12;
|
|
129
|
+
|
|
130
|
+
// The Volt http server key file path.
|
|
131
|
+
string http_key_path = 13;
|
|
132
|
+
|
|
133
|
+
// The Volt http server certificate file path.
|
|
134
|
+
string http_cert_path = 14;
|
|
135
|
+
|
|
136
|
+
// The Volt http server certificate authority chain file path.
|
|
137
|
+
string http_ca_path = 15;
|
|
138
|
+
|
|
139
|
+
// Indicates the Volt will be discoverable by clients using the discovery api.
|
|
140
|
+
bool discoverable = 16;
|
|
141
|
+
|
|
142
|
+
// Optional base-64 encoded verifiable credential issued by the owner of this Volt.
|
|
143
|
+
// @Toby - why is this base64 encoded?
|
|
144
|
+
string owner_credential = 17;
|
|
145
|
+
|
|
146
|
+
// Optional challenge code that can be used aid in the process of verifying clients attempting to bind to the Volt.
|
|
147
|
+
string bind_challenge = 18;
|
|
148
|
+
|
|
149
|
+
// Indicates that clients must present the correct challenge code in order to be able to bind to the Volt.
|
|
150
|
+
bool require_bind_challenge = 19;
|
|
151
|
+
|
|
152
|
+
// Internal use only.
|
|
153
|
+
bool confirm_stop = 20;
|
|
154
|
+
|
|
155
|
+
// Internal use only.
|
|
156
|
+
bool auto_start = 21;
|
|
157
|
+
|
|
158
|
+
// Internal use only.
|
|
159
|
+
bool enable_messaging = 22;
|
|
160
|
+
|
|
161
|
+
// Set to indicate this Volt exposes a tunnel interface.
|
|
162
|
+
// This means this Volt can act as a proxy for other Volts (or in fact any client) that connect to it.
|
|
163
|
+
bool has_tunnel = 23;
|
|
164
|
+
|
|
165
|
+
// Set to run the tunnel open to any client, i.e. clients can utilise the tunnel without binding to this Volt.
|
|
166
|
+
bool tunnel_open = 24;
|
|
167
|
+
|
|
168
|
+
// Determines if the Volt HTTP server is enabled.
|
|
169
|
+
bool enable_http_server = 25;
|
|
170
|
+
|
|
171
|
+
// Determines whether the HTTP server employs TLS.
|
|
172
|
+
bool http_server_secure = 26;
|
|
173
|
+
|
|
174
|
+
// Determines whether the HTTP server supports forwarding.
|
|
175
|
+
bool enable_http_forwarding = 27;
|
|
176
|
+
|
|
177
|
+
// Determines if the Volt REST API is exposed via the HTTP server.
|
|
178
|
+
bool enable_http_api = 28;
|
|
179
|
+
|
|
180
|
+
// Determines if the Volt Websocket API is exposed via the HTTP server.
|
|
181
|
+
bool enable_websocket_api = 29;
|
|
182
|
+
|
|
183
|
+
// The hostname:port at which the Volt API is currently running.
|
|
184
|
+
string address = 30;
|
|
185
|
+
|
|
186
|
+
// Set to indicate the Volt file store is encrypted.
|
|
187
|
+
bool encrypt_file_store = 31;
|
|
188
|
+
|
|
189
|
+
// This is a unique connection id.
|
|
190
|
+
// Indicates that these parameters refer to a connection to a remote Volt rather than a local Volt.
|
|
191
|
+
string connection_id = 32;
|
|
192
|
+
|
|
193
|
+
// The certificate authority of the tunnel if this is a remote connection via a tunnel.
|
|
194
|
+
string tunnel_ca_pem = 33;
|
|
195
|
+
|
|
196
|
+
// Set to indicate this is a remote connection to a Volt via a cloud tunnel.
|
|
197
|
+
bool is_cloud_tunnel = 34;
|
|
198
|
+
|
|
199
|
+
// An optional alias that can be used to refer to the Volt rather than the `id` field.
|
|
200
|
+
// This alias must be unique within the scope of the Battery in which the Volt is stored.
|
|
201
|
+
string alias = 35;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
message VoltEndpoint {
|
|
205
|
+
// The globally unique Volt id.
|
|
206
|
+
string id = 1;
|
|
207
|
+
|
|
208
|
+
// Optional owner credential, base 64 encoded.
|
|
209
|
+
string owner_credential = 2;
|
|
210
|
+
|
|
211
|
+
// Human-readable name of the Volt.
|
|
212
|
+
string display_name = 3;
|
|
213
|
+
|
|
214
|
+
// The actual host/ip the volt is physically running on (might be a local ip if behind firewall).
|
|
215
|
+
string local_address = 4;
|
|
216
|
+
|
|
217
|
+
// The global (tunnel) address of the volt. Any given volt may be advertising on more than one tunnel instance. The value given here will depend on the tunnel instance that handled the endpoint query response.
|
|
218
|
+
string tunnel_address = 5;
|
|
219
|
+
|
|
220
|
+
// The root certificate of the tunnel instance referred to in `tunnel_address`.
|
|
221
|
+
string tunnel_ca_pem = 6;
|
|
222
|
+
|
|
223
|
+
// The self-signed certificate used by the volt to sign client certificates.
|
|
224
|
+
string ca_pem = 7;
|
|
225
|
+
|
|
226
|
+
// The Volt public key in PEM format.
|
|
227
|
+
string public_key = 8;
|
|
228
|
+
|
|
229
|
+
// The base58 fingerprint of the Volt public key.
|
|
230
|
+
string fingerprint = 9;
|
|
231
|
+
|
|
232
|
+
// The online status of the Volt.
|
|
233
|
+
OnlineStatus online_status = 10;
|
|
234
|
+
|
|
235
|
+
// Set to indicate that this Volt exposes a tunnel interface.
|
|
236
|
+
bool has_tunnel = 11;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Internal use only.
|
|
240
|
+
message MethodDescription {
|
|
241
|
+
string path = 1;
|
|
242
|
+
bool client_streaming = 2;
|
|
243
|
+
bool server_streaming = 3;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// Describes a single protobuf file for use in ServiceDescription.
|
|
247
|
+
message ProtoFile {
|
|
248
|
+
// The path name of the proto file, relative to the 'root' of the namespace, e.g. "tdx/volt_api/volt/v1/volt.proto".
|
|
249
|
+
string file_path = 1;
|
|
250
|
+
|
|
251
|
+
// The actual protobuf file contents.
|
|
252
|
+
string protobuf = 2;
|
|
253
|
+
|
|
254
|
+
// Optional - the service(s) contained in this protobuf file, if omitted here they will be loaded dynamically from the protobuf.
|
|
255
|
+
repeated string service_name = 3;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Describes a Volt service.
|
|
259
|
+
message ServiceDescription {
|
|
260
|
+
// The id of the server resource that is hosting this service.
|
|
261
|
+
string server_id = 1;
|
|
262
|
+
|
|
263
|
+
// The local address of the grpc server hosting this service.
|
|
264
|
+
string local_address = 2;
|
|
265
|
+
|
|
266
|
+
// The discovery mode.
|
|
267
|
+
DiscoveryMode discoverable = 4;
|
|
268
|
+
|
|
269
|
+
// The ping timestamp of the server hosting this service.
|
|
270
|
+
int64 ping_timestamp = 5;
|
|
271
|
+
|
|
272
|
+
// The protobuf definitions of the APIs exposed by this service.
|
|
273
|
+
repeated ProtoFile proto_file = 6;
|
|
274
|
+
|
|
275
|
+
// The fully qualified names of the protobuf services, for example tdx.volt_api.webcam.v1.WebcamControlAPI.
|
|
276
|
+
repeated string service_api = 7;
|
|
277
|
+
|
|
278
|
+
// The certificate authority (chain) that signed the service server certificate.
|
|
279
|
+
string ca_pem = 8;
|
|
280
|
+
|
|
281
|
+
// Internal use only.
|
|
282
|
+
repeated MethodDescription methods = 100;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Resource attribute data types.
|
|
286
|
+
enum AttributeDataType {
|
|
287
|
+
ATTRIBUTE_DATA_TYPE_UNKNOWN = 0;
|
|
288
|
+
ATTRIBUTE_DATA_TYPE_STRING = 1;
|
|
289
|
+
ATTRIBUTE_DATA_TYPE_INTEGER = 2;
|
|
290
|
+
ATTRIBUTE_DATA_TYPE_REAL = 3;
|
|
291
|
+
ATTRIBUTE_DATA_TYPE_BOOLEAN = 4;
|
|
292
|
+
ATTRIBUTE_DATA_TYPE_BYTES = 5;
|
|
293
|
+
|
|
294
|
+
ATTRIBUTE_DATA_TYPE_IDENTITY = 100;
|
|
295
|
+
ATTRIBUTE_DATA_TYPE_RESOURCE = 101;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// Resource attribute value will be one of the following fields, depending on the data type.
|
|
299
|
+
message AttributeValue {
|
|
300
|
+
oneof value {
|
|
301
|
+
string string = 1;
|
|
302
|
+
int32 integer = 2;
|
|
303
|
+
double real = 3;
|
|
304
|
+
bool boolean = 4;
|
|
305
|
+
bytes bytes = 5;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// A resource attribute enables storing arbitrary data associated with a resource.
|
|
310
|
+
message ResourceAttribute {
|
|
311
|
+
uint32 id = 1;
|
|
312
|
+
|
|
313
|
+
string attribute_id = 2;
|
|
314
|
+
|
|
315
|
+
string resource_id = 3;
|
|
316
|
+
|
|
317
|
+
AttributeDataType data_type = 4;
|
|
318
|
+
|
|
319
|
+
repeated AttributeValue values = 5;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// Using `major` and `minor` here upsets the GNU C Library, so we add a `version_` prefix.
|
|
323
|
+
message Version {
|
|
324
|
+
uint32 version_major = 1;
|
|
325
|
+
uint32 version_minor = 2;
|
|
326
|
+
uint32 version_patch = 3;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// The core Resource metadata schema.
|
|
330
|
+
message Resource {
|
|
331
|
+
// The globally unique resource id.
|
|
332
|
+
string id = 1;
|
|
333
|
+
|
|
334
|
+
// Optional description.
|
|
335
|
+
string description = 2;
|
|
336
|
+
|
|
337
|
+
// Human-readable resource name.
|
|
338
|
+
string name = 4;
|
|
339
|
+
|
|
340
|
+
// Not in use.
|
|
341
|
+
ShareMode share_mode = 5;
|
|
342
|
+
|
|
343
|
+
// The id of the Volt that hosts this resource.
|
|
344
|
+
string volt_id = 7;
|
|
345
|
+
|
|
346
|
+
// Optional description of any services exposed by this resource.
|
|
347
|
+
ServiceDescription service_description = 8;
|
|
348
|
+
|
|
349
|
+
// Attributes assigned to the resource.
|
|
350
|
+
repeated ResourceAttribute attributes = 9;
|
|
351
|
+
|
|
352
|
+
// The version of the platform.
|
|
353
|
+
Version platform_version = 10;
|
|
354
|
+
|
|
355
|
+
// The resource version.
|
|
356
|
+
uint64 version = 11;
|
|
357
|
+
|
|
358
|
+
// The identity of the resource owner.
|
|
359
|
+
string owner = 101;
|
|
360
|
+
|
|
361
|
+
// Creation timestamp, milliseconds since epoch.
|
|
362
|
+
int64 created = 105;
|
|
363
|
+
|
|
364
|
+
// Last modification timestamp, milliseconds since epoch.
|
|
365
|
+
int64 modified = 106;
|
|
366
|
+
|
|
367
|
+
// Not in use.
|
|
368
|
+
ResourceStatus status = 108;
|
|
369
|
+
|
|
370
|
+
// The taxonomy of the resource.
|
|
371
|
+
repeated string kind = 110;
|
|
372
|
+
|
|
373
|
+
// The online status.
|
|
374
|
+
// 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 session.
|
|
375
|
+
// All built-in resources are hosted by the Volt itself and are therefore always online when the Volt is running.
|
|
376
|
+
// Resources hosted by external servers are online if the server itself is online and has registered the resource as online using `setServiceStatus`.
|
|
377
|
+
OnlineStatus online_status = 111;
|
|
378
|
+
|
|
379
|
+
// The size of the resource store in bytes.
|
|
380
|
+
uint64 size = 113;
|
|
381
|
+
|
|
382
|
+
// The path to the resource store.
|
|
383
|
+
string store = 114;
|
|
384
|
+
|
|
385
|
+
repeated string alias = 115;
|
|
386
|
+
|
|
387
|
+
// Not yet supported.
|
|
388
|
+
repeated Resource children = 200;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
enum IdentityType {
|
|
392
|
+
IDENTITY_TYPE_UNKNOWN = 0;
|
|
393
|
+
IDENTITY_TYPE_USER = 1;
|
|
394
|
+
IDENTITY_TYPE_AUTHORITY = 2;
|
|
395
|
+
IDENTITY_TYPE_GROUP = 3;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
enum IdentityAliasType {
|
|
399
|
+
IDENTITY_ALIAS_TYPE_UNKNOWN = 0;
|
|
400
|
+
IDENTITY_ALIAS_TYPE_PUBLIC_KEY = 1;
|
|
401
|
+
IDENTITY_ALIAS_TYPE_COMMON_NAME = 2;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
enum IdentityAliasSubType {
|
|
405
|
+
IDENTITY_ALIAS_SUB_TYPE_UNKNOWN = 0;
|
|
406
|
+
|
|
407
|
+
// Identifies email common name aliases.
|
|
408
|
+
IDENTITY_ALIAS_SUB_TYPE_EMAIL = 1;
|
|
409
|
+
|
|
410
|
+
// Identifies phone number common name aliases.
|
|
411
|
+
IDENTITY_ALIAS_SUB_TYPE_PHONE = 2;
|
|
412
|
+
|
|
413
|
+
// Identifies DNS common name aliases.
|
|
414
|
+
IDENTITY_ALIAS_SUB_TYPE_DNS = 3;
|
|
415
|
+
|
|
416
|
+
// Identifies public key aliases that originate from owner credentials rather than the identity itself.
|
|
417
|
+
IDENTITY_ALIAS_SUB_TYPE_OWNER = 4;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
message IdentityAlias {
|
|
421
|
+
// The corresponding identity id.
|
|
422
|
+
string identity_id = 1;
|
|
423
|
+
|
|
424
|
+
// The actual alias, e.g. a common name or key fingerprint.
|
|
425
|
+
string alias = 2;
|
|
426
|
+
|
|
427
|
+
// This will only be populated if alias_type == PUBLIC_KEY
|
|
428
|
+
string public_key = 3;
|
|
429
|
+
|
|
430
|
+
// This will only be populated if alias_type == PUBLIC_KEY
|
|
431
|
+
string private_key = 4;
|
|
432
|
+
|
|
433
|
+
IdentityAliasType alias_type = 5;
|
|
434
|
+
|
|
435
|
+
IdentityAliasSubType alias_sub_type = 6;
|
|
436
|
+
|
|
437
|
+
// Indicates if this alias has an 'authenticate' policy decision assigned.
|
|
438
|
+
PolicyDecision authenticate = 7;
|
|
439
|
+
|
|
440
|
+
// Indicates if this alias has an 'bind' policy decision assigned.
|
|
441
|
+
PolicyDecision bind = 8;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// A Volt identity encompasses a Resource and a set of identity aliases.
|
|
445
|
+
message Identity {
|
|
446
|
+
Resource resource = 1;
|
|
447
|
+
repeated IdentityAlias aliases = 2;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
enum BindCredentialType {
|
|
451
|
+
BIND_CREDENTIAL_TYPE_UNKNOWN = 0;
|
|
452
|
+
BIND_CREDENTIAL_TYPE_OWNER = 1;
|
|
453
|
+
BIND_CREDENTIAL_TYPE_X509 = 2;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
message BindCredential {
|
|
457
|
+
BindCredentialType credential_type = 1;
|
|
458
|
+
string issuer_id = 2;
|
|
459
|
+
string issuer_name = 3;
|
|
460
|
+
string issuer_fingerprint = 4;
|
|
461
|
+
string issuer_public_key = 5;
|
|
462
|
+
PolicyDecision decision = 6;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
message Binding {
|
|
466
|
+
// The bind request public key fingerprint.
|
|
467
|
+
string fingerprint = 1;
|
|
468
|
+
|
|
469
|
+
// The bind request public key.
|
|
470
|
+
string public_key = 2;
|
|
471
|
+
|
|
472
|
+
// A human-readable short identifier of the binding.
|
|
473
|
+
string friendly_name = 3;
|
|
474
|
+
|
|
475
|
+
// The host name to add as a SAN to the issued certificate. See also `ip`.
|
|
476
|
+
string host = 4;
|
|
477
|
+
|
|
478
|
+
// The IP address to add as a SAN to the issued certificate as an alternative
|
|
479
|
+
// to `host`.
|
|
480
|
+
string ip = 5;
|
|
481
|
+
|
|
482
|
+
// Counter of number times a binding was requested.
|
|
483
|
+
uint32 request_count = 6;
|
|
484
|
+
|
|
485
|
+
int64 request_time = 7;
|
|
486
|
+
|
|
487
|
+
int64 decision_time = 8;
|
|
488
|
+
|
|
489
|
+
// The policy decision assigned to this binding.
|
|
490
|
+
PolicyDecision decision = 9;
|
|
491
|
+
|
|
492
|
+
// The identity id associated with this binding.
|
|
493
|
+
// Only valid if the bind request has been permitted.
|
|
494
|
+
string identity_id = 10;
|
|
495
|
+
|
|
496
|
+
string status = 11;
|
|
497
|
+
|
|
498
|
+
// All credentials supplied as part of bind request.
|
|
499
|
+
repeated BindCredential credential = 12;
|
|
500
|
+
|
|
501
|
+
// The chosen 'owner' credential.
|
|
502
|
+
BindCredential owner_credential = 14;
|
|
503
|
+
|
|
504
|
+
// Set if the bind request presented a valid challenge code.
|
|
505
|
+
bool volt_challenge = 15;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
message Access {
|
|
509
|
+
string id = 1;
|
|
510
|
+
|
|
511
|
+
// The resource being accessed.
|
|
512
|
+
string resource_id = 2;
|
|
513
|
+
|
|
514
|
+
// A human-readable short identifier of the resource.
|
|
515
|
+
string resource_name = 3;
|
|
516
|
+
|
|
517
|
+
// The identity that owns the resource.
|
|
518
|
+
string resource_owner = 4;
|
|
519
|
+
|
|
520
|
+
// The kind of resource.
|
|
521
|
+
repeated string resource_kind = 5;
|
|
522
|
+
|
|
523
|
+
// The identity attempting access.
|
|
524
|
+
string identity_id = 6;
|
|
525
|
+
|
|
526
|
+
// A human-readable short identifier of the subject.
|
|
527
|
+
string identity_name = 7;
|
|
528
|
+
|
|
529
|
+
// The kind of identity.
|
|
530
|
+
repeated string identity_kind = 8;
|
|
531
|
+
|
|
532
|
+
string issuer_id = 9;
|
|
533
|
+
|
|
534
|
+
string issuer_name = 10;
|
|
535
|
+
|
|
536
|
+
repeated string issuer_kind = 11;
|
|
537
|
+
|
|
538
|
+
// Requested access.
|
|
539
|
+
string access = 12;
|
|
540
|
+
|
|
541
|
+
// Assigned decision.
|
|
542
|
+
PolicyDecision decision = 13;
|
|
543
|
+
|
|
544
|
+
bool recursive = 14;
|
|
545
|
+
|
|
546
|
+
// Time at which the request was made.
|
|
547
|
+
int64 request_time = 15;
|
|
548
|
+
|
|
549
|
+
// Time at which the decision was taken.
|
|
550
|
+
int64 decision_time = 16;
|
|
551
|
+
|
|
552
|
+
// Counter of number times this access was requested.
|
|
553
|
+
uint32 request_count = 17;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
message VerifiableCredential {
|
|
557
|
+
string encoded = 1;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
message VerifiablePresentation {
|
|
561
|
+
VerifiableCredential credential = 1;
|
|
562
|
+
string signature = 2;
|
|
563
|
+
}
|