Aranya
a software development tool for governing access to data and services over a decentralized, zero-trust framework with secure end-to-end encrypted data exchange built-in.
Loading...
Searching...
No Matches
Related Symbols
AranyaClient Struct Reference

A handle to an Aranya Client. More...

#include <aranya-client.h>

Related Symbols

(Note that these are not member symbols.)

AranyaError aranya_client_init (struct AranyaClient *client, const struct AranyaClientConfig *config)
 Initializes a new client instance.
 
AranyaError aranya_client_init_ext (struct AranyaClient *client, const struct AranyaClientConfig *config, struct AranyaExtError *__ext_err)
 Initializes a new client instance.
 
AranyaError aranya_client_cleanup (struct AranyaClient *ptr)
 Releases any resources associated with ptr.
 
AranyaError aranya_client_cleanup_ext (struct AranyaClient *ptr, struct AranyaExtError *__ext_err)
 Releases any resources associated with ptr.
 
AranyaError aranya_get_key_bundle (const struct AranyaClient *client, uint8_t *keybundle, size_t *keybundle_len)
 Gets the public key bundle for this device.
 
AranyaError aranya_get_key_bundle_ext (const struct AranyaClient *client, uint8_t *keybundle, size_t *keybundle_len, struct AranyaExtError *__ext_err)
 Gets the public key bundle for this device.
 
AranyaError aranya_get_device_id (const struct AranyaClient *client, struct AranyaDeviceId *__output)
 Gets the public device ID.
 
AranyaError aranya_get_device_id_ext (const struct AranyaClient *client, struct AranyaDeviceId *__output, struct AranyaExtError *__ext_err)
 Gets the public device ID.
 
AranyaError aranya_assign_role (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, AranyaRole role)
 Assign a role to a device.
 
AranyaError aranya_assign_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, AranyaRole role, struct AranyaExtError *__ext_err)
 Assign a role to a device.
 
AranyaError aranya_revoke_role (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, AranyaRole role)
 Revoke a role from a device.
 
AranyaError aranya_revoke_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, AranyaRole role, struct AranyaExtError *__ext_err)
 Revoke a role from a device.
 
AranyaError aranya_create_label (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaLabelName name, struct AranyaLabelId *__output)
 Create a channel label.
 
AranyaError aranya_create_label_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaLabelName name, struct AranyaLabelId *__output, struct AranyaExtError *__ext_err)
 Create a channel label.
 
AranyaError aranya_delete_label (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label_id)
 Delete a channel label.
 
AranyaError aranya_delete_label_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label_id, struct AranyaExtError *__ext_err)
 Delete a channel label.
 
AranyaError aranya_assign_label (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaLabelId *label_id, AranyaChanOp op)
 Assign a label to a device so that it can be used for a channel.
 
AranyaError aranya_assign_label_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaLabelId *label_id, AranyaChanOp op, struct AranyaExtError *__ext_err)
 Assign a label to a device so that it can be used for a channel.
 
AranyaError aranya_revoke_label (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaLabelId *label_id)
 Revoke a label from a device.
 
AranyaError aranya_revoke_label_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaLabelId *label_id, struct AranyaExtError *__ext_err)
 Revoke a label from a device.
 
AranyaError aranya_create_team (const struct AranyaClient *client, const struct AranyaCreateTeamConfig *cfg, struct AranyaTeamId *__output)
 Create a new graph/team with the current device as the owner.
 
AranyaError aranya_create_team_ext (const struct AranyaClient *client, const struct AranyaCreateTeamConfig *cfg, struct AranyaTeamId *__output, struct AranyaExtError *__ext_err)
 Create a new graph/team with the current device as the owner.
 
AranyaError aranya_rand (const struct AranyaClient *client, uint8_t *buf, size_t buf_len)
 Return random bytes from Aranya's CSPRNG.
 
AranyaError aranya_rand_ext (const struct AranyaClient *client, uint8_t *buf, size_t buf_len, struct AranyaExtError *__ext_err)
 Return random bytes from Aranya's CSPRNG.
 
AranyaError aranya_encrypt_psk_seed_for_peer (const struct AranyaClient *client, const struct AranyaTeamId *team_id, const uint8_t *keybundle, size_t keybundle_len, uint8_t *seed, size_t *seed_len)
 Return serialized PSK seed encrypted for another device on the team.
 
AranyaError aranya_encrypt_psk_seed_for_peer_ext (const struct AranyaClient *client, const struct AranyaTeamId *team_id, const uint8_t *keybundle, size_t keybundle_len, uint8_t *seed, size_t *seed_len, struct AranyaExtError *__ext_err)
 Return serialized PSK seed encrypted for another device on the team.
 
AranyaError aranya_add_team (const struct AranyaClient *client, const struct AranyaAddTeamConfig *cfg)
 Add a team to the local device store.
 
AranyaError aranya_add_team_ext (const struct AranyaClient *client, const struct AranyaAddTeamConfig *cfg, struct AranyaExtError *__ext_err)
 Add a team to the local device store.
 
AranyaError aranya_remove_team (const struct AranyaClient *client, const struct AranyaTeamId *team)
 Remove a team from local device storage.
 
AranyaError aranya_remove_team_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaExtError *__ext_err)
 Remove a team from local device storage.
 
AranyaError aranya_close_team (const struct AranyaClient *client, const struct AranyaTeamId *team)
 Close the team and stop all operations on the graph.
 
AranyaError aranya_close_team_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaExtError *__ext_err)
 Close the team and stop all operations on the graph.
 
AranyaError aranya_add_device_to_team (const struct AranyaClient *client, const struct AranyaTeamId *team, const uint8_t *keybundle, size_t keybundle_len)
 Add a device to the team with the default role.
 
AranyaError aranya_add_device_to_team_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const uint8_t *keybundle, size_t keybundle_len, struct AranyaExtError *__ext_err)
 Add a device to the team with the default role.
 
AranyaError aranya_remove_device_from_team (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device)
 Remove a device from the team.
 
AranyaError aranya_remove_device_from_team_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, struct AranyaExtError *__ext_err)
 Remove a device from the team.
 
AranyaError aranya_add_sync_peer (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr addr, const struct AranyaSyncPeerConfig *config)
 Add the peer for automatic periodic Aranya state syncing.
 
AranyaError aranya_add_sync_peer_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr addr, const struct AranyaSyncPeerConfig *config, struct AranyaExtError *__ext_err)
 Add the peer for automatic periodic Aranya state syncing.
 
AranyaError aranya_remove_sync_peer (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr addr)
 Remove the peer from automatic Aranya state syncing.
 
AranyaError aranya_remove_sync_peer_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr addr, struct AranyaExtError *__ext_err)
 Remove the peer from automatic Aranya state syncing.
 
AranyaError aranya_sync_now (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr addr, const struct AranyaSyncPeerConfig *config)
 Sync with peer immediately.
 
AranyaError aranya_sync_now_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr addr, const struct AranyaSyncPeerConfig *config, struct AranyaExtError *__ext_err)
 Sync with peer immediately.
 
AranyaError aranya_query_devices_on_team (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaDeviceId *devices, size_t *devices_len)
 Query devices on team.
 
AranyaError aranya_query_devices_on_team_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaDeviceId *devices, size_t *devices_len, struct AranyaExtError *__ext_err)
 Query devices on team.
 
AranyaError aranya_query_device_keybundle (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, uint8_t *keybundle, size_t *keybundle_len)
 Query device's keybundle.
 
AranyaError aranya_query_device_keybundle_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, uint8_t *keybundle, size_t *keybundle_len, struct AranyaExtError *__ext_err)
 Query device's keybundle.
 
AranyaError aranya_query_device_label_assignments (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, struct AranyaLabelId *labels, size_t *labels_len)
 Query device label assignments.
 
AranyaError aranya_query_device_label_assignments_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, struct AranyaLabelId *labels, size_t *labels_len, struct AranyaExtError *__ext_err)
 Query device label assignments.
 
AranyaError aranya_query_labels (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaLabelId *labels, size_t *labels_len)
 Query for list of existing labels.
 
AranyaError aranya_query_labels_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaLabelId *labels, size_t *labels_len, struct AranyaExtError *__ext_err)
 Query for list of existing labels.
 
AranyaError aranya_query_label_exists (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label, bool *__output)
 Query if a label exists.
 
AranyaError aranya_query_label_exists_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label, bool *__output, struct AranyaExtError *__ext_err)
 Query if a label exists.
 

Detailed Description

A handle to an Aranya Client.

Friends And Related Symbol Documentation

◆ aranya_add_device_to_team()

AranyaError aranya_add_device_to_team ( const struct AranyaClient client,
const struct AranyaTeamId team,
const uint8_t *  keybundle,
size_t  keybundle_len 
)
related

Add a device to the team with the default role.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]keybundleserialized keybundle byte buffer KeyBundle.
[in]keybundle_lenis the length of the serialized keybundle.

◆ aranya_add_device_to_team_ext()

AranyaError aranya_add_device_to_team_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const uint8_t *  keybundle,
size_t  keybundle_len,
struct AranyaExtError __ext_err 
)
related

Add a device to the team with the default role.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]keybundleserialized keybundle byte buffer KeyBundle.
[in]keybundle_lenis the length of the serialized keybundle.

◆ aranya_add_sync_peer()

AranyaError aranya_add_sync_peer ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  addr,
const struct AranyaSyncPeerConfig config 
)
related

Add the peer for automatic periodic Aranya state syncing.

If a peer is not reachable on the network, sync errors will appear in the tracing logs and Aranya will be unable to sync state with that peer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]addrthe peer's Aranya network address `AranyaAddr`.
[in]configconfiguration values for syncing with a peer.

◆ aranya_add_sync_peer_ext()

AranyaError aranya_add_sync_peer_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  addr,
const struct AranyaSyncPeerConfig config,
struct AranyaExtError __ext_err 
)
related

Add the peer for automatic periodic Aranya state syncing.

If a peer is not reachable on the network, sync errors will appear in the tracing logs and Aranya will be unable to sync state with that peer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]addrthe peer's Aranya network address `AranyaAddr`.
[in]configconfiguration values for syncing with a peer.

◆ aranya_add_team()

AranyaError aranya_add_team ( const struct AranyaClient client,
const struct AranyaAddTeamConfig cfg 
)
related

Add a team to the local device store.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]cfgthe Team Configuration `AranyaAddTeamConfig`.

◆ aranya_add_team_ext()

AranyaError aranya_add_team_ext ( const struct AranyaClient client,
const struct AranyaAddTeamConfig cfg,
struct AranyaExtError __ext_err 
)
related

Add a team to the local device store.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]cfgthe Team Configuration `AranyaAddTeamConfig`.

◆ aranya_assign_label()

AranyaError aranya_assign_label ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
const struct AranyaLabelId label_id,
AranyaChanOp  op 
)
related

Assign a label to a device so that it can be used for a channel.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device ID `AranyaDeviceId` of the device to assign the label to.
[in]label_idthe AQC channel label ID `AranyaLabelId`.

◆ aranya_assign_label_ext()

AranyaError aranya_assign_label_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
const struct AranyaLabelId label_id,
AranyaChanOp  op,
struct AranyaExtError __ext_err 
)
related

Assign a label to a device so that it can be used for a channel.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device ID `AranyaDeviceId` of the device to assign the label to.
[in]label_idthe AQC channel label ID `AranyaLabelId`.

◆ aranya_assign_role()

AranyaError aranya_assign_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
AranyaRole  role 
)
related

Assign a role to a device.

This will change the device's current role to the new role assigned.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[in]rolethe role `AranyaRole` to assign to the device.

◆ aranya_assign_role_ext()

AranyaError aranya_assign_role_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
AranyaRole  role,
struct AranyaExtError __ext_err 
)
related

Assign a role to a device.

This will change the device's current role to the new role assigned.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[in]rolethe role `AranyaRole` to assign to the device.

◆ aranya_client_cleanup()

AranyaError aranya_client_cleanup ( struct AranyaClient ptr)
related

Releases any resources associated with ptr.

ptr must either be null or initialized by aranya_client_init.

◆ aranya_client_cleanup_ext()

AranyaError aranya_client_cleanup_ext ( struct AranyaClient ptr,
struct AranyaExtError __ext_err 
)
related

Releases any resources associated with ptr.

ptr must either be null or initialized by aranya_client_init.

◆ aranya_client_init()

AranyaError aranya_client_init ( struct AranyaClient client,
const struct AranyaClientConfig config 
)
related

Initializes a new client instance.

Parameters
[out]clientthe uninitialized Aranya Client `AranyaClient`.
[in]configthe client's configuration `AranyaClientConfig`.

◆ aranya_client_init_ext()

AranyaError aranya_client_init_ext ( struct AranyaClient client,
const struct AranyaClientConfig config,
struct AranyaExtError __ext_err 
)
related

Initializes a new client instance.

Parameters
[out]clientthe uninitialized Aranya Client `AranyaClient`.
[in]configthe client's configuration `AranyaClientConfig`.

◆ aranya_close_team()

AranyaError aranya_close_team ( const struct AranyaClient client,
const struct AranyaTeamId team 
)
related

Close the team and stop all operations on the graph.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.

◆ aranya_close_team_ext()

AranyaError aranya_close_team_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaExtError __ext_err 
)
related

Close the team and stop all operations on the graph.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.

◆ aranya_create_label()

AranyaError aranya_create_label ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaLabelName  name,
struct AranyaLabelId __output 
)
related

Create a channel label.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]namelabel name string `AranyaLabelName`.

◆ aranya_create_label_ext()

AranyaError aranya_create_label_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaLabelName  name,
struct AranyaLabelId __output,
struct AranyaExtError __ext_err 
)
related

Create a channel label.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]namelabel name string `AranyaLabelName`.

◆ aranya_create_team()

AranyaError aranya_create_team ( const struct AranyaClient client,
const struct AranyaCreateTeamConfig cfg,
struct AranyaTeamId __output 
)
related

Create a new graph/team with the current device as the owner.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]cfgthe Team Configuration `AranyaCreateTeamConfig`.
[out]__outputthe team's ID `AranyaTeamId`.

◆ aranya_create_team_ext()

AranyaError aranya_create_team_ext ( const struct AranyaClient client,
const struct AranyaCreateTeamConfig cfg,
struct AranyaTeamId __output,
struct AranyaExtError __ext_err 
)
related

Create a new graph/team with the current device as the owner.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]cfgthe Team Configuration `AranyaCreateTeamConfig`.
[out]__outputthe team's ID `AranyaTeamId`.

◆ aranya_delete_label()

AranyaError aranya_delete_label ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaLabelId label_id 
)
related

Delete a channel label.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]label_idthe channel label ID `AranyaLabelId` to delete.

◆ aranya_delete_label_ext()

AranyaError aranya_delete_label_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaLabelId label_id,
struct AranyaExtError __ext_err 
)
related

Delete a channel label.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]label_idthe channel label ID `AranyaLabelId` to delete.

◆ aranya_encrypt_psk_seed_for_peer()

AranyaError aranya_encrypt_psk_seed_for_peer ( const struct AranyaClient client,
const struct AranyaTeamId team_id,
const uint8_t *  keybundle,
size_t  keybundle_len,
uint8_t *  seed,
size_t *  seed_len 
)
related

Return serialized PSK seed encrypted for another device on the team.

The PSK seed will be encrypted using the public encryption key of the specified device on the team.

Returns an AranyaBufferTooSmall error if the output buffer is too small to hold the seed bytes. Writes the number of bytes that would have been returned to seed_len. The application can use seed_len to allocate a larger buffer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]team_idthe team's ID `AranyaTeamId`.
[in]keybundleserialized keybundle byte buffer KeyBundle.
[in]keybundle_lenthe length of the keybundle
[out]seedthe serialized, encrypted PSK seed.
[in,out]seed_lenthe number of bytes written to the seed buffer.

This method will be removed soon since certificates will be used instead of PSKs in the future.

◆ aranya_encrypt_psk_seed_for_peer_ext()

AranyaError aranya_encrypt_psk_seed_for_peer_ext ( const struct AranyaClient client,
const struct AranyaTeamId team_id,
const uint8_t *  keybundle,
size_t  keybundle_len,
uint8_t *  seed,
size_t *  seed_len,
struct AranyaExtError __ext_err 
)
related

Return serialized PSK seed encrypted for another device on the team.

The PSK seed will be encrypted using the public encryption key of the specified device on the team.

Returns an AranyaBufferTooSmall error if the output buffer is too small to hold the seed bytes. Writes the number of bytes that would have been returned to seed_len. The application can use seed_len to allocate a larger buffer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]team_idthe team's ID `AranyaTeamId`.
[in]keybundleserialized keybundle byte buffer KeyBundle.
[in]keybundle_lenthe length of the keybundle
[out]seedthe serialized, encrypted PSK seed.
[in,out]seed_lenthe number of bytes written to the seed buffer.

This method will be removed soon since certificates will be used instead of PSKs in the future.

◆ aranya_get_device_id()

AranyaError aranya_get_device_id ( const struct AranyaClient client,
struct AranyaDeviceId __output 
)
related

Gets the public device ID.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[out]__outputthe client's device ID `AranyaDeviceId`.

◆ aranya_get_device_id_ext()

AranyaError aranya_get_device_id_ext ( const struct AranyaClient client,
struct AranyaDeviceId __output,
struct AranyaExtError __ext_err 
)
related

Gets the public device ID.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[out]__outputthe client's device ID `AranyaDeviceId`.

◆ aranya_get_key_bundle()

AranyaError aranya_get_key_bundle ( const struct AranyaClient client,
uint8_t *  keybundle,
size_t *  keybundle_len 
)
related

Gets the public key bundle for this device.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[out]keybundlekeybundle byte buffer KeyBundle.
[in,out]keybundle_lenreturns the length of the serialized keybundle.

◆ aranya_get_key_bundle_ext()

AranyaError aranya_get_key_bundle_ext ( const struct AranyaClient client,
uint8_t *  keybundle,
size_t *  keybundle_len,
struct AranyaExtError __ext_err 
)
related

Gets the public key bundle for this device.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[out]keybundlekeybundle byte buffer KeyBundle.
[in,out]keybundle_lenreturns the length of the serialized keybundle.

◆ aranya_query_device_keybundle()

AranyaError aranya_query_device_keybundle ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
uint8_t *  keybundle,
size_t *  keybundle_len 
)
related

Query device's keybundle.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[out]keybundlekeybundle byte buffer KeyBundle.
[in,out]keybundle_lenreturns the length of the serialized keybundle.

◆ aranya_query_device_keybundle_ext()

AranyaError aranya_query_device_keybundle_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
uint8_t *  keybundle,
size_t *  keybundle_len,
struct AranyaExtError __ext_err 
)
related

Query device's keybundle.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[out]keybundlekeybundle byte buffer KeyBundle.
[in,out]keybundle_lenreturns the length of the serialized keybundle.

◆ aranya_query_device_label_assignments()

AranyaError aranya_query_device_label_assignments ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
struct AranyaLabelId labels,
size_t *  labels_len 
)
related

Query device label assignments.

Returns an AranyaBufferTooSmall error if the output buffer is too small to hold the labels. Writes the number of labels that would have been returned to labels_len. The application can use labels_len to allocate a larger buffer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[out]labelsreturns a list of labels assigned to the device `AranyaLabelId`.
[in,out]labels_lenreturns the length of the labels list `AranyaLabelId`.

◆ aranya_query_device_label_assignments_ext()

AranyaError aranya_query_device_label_assignments_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
struct AranyaLabelId labels,
size_t *  labels_len,
struct AranyaExtError __ext_err 
)
related

Query device label assignments.

Returns an AranyaBufferTooSmall error if the output buffer is too small to hold the labels. Writes the number of labels that would have been returned to labels_len. The application can use labels_len to allocate a larger buffer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[out]labelsreturns a list of labels assigned to the device `AranyaLabelId`.
[in,out]labels_lenreturns the length of the labels list `AranyaLabelId`.

◆ aranya_query_devices_on_team()

AranyaError aranya_query_devices_on_team ( const struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaDeviceId devices,
size_t *  devices_len 
)
related

Query devices on team.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[out]devicesreturns a list of device IDs on the team `AranyaDeviceId`.
[in,out]devices_lenreturns the length of the devices list `AranyaDeviceId`.

◆ aranya_query_devices_on_team_ext()

AranyaError aranya_query_devices_on_team_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaDeviceId devices,
size_t *  devices_len,
struct AranyaExtError __ext_err 
)
related

Query devices on team.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[out]devicesreturns a list of device IDs on the team `AranyaDeviceId`.
[in,out]devices_lenreturns the length of the devices list `AranyaDeviceId`.

◆ aranya_query_label_exists()

AranyaError aranya_query_label_exists ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaLabelId label,
bool *  __output 
)
related

Query if a label exists.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[in]labelthe label `AranyaLabelId`.
[out]__outputboolean indicating whether the label exists.

◆ aranya_query_label_exists_ext()

AranyaError aranya_query_label_exists_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaLabelId label,
bool *  __output,
struct AranyaExtError __ext_err 
)
related

Query if a label exists.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[in]labelthe label `AranyaLabelId`.
[out]__outputboolean indicating whether the label exists.

◆ aranya_query_labels()

AranyaError aranya_query_labels ( const struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaLabelId labels,
size_t *  labels_len 
)
related

Query for list of existing labels.

Returns an AranyaBufferTooSmall error if the output buffer is too small to hold the labels. Writes the number of labels that would have been returned to labels_len. The application can use labels_len to allocate a larger buffer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[out]labelsreturns a list of labels `AranyaLabelId`.
[in,out]labels_lenreturns the length of the labels list `AranyaLabelId`.

◆ aranya_query_labels_ext()

AranyaError aranya_query_labels_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaLabelId labels,
size_t *  labels_len,
struct AranyaExtError __ext_err 
)
related

Query for list of existing labels.

Returns an AranyaBufferTooSmall error if the output buffer is too small to hold the labels. Writes the number of labels that would have been returned to labels_len. The application can use labels_len to allocate a larger buffer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[out]labelsreturns a list of labels `AranyaLabelId`.
[in,out]labels_lenreturns the length of the labels list `AranyaLabelId`.

◆ aranya_rand()

AranyaError aranya_rand ( const struct AranyaClient client,
uint8_t *  buf,
size_t  buf_len 
)
related

Return random bytes from Aranya's CSPRNG.

This method can be used to generate a PSK seed IKM for the QUIC syncer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[out]bufbuffer where random bytes are written to.
[in]buf_lenthe size of the buffer.

◆ aranya_rand_ext()

AranyaError aranya_rand_ext ( const struct AranyaClient client,
uint8_t *  buf,
size_t  buf_len,
struct AranyaExtError __ext_err 
)
related

Return random bytes from Aranya's CSPRNG.

This method can be used to generate a PSK seed IKM for the QUIC syncer.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[out]bufbuffer where random bytes are written to.
[in]buf_lenthe size of the buffer.

◆ aranya_remove_device_from_team()

AranyaError aranya_remove_device_from_team ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device 
)
related

Remove a device from the team.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.

◆ aranya_remove_device_from_team_ext()

AranyaError aranya_remove_device_from_team_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
struct AranyaExtError __ext_err 
)
related

Remove a device from the team.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.

◆ aranya_remove_sync_peer()

AranyaError aranya_remove_sync_peer ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  addr 
)
related

Remove the peer from automatic Aranya state syncing.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]addrthe peer's Aranya network address `AranyaAddr`.

◆ aranya_remove_sync_peer_ext()

AranyaError aranya_remove_sync_peer_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  addr,
struct AranyaExtError __ext_err 
)
related

Remove the peer from automatic Aranya state syncing.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]addrthe peer's Aranya network address `AranyaAddr`.

◆ aranya_remove_team()

AranyaError aranya_remove_team ( const struct AranyaClient client,
const struct AranyaTeamId team 
)
related

Remove a team from local device storage.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.

◆ aranya_remove_team_ext()

AranyaError aranya_remove_team_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaExtError __ext_err 
)
related

Remove a team from local device storage.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.

◆ aranya_revoke_label()

AranyaError aranya_revoke_label ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
const struct AranyaLabelId label_id 
)
related

Revoke a label from a device.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device ID `AranyaDeviceId` of the device to revoke the label from.
[in]label_idthe AQC channel label ID `AranyaLabelId`.

◆ aranya_revoke_label_ext()

AranyaError aranya_revoke_label_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
const struct AranyaLabelId label_id,
struct AranyaExtError __ext_err 
)
related

Revoke a label from a device.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device ID `AranyaDeviceId` of the device to revoke the label from.
[in]label_idthe AQC channel label ID `AranyaLabelId`.

◆ aranya_revoke_role()

AranyaError aranya_revoke_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
AranyaRole  role 
)
related

Revoke a role from a device.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[in]rolethe role `AranyaRole` to revoke from the device.

◆ aranya_revoke_role_ext()

AranyaError aranya_revoke_role_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
AranyaRole  role,
struct AranyaExtError __ext_err 
)
related

Revoke a role from a device.

Permission to perform this operation is checked against the Aranya policy.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]devicethe device's ID `AranyaDeviceId`.
[in]rolethe role `AranyaRole` to revoke from the device.

◆ aranya_sync_now()

AranyaError aranya_sync_now ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  addr,
const struct AranyaSyncPeerConfig config 
)
related

Sync with peer immediately.

If a peer is not reachable on the network, sync errors will appear in the tracing logs and Aranya will be unable to sync state with that peer.

This function ignores `aranya_sync_peer_config_builder_set_interval` and `aranya_sync_peer_config_builder_set_sync_later`, if set.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]addrthe peer's Aranya network address `AranyaAddr`.
[in]configconfiguration values for syncing with a peer.

Default values for a sync config will be used if config is NULL

◆ aranya_sync_now_ext()

AranyaError aranya_sync_now_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  addr,
const struct AranyaSyncPeerConfig config,
struct AranyaExtError __ext_err 
)
related

Sync with peer immediately.

If a peer is not reachable on the network, sync errors will appear in the tracing logs and Aranya will be unable to sync state with that peer.

This function ignores `aranya_sync_peer_config_builder_set_interval` and `aranya_sync_peer_config_builder_set_sync_later`, if set.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]addrthe peer's Aranya network address `AranyaAddr`.
[in]configconfiguration values for syncing with a peer.

Default values for a sync config will be used if config is NULL


The documentation for this struct was generated from the following file: