VoltAPI
TopThe top-level volt management service.
With the exception of `Authenticate`, all RPCs on this service must submit either a valid client certificate signed by the volt CA, or a signed JWT.
A client certificate can be obtained from the `Authenticate` method.
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.
Authenticate()
Issues a request to authenticate on the volt.
All clients must successfully authenticate in order to gain any kind of access.
A client certificate is optional for this RPC, if omitted a JWT must be provided in the call metadata.
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-authenticate the client and obtain a new certificate.
If the authenticate decision is 'permit', the 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.
CanAccessResource()
Determine if an identity can perform a specific action on a resource.
Third party services can use this to interrogate the Volt policy and determine if a client has permission to perform a certain action on a resource.
CheckCompatibility()
Connect()
Creates a long-lived, bi-directional connection to the Volt.
The connection stream serves several purposes, including remote invocations via a Relay, Volt event notifications, pings and service registration management.
A connection stream is required in order for a client to be able to register services with the Volt.
When the stream is closed, any services registered on it will be set to offline.
CopyResource()
Copy a resource from one folder to another.
The resource metadata, attributes and store are copied.
The shares attributed to the resource are **not** currently copied.
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.
DeleteAccess()
Remove a custom access rule, such as a file share.
DeleteResource()
Delete a resource from this volt.
DiscoverServices()
Discover services running on this volt.
Lookup is done via the exposed serviceAPI, e.g. tdx.volt_api.data.v1.SqliteServerAPI.
GetAccess()
Get access rule details.
Only rules in which the authenticated identity participates will be retrieved, in addition to any rules that target a resource that is owned by the authenticated identity.
If the authenticated identity is the Volt root, all rules will be retrieved that match the criteria.
GetIdentities()
Retrieve identities matching the given criteria.
Only identities that the authenticated identity has read access to will be retrieved.
GetIdentity()
Get details of a specific identity.
The identity will only be retrieved if the authenticated identity has read access to it.
GetOneTimeToken()
Gets a one-time token that can be used as a temporary authentication token, for example create an file download link that expires after a certain time.
GetParameters()
Retrieve the Volt parameters.
This is a privileged API call and requires Volt root access.
GetPolicy()
Retrieve the active Volt policy.
This is a privileged API call and requires Volt root access.
GetResource()
Get resource from this volt.
GetResources()
Get resources from this volt.
GetResourceAncestors()
Get ancestors of a resource.
GetResourceDescendants()
Get descendants of a resource.
GetSessions()
Get sessions.
Invoke()
Invoke a method.
This is primarily for use by Relay connections when proxying invocations.
MoveResource()
Move a resource from one folder to another.
RequestAccess()
Request access to a resource.
The subject of the access is assumed to be the identity of the currently authenticated peer.
SaveAccess()
Create or update an access rule.
SaveHttpFileServer()
Create or update a static file HTTP server.
SaveHttpApiServer()
Create or update an HTTP REST API server.
SaveIdentity()
Create or update an identity.
SaveMirroredLink()
Create or update a mirrored link resource.
SaveParameters()
Update Volt parameters.
This is a privileged call that requires Volt root access.
SaveResource()
Create or update resource in this volt.
SaveSymbolicLink()
Create or update a symbolic link resource.
SaveSession()
Save a session.
SetAccessRequestDecision()
Set Volt access request decision.
This is a privileged call that requires Volt root access.
SetPolicy()
SetServiceStatus()
Set the status of a Volt service.
Shutdown()
Used to shutdown remote Volts.
This is a privileged call that requires Volt root access.
SignVerify()
Sign or verify an arbitrary message using the Volt key.
AuthenticateRequest
Describes a request to authenticate on a Volt.
Present one of the `public_key`, `did_public_key`, `did`, or `did_document` fields.
Field | Type | Description |
public_key | string | The client public key in PEM format. The Volt will create a session that is bound to this public key. |
did_public_key | string | 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. Note this is only valid when a DID has previously been registered using this public key. |
did | string | An existing DID owned by the client. The JWT presented with the authenticate call must be signed by the private key corresponding to this DID. |
did_document | string | If the client doesn't have an existing DID, a DID document can be provided here. The Volt will register the DID on behalf of the client. The JWT presented with the authenticate call must be signed by the private key corresponding to this document. |
did_document_signature | string | A base64-encoded signature of the DID document, only required if `did_document` is provided above. |
client_name | string | A human-readable name of the entity requesting to authenticate. |
challenge | string | The volt challenge code, signed by the private key component of the `public_key` field above, and base64 encoded. This is optional. |
host | string | The host name to add as a SAN to the issued certificate. This is optional, if you don't intend to host services with the certificate this can be omitted. |
verifiable_presentation | VerifiablePresentation repeated | Optional verifiable credentials describing the client. |
purge_aliases | bool | Reserved for internal use. |
session_name | string | Optional additional name to differentiate between multiple sessions for a given client. |
AuthenticateResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
session_id | string | |
identity_did | string | The identity id assigned to this authentication. |
cert | string | A certificate issued by the volt CA, binding the request public key to the identity. Only valid for PERMIT authenticate decisions. |
chain | string | The volt CA chain. This is used by the client in subsequent API calls to secure the connection. |
decision | PolicyDecision | The authenticate decision. |
request_time | int64 | Reserved for internal use. |
decision_time | int64 | Reserved for internal use. |
CanAccessResourceRequest
Field | Type | Description |
token | string | The subject of the access request. This is optional, and if omitted will default to the authenticated account. |
cert | string | The subject of the access request. This is optional, and if omitted will default to the authenticated account. |
resource_id | string | The resource in question. |
access | string | The type of access that is required. |
CanAccessResourceResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
identity_did | string | The identity subject that the access relates to. |
resource_id | string | The resource the access relates to. |
access | string | The access type. |
decision | PolicyDecision | The policy decision for this access request. |
CheckCompatibilityRequest
Field | Type | Description |
version | Version | The client platform API version. |
CheckCompatibilityResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
version | Version | The target Volt API version. |
ConnectAcknowledge
Field | Type | Description |
connection_id | string | A unique identifier for this connection. |
timestamp | uint64 | The current time on the Volt. |
ping_interval | uint32 | The interval at which the target will send ping requests to the client. |
ConnectAuthRequest
Field | Type | Description |
session | Session | |
context | string | |
challenge | string | |
timestamp | uint64 |
ConnectDIDRegistryUpdate
Field | Type | Description |
update | DIDRegistryUpdate |
ConnectEvent
Field | Type | Description |
connect_auth_request | ConnectAuthRequest | An authentication request event. |
connect_resource | ConnectResource | A resource event notification, such as updated or deleted. |
did_registry_update | ConnectDIDRegistryUpdate | A DID registry entry update. |
ConnectGoodbye
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
ended | bool | Set if the connection was ended gracefully, as opposed to errored. |
ConnectHello
All fields in this message are optional, send an empty message if necessary.
Field | Type | Description |
address | string | Optionally specify the grpc server address of the client. Only used if the client is a Volt (or service). |
online_services | bool | Set to automatically make **all** services owned by the calling identity online. |
subscribe_resource_events | bool | Set to receive notification of resource events. |
relay_id | string | Set this if you are connecting to a relay, i.e. the Volt you are sending to this message is a relay. This indicates that you are happy to receive method invocations from clients of the Relay. This will usually be set to the `id` of your Volt, but in theory any client could receive remote invocation requests in this way. |
relay_name | string | A friendly name to present to Relay clients. |
relay_description | string | |
relay_ca_pem | string | The certificate authority to present to Relay clients. |
relay_discoverable | bool | Set to indicate the connection is discoverable to other Relay clients. |
relay_http_address | string | Optionally specify the address of the HTTP server to use for HTTP proxying. If set, a relay will forward HTTP requests to this address from the subdomain that matches the client's DID. |
subscribe_auth_requests | bool | Set to receive notification of authentication requests. |
accept_invocation | bool | Set to indicate the connection will accept method invocation requests. |
subscribe_did_registry_updates | bool | Set to subscribe to DID registry updates from the peer. |
ping_interval | uint32 | The interval at which the client will send ping requests to the target. |
timestamp | uint64 | The current time on the client. |
did_registry | string repeated | Optionally specify the DID registries supported. |
ConnectPing
A connection ping message - intentionally empty.
ConnectRelay
Field | Type | Description |
connected | bool | Indicates the Relay connection status. |
ConnectRequest
One of the following payloads will be present in a given ConnectRequest message.
Field | Type | Description |
hello | ConnectHello | A ConnectHello message is the first message a client sends to the target upon successfully starting the call. |
goodbye | ConnectGoodbye | Indicates the client is closing the connection. |
ping | ConnectPing | Clients should periodically send ping requests to the target to confirm the stream is still live. |
invoke_response | InvokeResponse | Send invocation responses back to the caller. n.b. The 'request' and 'response' semantics are inverted with 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. |
http_response | HttpResponse | Send HTTP response back to the originating request. n.b. The 'request' and 'response' semantics are inverted with HTTP proxying for the same reason as `invoke_response` above. |
ConnectResource
Field | Type | Description |
event | ConnectResourceEvent | The type of resource event that has occurred. |
resource | Resource | Details of the resource. |
ConnectResponse
One of the following payloads will be present in a given ConnectResponse message.
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
acknowledge | ConnectAcknowledge | Server response to initial handshake. |
goodbye | ConnectGoodbye | Indicates the server is ending the connection. |
evt | ConnectEvent | Notifies clients of various events on the Volt. |
ping | ConnectPing | Periodic ping response. |
invoke_request | InvokeRequest | Send an invocation request to a remote target. 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. |
http_request | HttpRequest | Send an HTTP request to a remote target. n.b. The 'request' and 'response' semantics are inverted for HTTP requests for the same reason as `invoke_request` above. |
CopyResourceRequest
Field | Type | Description |
resource_id | string | The id of the resource to copy. |
to_resource_id | string | The id of the resource to receive the new copy. |
mode | CopyResourceMode | The copy mode to use. |
recursive | bool | Indicates if all descendants of the resource should be copied too. Only relevant for COPY_RESOURCE_MODE_COPY mode. |
from_resource_id | string | The parent resource to link from, only relevant for COPY_RESOURCE_MODE_LINK mode. |
CopyResourceResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
DeleteAccessRequest
Field | Type | Description |
id | string | The id of the access rule to delete. |
DeleteAccessResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
DeleteResourceRequest
Field | Type | Description |
resource_id | string | The resource to delete. |
recursive | bool | Set to indicate all descendant resources should also be deleted. If this is not set and the resource has descendants, the call will fail. |
parent_id | string | Set to attempt to unlink the resource from this parent resource, rather than completely delete it. The resource will be removed as a descendant from the `parent_id` resource. If the resource is has more than one parent, it will not be removed from those other parents. Note that if the resource's only parent is `parent_id` it will be removed from that parent and deleted as normal. |
DeleteResourceResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
DiscoverServicesRequest
Field | Type | Description |
service_api | string repeated | List the service APIs that should be discovered. The response will include services that match **any of** the terms given. Use of '*' to indicate wildcards is supported. |
include_offline | bool | Set to indicate that offline services should be included in the response. |
include_attributes | bool | Set to include the service attributes in the response. |
include_protobuf | bool | Set to include the service protobuf in the response. |
DiscoverServicesResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
resource | Resource repeated | The services that were discovered. |
GetAccessRequest
Field | Type | Description |
resource_id | string | The resource id that is the target of the access rule. If omitted, all resources will be considered. |
identity_did | string | The identity id that is the subject of the access rule. If omitted, all identities will be considered. |
access | string | The type of access to retrieve, if omitted all access will be considered. |
decision | PolicyDecision | The type of decision, if omitted all decisions will be considered. |
GetAccessResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
access | Access repeated | The access rules that match the criteria. |
GetIdentitiesRequest
Field | Type | Description |
name | string | Optional name of the identity. Use '*' to perform a wildcard search. If omitted all identities will be retrieved. |
alias | IdentityAlias | The identity alias criteria, if omitted all identities will be considered. |
GetIdentitiesResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
identity | Identity repeated | The identity list that matched the criteria. |
GetIdentityRequest
One of `identity_did` or `fingerprint` must be populated.
Field | Type | Description |
identity_did | string | The id of the identity to retrieve. |
fingerprint | string | The public key fingerprint of the identity to retrieve. |
GetIdentityResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
identity | Identity | The identity details. |
GetOneTimeTokenRequest
Field | Type | Description |
ttl | int32 | Optional token TTL, in seconds. Default is 10 seconds. |
GetOneTimeTokenResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
token | string | The one-time token. |
GetParametersRequest
This an empty message.
GetParametersResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
parameters | VoltParameters | The retrieved Volt parameters. |
GetPolicyRequest
This an empty message.
Field | Type | Description |
custom_policy | bool | Set to only retrieve the custom policy document. |
GetPolicyResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
policy | string | The live policy in JSON format. |
GetResourceAncestorsRequest
Field | Type | Description |
resource_id | string | The resource id whose ancestors will be retrieved. |
include_resource_id | bool | Optional - if set the resource_id resource will be included in the set of resources returned. |
depth | int32 | Optional - restrict the depth search, e.g. for immediate parents depth = 1 |
ancestor_kind | string | Optional - only match ancestors of the given kind. |
ancestor_id | string | Optional - can be used to determine if a resource is an ancestor. |
include_attributes | bool | Set to include the service attributes in the response. |
include_protobuf | bool | Set to include the service protobuf in the response. |
GetResourceAncestorsResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
ancestor | Resource repeated | The retrieved ancestors. |
GetResourceDescendantsRequest
Field | Type | Description |
resource_id | string | The resource id whose descendants will be retrieved. |
include_resource_id | bool | Optional - if set, the fully populated `resource_id` resource (i.e. the parent) will be included in the set of resources returned. |
depth | int32 | Optional - restrict the depth search, e.g. for immediate children depth = 1 |
descendant_kind | string repeated | Optional - only match descendants of the given kind. If multiple kinds are given, resources matching **any of** the kinds will be included. |
descendant_id | string | Optional - can be used to determine if a resource is a descendant. |
parent_id | string | Optional - restrict to descendants of a given parent, for use in multi-parent hierarchies. |
name | string | Restrict to a specific named resource. |
modified_since | uint64 | Only retrieve resources that have been modified after the given timestamp. Default is 0, which means all resources will be returned. |
include_attributes | bool | Set to include the service attributes in the response. |
include_protobuf | bool | Set to include the service protobuf in the response. |
GetResourceDescendantsResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
descendant | Resource repeated | The retrieved descendants. |
GetResourceRequest
Field | Type | Description |
resource_id | string | The id of the resource to retrieve. |
include_attributes | bool | Set to include the resource attributes in the response. |
include_protobuf | bool | Set to include service description protobuf in the response, if applicable. |
GetResourceResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
resource | Resource | The retrieved resource metadata. |
GetResourcesRequest
By default, the lookup is performed by combining the criteria below in the form:
(id = id[0] or id = id[1]) and (name = name[0] or name = name[1]) etc...
To combine using 'or' rather than 'and', set the `combine_terms_exclusive` flag.
Also see note below regarding attributes.
Field | Type | Description |
id | string repeated | |
name | string repeated | Wildcards permitted. |
description | string repeated | Wildcards permitted. |
kind | string repeated | Wildcards permitted. |
parent_id | string repeated | |
service_api | string repeated | Wildcards permitted. |
owner | string repeated | |
store | string repeated | |
combine_terms_exclusive | bool | Indicates that the above terms should be combined using 'or' rather than 'and' (the default). |
attribute | ResourceAttributeQuery repeated | Attributes to search by. |
any_of | bool | If set, will return resources where *any of* the attribute queries apply, otherwise will only return resources where *all of* the attribute queries apply. |
include_attributes | bool | Set to include the resource attributes in the response. |
include_protobuf | bool | Set to include service description protobuf in the response where applicable. |
modified_since | uint64 | Only retrieve resources that have been modified after the given timestamp. Default is 0, which means all resources will be returned. |
limit | uint32 | Limit the number of resources returned. Default is 0, which means all resources will be returned. |
GetResourcesResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
resource | Resource repeated | The list of resources that match the lookup. |
GetSessionsRequest
Field | Type | Description |
id | string | |
identity_did | string | |
identity_name | string | |
status | SessionStatus |
GetSessionsResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
session | Session repeated |
InvokeRequest
Field | Type | Description |
invoke_id | uint64 | Client-assigned identifier for the request. Will be used to match responses and any subsequent requests. |
token | string | Optional client token to use for the invocation. This is for use by the websocket proxy and is only necessary on the first request of the rpc. |
target_did | string repeated | The DID of the target at each hop of the path to the service. This is used by Relays to route the request. |
iv | bytes | The initialisation vector for the request payload encryption. This should be a random 16 byte value, that is different for each request. |
payload | bytes | A serialised and encrypted instance of `RemoteResponse` in pure binary format. |
json_payload | bytes | A serialised and encrypted instance of `RemoteResponse` as serialised JSON. |
client_end | bool | Indicates the client has ended the invocation. |
hop_index | uint32 | Reserved for internal use. |
target_service_id | string | Reserved for internal use. |
InvokeRequestKeyExchange
Field | Type | Description |
nonce | bytes | |
encryption_key | bytes | |
signature | bytes |
InvokeResponse
Field | Type | Description |
invoke_id | uint64 | The invocation id to match the originating request. |
key_exchange | InvokeRequestKeyExchange | |
iv | bytes | The initialisation vector for the response payload encryption. This will be a random 16 byte value, that is different for each response. |
payload | bytes | A serialised and encrypted instance of `RemoteRequest` in pure binary format. |
json_payload | bytes | A serialised and encrypted instance of `RemoteRequest` as serialised JSON. |
status | Status | Details of any error that occurred on the call. |
server_end | bool | Indicates the server has ended the invocation. |
MoveResourceRequest
Field | Type | Description |
resource_id | string | The id of the resource to move. |
from_resource_id | string | The resource the parent folder to move the resource from. |
to_resource_id | string | The target folder to move the resource into. |
MoveResourceResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
RequestAccessRequest
Field | Type | Description |
resource_id | string | The target resource id. |
access | string | The type of access requested. |
RequestAccessResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
resource_id | string | The resource being accessed. |
identity_did | string | The identity attempting access. |
access | string | Requested access. |
decision | PolicyDecision | Assigned decision. |
request_time | int64 | Time at which the request was made. |
decision_time | int64 | Time at which the decision was taken. |
request_count | int32 | Counter of number times this access was requested. |
ResourceAttributeQuery
Field | Type | Description |
attribute_id | string | |
data_type | AttributeDataType | |
value | AttributeValue |
SaveAccessRequest
Field | Type | Description |
access | Access | Omit `id` if creating new access. |
SaveAccessResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
SaveIdentityRequest
Field | Type | Description |
identity | Identity | Details of the identity to save. |
create | bool | Set to indicate this is a new identity. |
delete_alias | IdentityAlias repeated | The list of aliases that should be removed. For example, this allows a simple form of key rotation whereby an existing public key alias is replaced by a new one while still maintaining the same root identity id. |
create_in_parent_id | string | Reserved for system use. |
purge_aliases | bool | Set to indicate the identity aliases should be purged before saving the identity. If the `identity` field contains aliases they will be saved after the purge. If the `identity` field does not contain aliases this effectively deletes all aliases for this identity. This allows you to selectively update aliases if required, i.e. don't set this flag and include a single alias in the update. |
did_document | string | |
did_update_signature | string | The signature of the identity did document, if present. |
SaveIdentityResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
identity | Identity | The updated identity details. |
SaveParametersRequest
Field | Type | Description |
parameters | VoltParameters | The updated parameters. |
key_passphrase | string | The current root key passphrase. Only necessary if changes are being made to the Volt key. |
new_key_passphrase | string | The new root key passphrase. Only necessary if changes are being made to the Volt key. |
SaveParametersResponse
Field | Type | Description |
status | Status | Details of any errors that occurred on the call. |
parameters | VoltParameters | The updated Volt parameters. |
reconnect | bool | If set, the client will need to reconnect (usually because the key has changed). |
SaveResourceRequest
Field | Type | Description |
resource | Resource | Details of the resource to save. |
create | bool | Set to indicate this is a new resource. |
create_in_parent_id | string | The id of the folder resource in which a new resource should be created. If omitted, the home folder of the currently authenticated identity will be used. |
purge_attributes | bool | Set to indicate the resource attributes should be purged before saving the resource. If the `resource` field contains attributes they will be saved after the purge. If the `resource` field does not contain attributes this effectively deletes all attributes for this resource. This allows you to selectively update attributes if required, i.e. don't set this flag and include a single attribute in the update. |
SaveResourceResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
resource | Resource | The updated resource. |
SaveSessionRequest
Field | Type | Description |
session | Session |
SaveSessionResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
session | Session |
SetAccessRequestDecisionRequest
Field | Type | Description |
id | string | The id of the access request. |
decision | PolicyDecision | The decision to save against the access request. |
SetAccessRequestDecisionResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
SetPolicyRequest
Field | Type | Description |
custom_policy | string |
SetPolicyResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
SetServiceStatusRequest
Field | Type | Description |
service | Resource | The service description details. |
SetServiceStatusResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
resource | Resource | The updated service resource details. |
ShutdownRequest
This message is emtpy.
ShutdownResponse
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
SignVerifyRequest
Field | Type | Description |
verify | bool | Set to indicate this is a request to verify rather than sign. |
encode | bool | Set to indicate the signature should be base64 encoded in the response. Only valid when signing. |
message | string | The message to sign. Only valid when signing. |
digest_raw | bytes | The digest in raw binary form. Only valid if verifying. |
digest_encoded | string | The digest encoded using base64. Only valid if verifying. |
SignVerifyResponse
Note that if verification was successful the response will be empty (there is no error and no digest is returned).
Field | Type | Description |
status | Status | Details of any error that occurred on the call. |
digest | bytes | The signature in raw binary form. |
digest_encoded | string | The signature encoded using base64. |
ConnectResourceEvent
Name | Number | Description |
CONNECT_RESOURCE_EVENT_UNKNOWN | 0 | |
CONNECT_RESOURCE_EVENT_CREATE | 1 | |
CONNECT_RESOURCE_EVENT_UPDATE | 2 | |
CONNECT_RESOURCE_EVENT_DELETE | 3 | |
CONNECT_RESOURCE_EVENT_CREATE_CHILD | 4 | |
CONNECT_RESOURCE_EVENT_DELETE_CHILD | 5 | |
CONNECT_RESOURCE_EVENT_DATABASE_WRITE | 6 |
CopyResourceMode
Name | Number | Description |
COPY_RESOURCE_MODE_UNKNOWN | 0 | |
COPY_RESOURCE_MODE_COPY | 1 | |
COPY_RESOURCE_MODE_LINK | 2 |
Status
Field | Type | Description |
code | int32 | A simple error code that can be easily handled by the client. Mirrors the grpc StatusCode enum, 0 => OK |
message | string | A developer-facing human-readable error message in English. It should both explain the error and offer an actionable resolution to it. |
description | string | Long form error description. |
Access
Field | Type | Description |
id | string | |
resource_id | string | The resource being accessed. |
resource_name | string | A human-readable short identifier of the resource. |
resource_owner | string | The identity that owns the resource. |
resource_kind | string repeated | The kind of resource. |
identity_did | string | The identity attempting access. |
credential_lookup | string | The JSON path array for looking up verifiable credentials. |
identity_name | string | A human-readable short identifier of the subject. |
identity_kind | string repeated | The kind of identity. |
access | string | Requested access. |
extra | string | Optional extra data. |
decision | PolicyDecision | Assigned decision. |
recursive | bool | |
request_time | int64 | Time at which the request was made. |
decision_time | int64 | Time at which the decision was taken. |
request_count | uint32 | Counter of number times this access was requested. |
AttributeValue
Attribute value will be one of the following fields, depending on the data type.
Field | Type | Description |
string | string | |
integer | int64 | |
real | double | |
boolean | bool | |
bytes | bytes |
Identity
A Volt identity encompasses a Resource and a set of identity aliases.
Field | Type | Description |
resource | Resource | |
alias | IdentityAlias repeated |
IdentityAlias
Field | Type | Description |
id | uint32 | The alias id. |
identity_did | string | The corresponding identity id. |
alias | string | The actual alias, e.g. a common name or key fingerprint. |
public_key | string | This will only be populated if alias_type == tdx:public-key |
private_key | string | This will only be populated if alias_type == tdx:public-key, and the key is stored in the Volt. |
alias_type | string | The alias type, for example public key, email, phone number etc. |
issuer_id | string | The identity that issued this alias. |
authenticate | PolicyDecision | Indicates if this alias has an authenticate policy decision assigned. |
description | string | Optional description of this alias. |
MethodDescription
Internal use only.
Field | Type | Description |
path | string | |
client_streaming | bool | |
server_streaming | bool |
ProtoFile
Describes a single protobuf file for use in ServiceDescription.
Field | Type | Description |
file_path | string | The path name of the proto file, relative to the 'root' of the namespace, e.g. "tdx/volt_api/volt/v1/volt.proto". |
protobuf | string | The actual protobuf file contents. |
service_name | string repeated | Optional - the service(s) contained in this protobuf file, if omitted here they will be loaded dynamically from the protobuf. |
ProxyConnection
Represents an outbound connection from a Volt to a remote service that will act as a proxy for that Volt.
This enables Volts to bypass firewall and NATs.
Example - connection from a Volt to a Relay Volt running on the public internet, such as tdxvolt.com
Field | Type | Description |
id | string | Unique connection id. |
name | string | A human-readable name for the connection. |
address | string | The remote address of the proxy service. |
ca_pem | string | The certificate authority of the proxy service. |
enabled | bool | Indicates this connection is enabled. |
connected | bool | Indicates this connection is currently in use. |
enable_http_proxy | bool | Indicates that this connection will handle HTTP proxying as well as GRPC. |
disable_volt_api | bool | Set to indicate the Volt API itself is not automatically exposed to the connection. |
challenge | string | Optional challenge that can be presented in the authentication request. |
target_id | string | The id of the target Volt that this connection is bound to. |
sync_did_registry | bool | Indicates that this connection hosts a DID registry that we should synchronise with. |
did_registry_sync_id | uint64 | The id of the last DID registry operation that was synchronised. |
sync_vc_registry | bool | Indicates that this connection hosts a DID registry that we should synchronise with. |
vc_registry_sync_timestamp | uint64 | The timestamp of the last VC registry operation that was synchronised. |
session_id | string | |
certificate | string |
Resource
The core Resource metadata schema.
Field | Type | Description |
id | string | The globally unique resource id. |
description | string | Optional description. |
name | string | Human-readable resource name. |
share_mode | ShareMode | Not in use. |
volt_id | string | The id of the Volt that hosts this resource. |
service_description | ServiceDescription | Optional description of any services exposed by this resource. |
attribute | ResourceAttribute repeated | Attributes assigned to the resource. |
platform_version | Version | The version of the platform. |
version | uint64 | The resource version. |
owner | string | The identity of the resource owner. |
created | uint64 | Creation timestamp, milliseconds since epoch. |
modified | uint64 | Last modification timestamp, milliseconds since epoch. |
status | ResourceStatus | Not in use. |
kind | string repeated | The taxonomy of the resource. |
online_status | OnlineStatus | The online status. 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. All built-in resources are hosted by the Volt itself and are therefore always online when the Volt is running. Resources hosted by external servers are online if the server itself is online and has registered the resource as online using `setServiceStatus`. |
size | uint64 | The size of the resource store in bytes. |
store | string | The path to the resource store. |
alias | string repeated | Alias(es) that can be used to refer to the resource rather than the id. Each alias must be unique to the Volt, this is enforced by the API. 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 '-'. |
content_hash | string | The hash of the resource content contained in the store. |
child | Resource repeated | Not yet supported. |
ResourceAttribute
A resource attribute enables storing arbitrary data associated with a resource.
Field | Type | Description |
id | uint32 | |
attribute_id | string | |
resource_id | string | |
data_type | AttributeDataType | |
value | AttributeValue repeated |
ServiceDescription
Describes a Volt service.
Field | Type | Description |
host_type | ServiceHostType | The configuration used by the host of this service. |
host_client_id | string | The identity of the client that is exposing the service. 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). 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. This will be empty if the service is a built-in Volt service. |
host_service_id | string | The id of the resource that holds the protobuf definition for this resource. 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. For built-in services, i.e. those hosted by the Volt, this will set to the Volt id. |
host_address | string | The address of the grpc server hosting this service. Only relevant to grpc-hosted services. |
host_ca_pem | string | The certificate authority (chain) that signed the service server certificate. This is only relevant to grpc-hosted services. |
host_public_key | string | The public key of the service host, which is used to encrypt payloads. This may change as the service comes and goes online. |
host_connection_id | string | The connection id currently used to host this service. |
host_session_id | string | Internal use only. |
discoverable | DiscoveryMode | The discovery mode. |
ping_timestamp | int64 | The ping timestamp of the server hosting this service. |
proto_file | ProtoFile repeated | The protobuf definitions of the APIs exposed by this service. |
service_api | string repeated | The fully qualified names of the protobuf services, for example tdx.volt_api.webcam.v1.WebcamControlAPI. |
method | MethodDescription repeated | Internal use only. |
Session
Field | Type | Description |
id | string | |
identity_did | string | |
identity_name | string | |
ip | string | |
created | uint64 | |
modified | uint64 | |
expires | uint64 | |
credential | SessionCredential repeated | |
origin | string | |
status | SessionStatus |
SessionCredential
Field | Type | Description |
id | uint32 | The alias id. |
session_id | string | The corresponding session id. |
credential_type | string | The credential type, for example public key, verifiable credential, challenge etc. |
description | string | Optional description of this credential. |
vc_id | string | The id of the verifiable credential, if the credential type is volt:vc-claim. |
vc_json | string | The verifiable credential in JSON format, if the credential type is volt:vc-claim. |
vc_subject_id | string | The subject id extracted from the `vc_json` field. |
vc_issuer_id | string | The issuer id extracted from the `vc_json` field. |
vc_type | string | The comma-separated type(s) extracted from the `vc_json` field. |
challenge | string | The challenge string, if the credential type is volt:challenge. |
key_fingerprint | string | The key fingerprint, if the credential type is volt:public-key. |
public_key | string | The PEM-encoded public key, if the credential type is volt:public-key. |
private_key | string | 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. |
extra | string | Type-specific extra data stored with the credential. |
extra_2 | string | More type-specific data stored with the credential. |
Version
Using `major` and `minor` here upsets the GNU C Library, so we add a `version_` prefix.
Field | Type | Description |
version_major | uint32 | |
version_minor | uint32 | |
version_patch | uint32 |
VoltEndpoint
Field | Type | Description |
id | string | The globally unique Volt id. |
display_name | string | Human-readable name of the Volt. |
local_address | string | The actual host/ip the volt is physically running on (might be a local ip if behind firewall). |
http_address | string | The address of the endpoint HTTP server. |
relay_address | string | 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. |
relay_ca_pem | string | The root certificate of the Relay instance referred to in `relay_address`. |
ca_pem | string | The self-signed certificate used by the volt to sign client certificates. |
public_key | string | The Volt public key in PEM format. |
fingerprint | string | The base58 fingerprint of the Volt public key. |
online_status | OnlineStatus | The online status of the Volt. |
has_relay | bool | Indicates that this Volt acts as a Relay. |
api_version | Version | The API version supported by the endpoint. |
description | string | Optional description of the endpoint. |
did_registry | string repeated | The list of DID registries that this Volt trusts. |
VoltParameters
Encapsulates the various Volt parameters that are configurable by the Volt owner.
Field | Type | Description |
id | string | |
name | string | The name of the Volt. |
description | string | Human-readable description of the Volt. |
db_driver | string | The database driver in use. |
location | string | The local file path location of the Volt storage. |
key_strategy | string | The key strategy in use, this determines how the root key is stored. |
key_id | string | The identifier for the key, the semantics depend on the key strategy in use. |
ca_pem | string | The Volt certificate authority. |
cert_pem | string | The Volt API server certificate. |
fixed_host | string | Optional hostname of the Volt if using DNS or a static IP address, e.g. tdxvolt.com |
grpc_port | int32 | Port to use for hosting the Volt management service. |
http_port | int32 | Port to use for hosting the Volt grpc service. |
http_key_path | string | The Volt http server key file path. |
http_cert_path | string | The Volt http server certificate file path. |
http_ca_path | string | The Volt http server certificate authority chain file path. |
discoverable | bool | Indicates the Volt will be discoverable by clients using the discovery api. |
authenticate_challenge | string | Optional challenge code that can be used aid in the process of authenticating clients. |
require_authenticate_challenge | bool | Indicates that clients must present the correct challenge code in order to be able to authenticate. |
confirm_stop | bool | Internal use only. |
auto_start | bool | Internal use only. |
enable_messaging | bool | Internal use only. |
has_relay | bool | Set to indicate this Volt acts as a Relay. This means this Volt can act as a proxy for other Volts (or in fact any client) that connect to it. |
relay_open | bool | Set to run the Relay open to any client, i.e. clients can utilise the Relay without first authenticating. |
enable_http_server | bool | Determines if the Volt HTTP server is enabled. |
http_server_secure | bool | Determines whether the HTTP server employs TLS. |
enable_http_forwarding | bool | Determines whether the HTTP server supports forwarding. |
enable_http_api | bool | Determines if the Volt REST API is exposed via the HTTP server. |
enable_websocket_api | bool | Determines if the Volt Websocket API is exposed via the HTTP server. |
address | string | The hostname:port at which the Volt API is currently running. |
encrypt_file_store | bool | Set to indicate the Volt file store is encrypted. |
connection_id | string | This is a unique connection id. Indicates that these parameters refer to a connection to a remote Volt rather than a local Volt. |
relay_ca_pem | string | The certificate authority of the Relay if this is a remote connection via a Relay. |
http_address_override | string | Optional override of the http address, rather than using the default of fixed_host:http_port. This is useful if the Volt is behind a firewall or NAT, and the http server is listening on a different port from 80 or 443 but this is hidden by the proxy. For example, if the `fixed_host` is `coreid.com` and http server is listening on 2115, but the proxy is forwarding 443 to 2115, then the http_address_override would be set to `https://coreid.com`. |
alias | string | An optional alias that can be used to refer to the Volt rather than the `id` field. This alias must be unique within the scope of the Battery in which the Volt is stored. |
version | Version | The runtime version this Volt is running. |
approve_on_challenge | bool | If set, indicates that any client that provides the correct challenge during authentication will automatically be approved to access the Volt. |
approve_on_did | bool | If set, indicates that any client that proves ownership of a DID known to the Volt will automatically be approved to access the Volt. |
enable_did_registry | bool | If set, indicates that clients can register DIDs with this Volt. |
did_registry | string repeated | Zero or more URLs of trusted peer DID registries. |
enable_outbound_smtp | bool | If set, enables outbound SMTP. |
outbound_smtp_host | string | The SMTP host to use for sending emails. |
outbound_smtp_port | uint32 | The SMTP port to use for sending emails. |
outbound_smtp_user | string | The SMTP username to use for sending emails. |
outbound_smtp_password | string | The SMTP password to use for sending emails. |
enable_anonymous_create | bool | If set, enables sessions that authenticate using credentials rather than a DID to create resources in the 'anonymous' system folder. |
catch_all_auth_decision | PolicyDecision | The decision to apply to all authentication requests that do not match any other policy. The default is PROMPT. |
enable_policy_cache | bool | If set, enables caching of policy decisions. |
enable_terminal | bool | If set, enables the terminal API. |
start_time | uint64 | The time at which the Volt was started. |
AttributeDataType
Attribute data types.
Name | Number | Description |
ATTRIBUTE_DATA_TYPE_UNKNOWN | 0 | |
ATTRIBUTE_DATA_TYPE_STRING | 1 | |
ATTRIBUTE_DATA_TYPE_INTEGER | 2 | |
ATTRIBUTE_DATA_TYPE_REAL | 3 | |
ATTRIBUTE_DATA_TYPE_BOOLEAN | 4 | |
ATTRIBUTE_DATA_TYPE_BYTES | 5 | |
ATTRIBUTE_DATA_TYPE_IDENTITY | 100 | |
ATTRIBUTE_DATA_TYPE_RESOURCE | 101 |
DiscoveryMode
Name | Number | Description |
DISCOVERY_MODE_UNKNOWN | 0 | |
DISCOVERY_MODE_TRUSTED | 1 | Only local identities with explicit policy PERMIT can discover. |
DISCOVERY_MODE_PUBLIC | 2 | Any bound local identity can discover. |
DISCOVERY_MODE_TRUSTED_GLOBAL | 3 | Only identities with explicit policy PERMIT can discover, and the service will be available to local and non-local (Relayed) clients. |
DISCOVERY_MODE_PUBLIC_GLOBAL | 4 | Any bound identity can discover, and the service will be available to local and non-local (Relayed) clients. |
OnlineStatus
Name | Number | Description |
ONLINE_STATUS_UNKNOWN | 0 | |
ONLINE_STATUS_ONLINE | 1 | |
ONLINE_STATUS_OFFLINE | 2 |
PolicyDecision
@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.
Name | Number | Description |
POLICY_DECISION_UNKNOWN | 0 | |
POLICY_DECISION_PROMPT | 1 | |
POLICY_DECISION_PERMIT | 2 | |
POLICY_DECISION_DENY | 3 | |
POLICY_DECISION_INDETERMINATE | 4 | |
POLICY_DECISION_NOT_APPLICABLE | 5 | |
POLICY_DECISION_APPLICABLE | 6 | |
POLICY_DECISION_PENDING | 7 |
ResourceStatus
Not used ATM.
Name | Number | Description |
RESOURCE_STATUS_UNKNOWN | 0 | |
RESOURCE_STATUS_LIVE | 1 | |
RESOURCE_STATUS_INACTIVE | 2 | |
RESOURCE_STATUS_DELETED | 999 |
SecureMode
Name | Number | Description |
SECURE_MODE_UNKNOWN | 0 | |
SECURE_MODE_INSECURE | 1 | |
SECURE_MODE_TLS | 2 |
ServiceHostType
Name | Number | Description |
SERVICE_HOST_TYPE_UNKNOWN | 0 | |
SERVICE_HOST_TYPE_BUILTIN | 1 | A built-in service hosted by the Volt. |
SERVICE_HOST_TYPE_SERVER | 2 | A service hosted by a grpc server other than the Volt. |
SERVICE_HOST_TYPE_RELAYED | 3 | 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. |
SessionStatus
Name | Number | Description |
SESSION_STATUS_UNKNOWN | 0 | |
SESSION_STATUS_PENDING | 1 | |
SESSION_STATUS_LIVE | 2 | |
SESSION_STATUS_EXPIRED | 3 | |
SESSION_STATUS_REVOKED | 4 | |
SESSION_STATUS_REJECTED | 5 |
ShareMode
Not used ATM.
Name | Number | Description |
SHARE_MODE_UNKNOWN | 0 | |
SHARE_MODE_TRUSTED | 1 | |
SHARE_MODE_PUBLIC_READ | 2 |
HttpInvoke
Field | Type | Description |
host | string | |
port | int32 | |
method | string | |
url | string | |
version | string | |
headers | HttpInvoke.HeadersEntry repeated | |
body | bytes |
HttpInvoke.HeadersEntry
Field | Type | Description |
key | string | |
value | string |
HttpPayload
Field | Type | Description |
chunk | bytes | |
end | bool | |
error | int32 |
HttpRequest
Field | Type | Description |
id | uint64 | |
http_invoke | HttpInvoke | |
http_payload | HttpPayload |
HttpResponse
Field | Type | Description |
id | uint64 | |
http_payload | HttpPayload |
MethodEnd
Field | Type | Description |
id | uint64 | |
ended | bool | |
error | string | |
error_code | int32 |
MethodInvoke
Field | Type | Description |
id | uint64 | |
service_id | string | |
method_name | string | |
method_type | MethodType | |
request | bytes | |
json_request | string |
MethodPayload
Field | Type | Description |
id | uint64 | |
payload | bytes | |
json_payload | string |
RemotePing
Field | Type | Description |
timestamp | uint64 |
RemoteRequest
Field | Type | Description |
ping | RemotePing | |
method_payload | MethodPayload | |
method_end | MethodEnd | |
http_response | HttpResponse |
RemoteResponse
Field | Type | Description |
ping | RemotePing | |
method_invoke | MethodInvoke | |
method_payload | MethodPayload | |
method_end | MethodEnd | |
http_request | HttpRequest |
MethodType
Name | Number | Description |
METHOD_TYPE_UNKNOWN | 0 | |
METHOD_TYPE_UNARY | 1 | |
METHOD_TYPE_CLIENT_STREAM | 2 | |
METHOD_TYPE_SERVER_STREAM | 3 | |
METHOD_TYPE_BIDI | 4 |
Scalar Value Types
.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
double | double | double | float | float64 | double | float | Float | |
float | float | float | float | float32 | float | float | Float | |
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |