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_get_public_key_bundle (const struct AranyaClient *client, uint8_t *public_key_bundle, size_t *public_key_bundle_len)
 Gets the public key bundle for this device.
 
AranyaError aranya_get_public_key_bundle_ext (const struct AranyaClient *client, uint8_t *public_key_bundle, size_t *public_key_bundle_len, struct AranyaExtError *__ext_err)
 Gets the public key bundle for this device.
 
AranyaError aranya_get_key_bundle (const struct AranyaClient *client, uint8_t *public_key_bundle, size_t *public_key_bundle_len)
 Gets the public key bundle for this device.
 
AranyaError aranya_get_key_bundle_ext (const struct AranyaClient *client, uint8_t *public_key_bundle, size_t *public_key_bundle_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_setup_default_roles (struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaRole *roles_out, size_t *roles_len)
 Setup default roles on team.
 
AranyaError aranya_setup_default_roles_ext (struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaRole *roles_out, size_t *roles_len, struct AranyaExtError *__ext_err)
 Setup default roles on team.
 
AranyaError aranya_change_role (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaRoleId *old_role, const struct AranyaRoleId *new_role)
 Changes the role on a device.
 
AranyaError aranya_change_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaRoleId *old_role, const struct AranyaRoleId *new_role, struct AranyaExtError *__ext_err)
 Changes the role on a device.
 
AranyaError aranya_team_roles (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaRole *roles_out, size_t *roles_out_len)
 Returns all of the roles for this team.
 
AranyaError aranya_team_roles_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaRole *roles_out, size_t *roles_out_len, struct AranyaExtError *__ext_err)
 Returns all of the roles for this team.
 
AranyaError aranya_create_role (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaRoleName role_name, AranyaRank rank, struct AranyaRole *role_out)
 Create a role.
 
AranyaError aranya_create_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaRoleName role_name, AranyaRank rank, struct AranyaRole *role_out, struct AranyaExtError *__ext_err)
 Create a role.
 
AranyaError aranya_delete_role (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role)
 Delete a role.
 
AranyaError aranya_delete_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, struct AranyaExtError *__ext_err)
 Delete a role.
 
AranyaError aranya_query_role_perms (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, AranyaPermission *perms_out, size_t *perms_len)
 Query all permissions assigned to a role.
 
AranyaError aranya_query_role_perms_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, AranyaPermission *perms_out, size_t *perms_len, struct AranyaExtError *__ext_err)
 Query all permissions assigned to a role.
 
AranyaError aranya_assign_role (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaRoleId *role_id)
 Assign a role to a device.
 
AranyaError aranya_assign_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaRoleId *role_id, 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, const struct AranyaRoleId *role_id)
 Revoke a role from a device.
 
AranyaError aranya_revoke_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, const struct AranyaRoleId *role_id, struct AranyaExtError *__ext_err)
 Revoke a role from a device.
 
AranyaError aranya_create_label (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaLabelName name, AranyaRank rank, struct AranyaLabelId *__output)
 Create a channel label with an explicit rank.
 
AranyaError aranya_create_label_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaLabelName name, AranyaRank rank, struct AranyaLabelId *__output, struct AranyaExtError *__ext_err)
 Create a channel label with an explicit rank.
 
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_change_rank (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaObjectId *object_id, AranyaRank old_rank, AranyaRank new_rank)
 Change the rank of an object (device or label).
 
AranyaError aranya_change_rank_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaObjectId *object_id, AranyaRank old_rank, AranyaRank new_rank, struct AranyaExtError *__ext_err)
 Change the rank of an object (device or label).
 
AranyaError aranya_query_rank (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaObjectId *object_id, AranyaRank *__output)
 Query the rank of an object.
 
AranyaError aranya_query_rank_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaObjectId *object_id, AranyaRank *__output, struct AranyaExtError *__ext_err)
 Query the rank of an object.
 
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 *public_key_bundle, size_t public_key_bundle_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 *public_key_bundle, size_t public_key_bundle_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, const struct AranyaRoleId *role_id, AranyaRank rank)
 Add a device to the team with an explicit rank.
 
AranyaError aranya_add_device_to_team_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const uint8_t *keybundle, size_t keybundle_len, const struct AranyaRoleId *role_id, AranyaRank rank, struct AranyaExtError *__ext_err)
 Add a device to the team with an explicit rank.
 
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_team_devices (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaDeviceId *devices, size_t *devices_len)
 Query devices on team.
 
AranyaError aranya_team_devices_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_team_device_role (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, struct AranyaRole *role_out, bool *has_role)
 Returns the role assigned to the device, if any.
 
AranyaError aranya_team_device_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, struct AranyaRole *role_out, bool *has_role, struct AranyaExtError *__ext_err)
 Returns the role assigned to the device, if any.
 
AranyaError aranya_team_device_public_key_bundle (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, uint8_t *public_key_bundle, size_t *public_key_bundle_len)
 Query device's public key bundle.
 
AranyaError aranya_team_device_public_key_bundle_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, uint8_t *public_key_bundle, size_t *public_key_bundle_len, struct AranyaExtError *__ext_err)
 Query device's public key bundle.
 
AranyaError aranya_team_device_keybundle (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, uint8_t *public_key_bundle, size_t *public_key_bundle_len)
 Query device's public key bundle.
 
AranyaError aranya_team_device_keybundle_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaDeviceId *device, uint8_t *public_key_bundle, size_t *public_key_bundle_len, struct AranyaExtError *__ext_err)
 Query device's public key bundle.
 
AranyaError aranya_team_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_team_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_team_labels (const struct AranyaClient *client, const struct AranyaTeamId *team, struct AranyaLabelId *labels, size_t *labels_len)
 Query for list of existing labels.
 
AranyaError aranya_team_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_team_label (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label_id, struct AranyaLabel *label_out)
 Query a label.
 
AranyaError aranya_team_label_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label_id, struct AranyaLabel *label_out, struct AranyaExtError *__ext_err)
 Query a label.
 
AranyaError aranya_team_label_exists (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label, bool *__output)
 Query if a label exists.
 
AranyaError aranya_team_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.
 
AranyaError aranya_afc_create_channel (const struct AranyaClient *client, const struct AranyaTeamId *team_id, const struct AranyaDeviceId *peer_id, const struct AranyaLabelId *label_id, struct AranyaAfcSendChannel *channel, struct AranyaAfcCtrlMsg *control)
 Create a send-only AFC channel between this device and a peer.
 
AranyaError aranya_afc_create_channel_ext (const struct AranyaClient *client, const struct AranyaTeamId *team_id, const struct AranyaDeviceId *peer_id, const struct AranyaLabelId *label_id, struct AranyaAfcSendChannel *channel, struct AranyaAfcCtrlMsg *control, struct AranyaExtError *__ext_err)
 Create a send-only AFC channel between this device and a peer.
 
AranyaError aranya_afc_accept_channel (const struct AranyaClient *client, const struct AranyaTeamId *team_id, const uint8_t *control, size_t control_len, struct AranyaAfcReceiveChannel *channel)
 Accept a receive-only AFC channel from by a peer by processing a control message.
 
AranyaError aranya_afc_accept_channel_ext (const struct AranyaClient *client, const struct AranyaTeamId *team_id, const uint8_t *control, size_t control_len, struct AranyaAfcReceiveChannel *channel, struct AranyaExtError *__ext_err)
 Accept a receive-only AFC channel from by a peer by processing a control message.
 
AranyaError aranya_afc_send_channel_delete (const struct AranyaClient *client, struct AranyaAfcSendChannel *channel)
 Removes an `AranyaAfcSendChannel` from use.
 
AranyaError aranya_afc_send_channel_delete_ext (const struct AranyaClient *client, struct AranyaAfcSendChannel *channel, struct AranyaExtError *__ext_err)
 Removes an `AranyaAfcSendChannel` from use.
 
AranyaError aranya_afc_receive_channel_delete (const struct AranyaClient *client, struct AranyaAfcReceiveChannel *channel)
 Removes an `AranyaAfcReceiveChannel` from use.
 
AranyaError aranya_afc_receive_channel_delete_ext (const struct AranyaClient *client, struct AranyaAfcReceiveChannel *channel, struct AranyaExtError *__ext_err)
 Removes an `AranyaAfcReceiveChannel` from use.
 

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,
const struct AranyaRoleId role_id,
AranyaRank  rank 
)
related

Add a device to the team with an explicit rank.

Requires:

  • AddDevice permission
  • caller_rank >= rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]keybundleserialized keybundle byte buffer KeyBundle.
[in]keybundle_lenis the length of the serialized keybundle.
[in]role_id(optional) the ID of the role to assign to the device.
[in]rankthe rank to assign to the device.

◆ 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,
const struct AranyaRoleId role_id,
AranyaRank  rank,
struct AranyaExtError __ext_err 
)
related

Add a device to the team with an explicit rank.

Requires:

  • AddDevice permission
  • caller_rank >= rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]keybundleserialized keybundle byte buffer KeyBundle.
[in]keybundle_lenis the length of the serialized keybundle.
[in]role_id(optional) the ID of the role to assign to the device.
[in]rankthe rank to assign to the device.

◆ 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
[in]teamthe team's ID
[in]addrthe peer's Aranya network address
[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
[in]teamthe team's ID
[in]addrthe peer's Aranya network address
[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
[in]cfgthe Team Configuration

◆ 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
[in]cfgthe Team Configuration

◆ aranya_afc_accept_channel()

AranyaError aranya_afc_accept_channel ( const struct AranyaClient client,
const struct AranyaTeamId team_id,
const uint8_t *  control,
size_t  control_len,
struct AranyaAfcReceiveChannel channel 
)
related

Accept a receive-only AFC channel from by a peer by processing a control message.

Parameters
[in]clientthe Aranya Client
[in]team_idthe team's identifier
[in]controlthe AFC control message.
[out]channelthe AFC channel object
[out]__outputthe corresponding AFC channel type

◆ aranya_afc_accept_channel_ext()

AranyaError aranya_afc_accept_channel_ext ( const struct AranyaClient client,
const struct AranyaTeamId team_id,
const uint8_t *  control,
size_t  control_len,
struct AranyaAfcReceiveChannel channel,
struct AranyaExtError __ext_err 
)
related

Accept a receive-only AFC channel from by a peer by processing a control message.

Parameters
[in]clientthe Aranya Client
[in]team_idthe team's identifier
[in]controlthe AFC control message.
[out]channelthe AFC channel object
[out]__outputthe corresponding AFC channel type

◆ aranya_afc_create_channel()

AranyaError aranya_afc_create_channel ( const struct AranyaClient client,
const struct AranyaTeamId team_id,
const struct AranyaDeviceId peer_id,
const struct AranyaLabelId label_id,
struct AranyaAfcSendChannel channel,
struct AranyaAfcCtrlMsg control 
)
related

Create a send-only AFC channel between this device and a peer.

Note that the control message needs to be sent to the other peer using the transport of your choice to create the other side of the channel.

Requires:

  • Both devices must have the CanUseAfc permission
  • Both devices must have appropriate channel operations (SendOnly, RecvOnly, or SendRecv) assigned for the label
Parameters
[in]clientthe Aranya Client
[in]team_idthe team's identifier
[in]peer_idthe peer's identifier
[in]label_idthe label identifier to create the channel with.
[out]channelthe AFC channel object
[out]controlthe AFC control message

◆ aranya_afc_create_channel_ext()

AranyaError aranya_afc_create_channel_ext ( const struct AranyaClient client,
const struct AranyaTeamId team_id,
const struct AranyaDeviceId peer_id,
const struct AranyaLabelId label_id,
struct AranyaAfcSendChannel channel,
struct AranyaAfcCtrlMsg control,
struct AranyaExtError __ext_err 
)
related

Create a send-only AFC channel between this device and a peer.

Note that the control message needs to be sent to the other peer using the transport of your choice to create the other side of the channel.

Requires:

  • Both devices must have the CanUseAfc permission
  • Both devices must have appropriate channel operations (SendOnly, RecvOnly, or SendRecv) assigned for the label
Parameters
[in]clientthe Aranya Client
[in]team_idthe team's identifier
[in]peer_idthe peer's identifier
[in]label_idthe label identifier to create the channel with.
[out]channelthe AFC channel object
[out]controlthe AFC control message

◆ aranya_afc_receive_channel_delete()

AranyaError aranya_afc_receive_channel_delete ( const struct AranyaClient client,
struct AranyaAfcReceiveChannel channel 
)
related

Removes an `AranyaAfcReceiveChannel` from use.

Note that this function takes ownership of the `AranyaAfcReceiveChannel` and invalidates any further use (i.e. calling seal).

Parameters
[in]clientthe Aranya Client
[in]channelthe AFC channel object

◆ aranya_afc_receive_channel_delete_ext()

AranyaError aranya_afc_receive_channel_delete_ext ( const struct AranyaClient client,
struct AranyaAfcReceiveChannel channel,
struct AranyaExtError __ext_err 
)
related

Removes an `AranyaAfcReceiveChannel` from use.

Note that this function takes ownership of the `AranyaAfcReceiveChannel` and invalidates any further use (i.e. calling seal).

Parameters
[in]clientthe Aranya Client
[in]channelthe AFC channel object

◆ aranya_afc_send_channel_delete()

AranyaError aranya_afc_send_channel_delete ( const struct AranyaClient client,
struct AranyaAfcSendChannel channel 
)
related

Removes an `AranyaAfcSendChannel` from use.

Note that this function takes ownership of the `AranyaAfcSendChannel` and invalidates any further use (i.e. calling seal).

Parameters
[in]clientthe Aranya Client
[in]channelthe AFC channel object

◆ aranya_afc_send_channel_delete_ext()

AranyaError aranya_afc_send_channel_delete_ext ( const struct AranyaClient client,
struct AranyaAfcSendChannel channel,
struct AranyaExtError __ext_err 
)
related

Removes an `AranyaAfcSendChannel` from use.

Note that this function takes ownership of the `AranyaAfcSendChannel` and invalidates any further use (i.e. calling seal).

Parameters
[in]clientthe Aranya Client
[in]channelthe AFC channel object

◆ 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.

Requires:

  • AssignLabel permission
  • caller_rank > device_rank and caller_rank > label_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device ID of the device to assign the label to.
[in]label_idthe channel label ID

◆ 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.

Requires:

  • AssignLabel permission
  • caller_rank > device_rank and caller_rank > label_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device ID of the device to assign the label to.
[in]label_idthe channel label ID

◆ aranya_assign_role()

AranyaError aranya_assign_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
const struct AranyaRoleId role_id 
)
related

Assign a role to a device.

Requires:

  • AssignRole permission
  • caller_rank > device_rank and caller_rank > role_rank

It is an error if the device has already been assigned a role. If you want to assign a different role to a device that already has a role, use change_role() instead.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[in]role_idthe ID of the role 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,
const struct AranyaRoleId role_id,
struct AranyaExtError __ext_err 
)
related

Assign a role to a device.

Requires:

  • AssignRole permission
  • caller_rank > device_rank and caller_rank > role_rank

It is an error if the device has already been assigned a role. If you want to assign a different role to a device that already has a role, use change_role() instead.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[in]role_idthe ID of the role to assign to the device

◆ aranya_change_rank()

AranyaError aranya_change_rank ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaObjectId object_id,
AranyaRank  old_rank,
AranyaRank  new_rank 
)
related

Change the rank of an object (device or label).

The caller must provide the current rank of the object (old_rank) to guard against concurrent changes by other devices. If another device changes the rank before this command is applied, the operation will fail rather than silently overwriting the new value. This preserves the caller's intent to only change the rank under expected conditions.

Requires:

  • ChangeRank permission
  • caller_rank > object_rank (unless changing own rank)
  • caller_rank >= new_rank

Note: Role ranks cannot be changed after creation. This maintains the invariant that role_rank >= device_rank for all devices assigned to the role. To effectively change a role's rank, create a new role with matching permissions at the desired rank, assign the new role to the devices that had the old role, then delete the old role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]object_idthe ID of the object to change the rank of
[in]old_rankthe current rank of the object
[in]new_rankthe new rank to assign to the object

◆ aranya_change_rank_ext()

AranyaError aranya_change_rank_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaObjectId object_id,
AranyaRank  old_rank,
AranyaRank  new_rank,
struct AranyaExtError __ext_err 
)
related

Change the rank of an object (device or label).

The caller must provide the current rank of the object (old_rank) to guard against concurrent changes by other devices. If another device changes the rank before this command is applied, the operation will fail rather than silently overwriting the new value. This preserves the caller's intent to only change the rank under expected conditions.

Requires:

  • ChangeRank permission
  • caller_rank > object_rank (unless changing own rank)
  • caller_rank >= new_rank

Note: Role ranks cannot be changed after creation. This maintains the invariant that role_rank >= device_rank for all devices assigned to the role. To effectively change a role's rank, create a new role with matching permissions at the desired rank, assign the new role to the devices that had the old role, then delete the old role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]object_idthe ID of the object to change the rank of
[in]old_rankthe current rank of the object
[in]new_rankthe new rank to assign to the object

◆ aranya_change_role()

AranyaError aranya_change_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
const struct AranyaRoleId old_role,
const struct AranyaRoleId new_role 
)
related

Changes the role on a device.

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

Requires:

  • RevokeRole permission (for old_role)
  • AssignRole permission (for new_role)
  • caller_rank > device_rank, caller_rank > old_role_rank, and caller_rank > new_role_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[in]old_rolethe ID of the role currently assigned to the device
[in]new_rolethe ID of the role to assign to the device

◆ aranya_change_role_ext()

AranyaError aranya_change_role_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
const struct AranyaRoleId old_role,
const struct AranyaRoleId new_role,
struct AranyaExtError __ext_err 
)
related

Changes the role on a device.

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

Requires:

  • RevokeRole permission (for old_role)
  • AssignRole permission (for new_role)
  • caller_rank > device_rank, caller_rank > old_role_rank, and caller_rank > new_role_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[in]old_rolethe ID of the role currently assigned to the device
[in]new_rolethe ID of the role 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_init()

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

Initializes a new client instance.

Parameters
[out]clientthe uninitialized Aranya Client
[in]configthe client's configuration

◆ 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
[in]configthe client's configuration

◆ 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
[in]teamthe team's ID

◆ 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
[in]teamthe team's ID

◆ aranya_create_label()

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

Create a channel label with an explicit rank.

Requires:

  • CreateLabel permission
  • caller_rank >= rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]namelabel name string
[in]rankthe rank to assign to the label

◆ aranya_create_label_ext()

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

Create a channel label with an explicit rank.

Requires:

  • CreateLabel permission
  • caller_rank >= rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]namelabel name string
[in]rankthe rank to assign to the label

◆ aranya_create_role()

AranyaError aranya_create_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaRoleName  role_name,
AranyaRank  rank,
struct AranyaRole role_out 
)
related

Create a role.

Requires:

  • CreateRole permission
  • caller_rank >= rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]role_namethe name of the new role
[in]rankthe rank to assign to the new role
[out]role_outthe newly created role

◆ aranya_create_role_ext()

AranyaError aranya_create_role_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaRoleName  role_name,
AranyaRank  rank,
struct AranyaRole role_out,
struct AranyaExtError __ext_err 
)
related

Create a role.

Requires:

  • CreateRole permission
  • caller_rank >= rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]role_namethe name of the new role
[in]rankthe rank to assign to the new role
[out]role_outthe newly created role

◆ 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
[in]cfgthe Team Configuration
[out]__outputthe team's ID

◆ 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
[in]cfgthe Team Configuration
[out]__outputthe team's ID

◆ 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.

Requires:

  • DeleteLabel permission
  • caller_rank > label_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]label_idthe channel label ID 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.

Requires:

  • DeleteLabel permission
  • caller_rank > label_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]label_idthe channel label ID to delete.

◆ aranya_delete_role()

AranyaError aranya_delete_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaRoleId role 
)
related

Delete a role.

The role must not be assigned to any devices.

Requires:

  • DeleteRole permission
  • caller_rank > role_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe ID of the role to delete

◆ aranya_delete_role_ext()

AranyaError aranya_delete_role_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaRoleId role,
struct AranyaExtError __ext_err 
)
related

Delete a role.

The role must not be assigned to any devices.

Requires:

  • DeleteRole permission
  • caller_rank > role_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe ID of the role 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 *  public_key_bundle,
size_t  public_key_bundle_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
[in]team_idthe team's ID
[in]public_key_bundleserialized key bundle bytes
[in]public_key_bundle_lenthe length of the key bundle
[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 *  public_key_bundle,
size_t  public_key_bundle_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
[in]team_idthe team's ID
[in]public_key_bundleserialized key bundle bytes
[in]public_key_bundle_lenthe length of the key bundle
[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
[out]__outputthe client's device ID

◆ 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
[out]__outputthe client's device ID

◆ aranya_get_key_bundle()

AranyaError aranya_get_key_bundle ( const struct AranyaClient client,
uint8_t *  public_key_bundle,
size_t *  public_key_bundle_len 
)
related

Gets the public key bundle for this device.

Renamed to `aranya_get_public_key_bundle`.

Parameters
[in]clientthe Aranya Client
[out]public_key_bundlekey bundle byte buffer
[in,out]public_key_bundle_lenreturns the length of the serialized key bundle.

◆ aranya_get_key_bundle_ext()

AranyaError aranya_get_key_bundle_ext ( const struct AranyaClient client,
uint8_t *  public_key_bundle,
size_t *  public_key_bundle_len,
struct AranyaExtError __ext_err 
)
related

Gets the public key bundle for this device.

Renamed to `aranya_get_public_key_bundle`.

Parameters
[in]clientthe Aranya Client
[out]public_key_bundlekey bundle byte buffer
[in,out]public_key_bundle_lenreturns the length of the serialized key bundle.

◆ aranya_get_public_key_bundle()

AranyaError aranya_get_public_key_bundle ( const struct AranyaClient client,
uint8_t *  public_key_bundle,
size_t *  public_key_bundle_len 
)
related

Gets the public key bundle for this device.

Parameters
[in]clientthe Aranya Client
[out]public_key_bundlekey bundle byte buffer
[in,out]public_key_bundle_lenreturns the length of the serialized key bundle.

◆ aranya_get_public_key_bundle_ext()

AranyaError aranya_get_public_key_bundle_ext ( const struct AranyaClient client,
uint8_t *  public_key_bundle,
size_t *  public_key_bundle_len,
struct AranyaExtError __ext_err 
)
related

Gets the public key bundle for this device.

Parameters
[in]clientthe Aranya Client
[out]public_key_bundlekey bundle byte buffer
[in,out]public_key_bundle_lenreturns the length of the serialized key bundle.

◆ aranya_query_rank()

AranyaError aranya_query_rank ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaObjectId object_id,
AranyaRank __output 
)
related

Query the rank of an object.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]object_idthe ID of the object to query
[out]__outputthe rank of the object

◆ aranya_query_rank_ext()

AranyaError aranya_query_rank_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaObjectId object_id,
AranyaRank __output,
struct AranyaExtError __ext_err 
)
related

Query the rank of an object.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]object_idthe ID of the object to query
[out]__outputthe rank of the object

◆ aranya_query_role_perms()

AranyaError aranya_query_role_perms ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaRoleId role,
AranyaPermission perms_out,
size_t *  perms_len 
)
related

Query all permissions assigned to a role.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe role ID to query permissions for
[out]perms_outreturns a list of permissions assigned to the role
[in,out]perms_lenthe number of permissions written to the buffer

◆ aranya_query_role_perms_ext()

AranyaError aranya_query_role_perms_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaRoleId role,
AranyaPermission perms_out,
size_t *  perms_len,
struct AranyaExtError __ext_err 
)
related

Query all permissions assigned to a role.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe role ID to query permissions for
[out]perms_outreturns a list of permissions assigned to the role
[in,out]perms_lenthe number of permissions written to the buffer

◆ 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
[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
[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.

A device can always remove itself. Removing another device requires:

  • RemoveDevice permission
  • caller_rank > device_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID

◆ 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.

A device can always remove itself. Removing another device requires:

  • RemoveDevice permission
  • caller_rank > device_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID

◆ 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
[in]teamthe team's ID
[in]addrthe peer's Aranya network address

◆ 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
[in]teamthe team's ID
[in]addrthe peer's Aranya network address

◆ 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
[in]teamthe team's ID

◆ 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
[in]teamthe team's ID

◆ 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.

Requires:

  • RevokeLabel permission
  • caller_rank > device_rank and caller_rank > label_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device ID of the device to revoke the label from.
[in]label_idthe channel label ID

◆ 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.

Requires:

  • RevokeLabel permission
  • caller_rank > device_rank and caller_rank > label_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device ID of the device to revoke the label from.
[in]label_idthe channel label ID

◆ aranya_revoke_role()

AranyaError aranya_revoke_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
const struct AranyaRoleId role_id 
)
related

Revoke a role from a device.

Requires:

  • RevokeRole permission
  • caller_rank > device_rank and caller_rank > role_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[in]role_idthe ID of the role 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,
const struct AranyaRoleId role_id,
struct AranyaExtError __ext_err 
)
related

Revoke a role from a device.

Requires:

  • RevokeRole permission
  • caller_rank > device_rank and caller_rank > role_rank
Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[in]role_idthe ID of the role to revoke from the device.

◆ aranya_setup_default_roles()

AranyaError aranya_setup_default_roles ( struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaRole roles_out,
size_t *  roles_len 
)
related

Setup default roles on team.

This sets up the following roles with default permissions as defined in Aranya's default policy:

  • admin
  • operator
  • member

The owner role is created automatically when the team is created, so it is not included here.

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

N.B. this function is meant to be called once to set up the default roles. Subsequent calls will result in an error if the default roles were already created.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[out]roles_outreturns a list of the created default roles
[in,out]roles_lenthe number of roles written to the buffer.

◆ aranya_setup_default_roles_ext()

AranyaError aranya_setup_default_roles_ext ( struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaRole roles_out,
size_t *  roles_len,
struct AranyaExtError __ext_err 
)
related

Setup default roles on team.

This sets up the following roles with default permissions as defined in Aranya's default policy:

  • admin
  • operator
  • member

The owner role is created automatically when the team is created, so it is not included here.

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

N.B. this function is meant to be called once to set up the default roles. Subsequent calls will result in an error if the default roles were already created.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[out]roles_outreturns a list of the created default roles
[in,out]roles_lenthe number of roles written to the buffer.

◆ 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
[in]teamthe team's ID
[in]addrthe peer's Aranya network address
[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
[in]teamthe team's ID
[in]addrthe peer's Aranya network address
[in]configconfiguration values for syncing with a peer.

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

◆ aranya_team_device_keybundle()

AranyaError aranya_team_device_keybundle ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
uint8_t *  public_key_bundle,
size_t *  public_key_bundle_len 
)
related

Query device's public key bundle.

Renamed to `aranya_team_device_public_key_bundle`.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[out]public_key_bundlekey bundle byte buffer
[in,out]public_key_bundle_lenreturns the length of the serialized public key bundle.

◆ aranya_team_device_keybundle_ext()

AranyaError aranya_team_device_keybundle_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
uint8_t *  public_key_bundle,
size_t *  public_key_bundle_len,
struct AranyaExtError __ext_err 
)
related

Query device's public key bundle.

Renamed to `aranya_team_device_public_key_bundle`.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[out]public_key_bundlekey bundle byte buffer
[in,out]public_key_bundle_lenreturns the length of the serialized public key bundle.

◆ aranya_team_device_label_assignments()

AranyaError aranya_team_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
[in]teamthe team's ID
[in]devicethe device's ID
[out]labelsreturns a list of labels assigned to the device
[in,out]labels_lenreturns the length of the labels list

◆ aranya_team_device_label_assignments_ext()

AranyaError aranya_team_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
[in]teamthe team's ID
[in]devicethe device's ID
[out]labelsreturns a list of labels assigned to the device
[in,out]labels_lenreturns the length of the labels list

◆ aranya_team_device_public_key_bundle()

AranyaError aranya_team_device_public_key_bundle ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
uint8_t *  public_key_bundle,
size_t *  public_key_bundle_len 
)
related

Query device's public key bundle.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[out]public_key_bundlekey bundle byte buffer
[in,out]public_key_bundle_lenreturns the length of the serialized public key bundle.

◆ aranya_team_device_public_key_bundle_ext()

AranyaError aranya_team_device_public_key_bundle_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
uint8_t *  public_key_bundle,
size_t *  public_key_bundle_len,
struct AranyaExtError __ext_err 
)
related

Query device's public key bundle.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID
[out]public_key_bundlekey bundle byte buffer
[in,out]public_key_bundle_lenreturns the length of the serialized public key bundle.

◆ aranya_team_device_role()

AranyaError aranya_team_device_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
struct AranyaRole role_out,
bool *  has_role 
)
related

Returns the role assigned to the device, if any.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[out]devicethe ID of the device
[out]role_outthe role assigned to the device. role_out will be zeroed if a role was not assigned to the device
[out]has_rolewhether a role is assigned to the device

◆ aranya_team_device_role_ext()

AranyaError aranya_team_device_role_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaDeviceId device,
struct AranyaRole role_out,
bool *  has_role,
struct AranyaExtError __ext_err 
)
related

Returns the role assigned to the device, if any.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[out]devicethe ID of the device
[out]role_outthe role assigned to the device. role_out will be zeroed if a role was not assigned to the device
[out]has_rolewhether a role is assigned to the device

◆ aranya_team_devices()

AranyaError aranya_team_devices ( 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
[in]teamthe team's ID
[out]devicesreturns a list of device IDs on the team
[in,out]devices_lenreturns the length of the devices list

◆ aranya_team_devices_ext()

AranyaError aranya_team_devices_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
[in]teamthe team's ID
[out]devicesreturns a list of device IDs on the team
[in,out]devices_lenreturns the length of the devices list

◆ aranya_team_label()

AranyaError aranya_team_label ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaLabelId label_id,
struct AranyaLabel label_out 
)
related

Query a label.

Returns the label metadata for the given label ID. Returns an error if the label does not exist.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]label_idthe label ID to query
[out]label_outreturns the label

◆ aranya_team_label_exists()

AranyaError aranya_team_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
[in]teamthe team's ID
[in]labelthe label
[out]__outputboolean indicating whether the label exists.

◆ aranya_team_label_exists_ext()

AranyaError aranya_team_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
[in]teamthe team's ID
[in]labelthe label
[out]__outputboolean indicating whether the label exists.

◆ aranya_team_label_ext()

AranyaError aranya_team_label_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaLabelId label_id,
struct AranyaLabel label_out,
struct AranyaExtError __ext_err 
)
related

Query a label.

Returns the label metadata for the given label ID. Returns an error if the label does not exist.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]label_idthe label ID to query
[out]label_outreturns the label

◆ aranya_team_labels()

AranyaError aranya_team_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
[in]teamthe team's ID
[out]labelsreturns a list of labels
[in,out]labels_lenreturns the length of the labels list

◆ aranya_team_labels_ext()

AranyaError aranya_team_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
[in]teamthe team's ID
[out]labelsreturns a list of labels
[in,out]labels_lenreturns the length of the labels list

◆ aranya_team_roles()

AranyaError aranya_team_roles ( const struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaRole roles_out,
size_t *  roles_out_len 
)
related

Returns all of the roles for this team.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[out]roles_outreturns a list of roles on the team
[in,out]roles_lenthe number of roles written to the buffer.

◆ aranya_team_roles_ext()

AranyaError aranya_team_roles_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
struct AranyaRole roles_out,
size_t *  roles_out_len,
struct AranyaExtError __ext_err 
)
related

Returns all of the roles for this team.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[out]roles_outreturns a list of roles on the team
[in,out]roles_lenthe number of roles written to the buffer.

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