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_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_setup_default_roles (struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *owning_role, struct AranyaRole *roles_out, size_t *roles_len)
 Assign a role to a device.
 
AranyaError aranya_setup_default_roles_ext (struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *owning_role, struct AranyaRole *roles_out, size_t *roles_len, struct AranyaExtError *__ext_err)
 Assign a role to a device.
 
AranyaError aranya_add_role_owner (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, const struct AranyaRoleId *owning_role)
 Adds owning_role as an owner of role.
 
AranyaError aranya_add_role_owner_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, const struct AranyaRoleId *owning_role, struct AranyaExtError *__ext_err)
 Adds owning_role as an owner of role.
 
AranyaError aranya_remove_role_owner (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, const struct AranyaRoleId *owning_role)
 Removes an owning_role as an owner of role.
 
AranyaError aranya_remove_role_owner_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, const struct AranyaRoleId *owning_role, struct AranyaExtError *__ext_err)
 Removes an owning_role as an owner of role.
 
AranyaError aranya_role_owners (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, struct AranyaRole *roles_out, size_t *roles_len)
 Returns the roles that own role.
 
AranyaError aranya_role_owners_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, struct AranyaRole *roles_out, size_t *roles_len, struct AranyaExtError *__ext_err)
 Returns the roles that own role.
 
AranyaError aranya_assign_role_management_permission (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, const struct AranyaRoleId *managing_role, AranyaRoleManagementPermission perm)
 Assigns a role management permission to a managing role.
 
AranyaError aranya_assign_role_management_permission_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, const struct AranyaRoleId *managing_role, AranyaRoleManagementPermission perm, struct AranyaExtError *__ext_err)
 Assigns a role management permission to a managing role.
 
AranyaError aranya_revoke_role_management_permission (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, const struct AranyaRoleId *managing_role, AranyaRoleManagementPermission perm)
 Revokes a role management permission from a managing role.
 
AranyaError aranya_revoke_role_management_permission_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaRoleId *role, const struct AranyaRoleId *managing_role, AranyaRoleManagementPermission perm, struct AranyaExtError *__ext_err)
 Revokes a role management permission from a managing 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)
 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, const struct AranyaRoleId *owning_role, struct AranyaRole *role_out)
 Create a role.
 
AranyaError aranya_create_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaRoleName role_name, const struct AranyaRoleId *owning_role, 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_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, const struct AranyaRoleId *managing_role_id, struct AranyaLabelId *__output)
 Create a channel label.
 
AranyaError aranya_create_label_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaLabelName name, const struct AranyaRoleId *managing_role_id, 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_add_label_managing_role (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label_id, const struct AranyaRoleId *managing_role_id)
 Add label managing role.
 
AranyaError aranya_add_label_managing_role_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, const struct AranyaLabelId *label_id, const struct AranyaRoleId *managing_role_id, struct AranyaExtError *__ext_err)
 Add label managing role.
 
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, const struct AranyaRoleId *role_id)
 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, const struct AranyaRoleId *role_id, 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_hello_subscribe (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr peer, AranyaDuration graph_change_delay, AranyaDuration duration, AranyaDuration schedule_delay)
 Subscribe to hello notifications from a sync peer.
 
AranyaError aranya_sync_hello_subscribe_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr peer, AranyaDuration graph_change_delay, AranyaDuration duration, AranyaDuration schedule_delay, struct AranyaExtError *__ext_err)
 Subscribe to hello notifications from a sync peer.
 
AranyaError aranya_sync_hello_unsubscribe (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr peer)
 Unsubscribe from hello notifications from a sync peer.
 
AranyaError aranya_sync_hello_unsubscribe_ext (const struct AranyaClient *client, const struct AranyaTeamId *team, AranyaAddr peer, struct AranyaExtError *__ext_err)
 Unsubscribe from hello notifications from a sync peer.
 
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_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_team_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_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_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 
)
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
[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.

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

◆ aranya_add_label_managing_role()

AranyaError aranya_add_label_managing_role ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaLabelId label_id,
const struct AranyaRoleId managing_role_id 
)
related

Add label managing role.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]label_idthe label ID
[in]managing_role_idthe ID of the managing role

◆ aranya_add_label_managing_role_ext()

AranyaError aranya_add_label_managing_role_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaLabelId label_id,
const struct AranyaRoleId managing_role_id,
struct AranyaExtError __ext_err 
)
related

Add label managing role.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]label_idthe label ID
[in]managing_role_idthe ID of the managing role

◆ aranya_add_role_owner()

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

Adds owning_role as an owner of role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]roleID of the subject role
[in]owning_roleID of the owning role

◆ aranya_add_role_owner_ext()

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

Adds owning_role as an owner of role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]roleID of the subject role
[in]owning_roleID of the owning role

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

Permission to perform this operation is checked against the Aranya policy. Both the current node and its peer should have permission to use the label and have appropriate channel permissions.

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.

Permission to perform this operation is checked against the Aranya policy. Both the current node and its peer should have permission to use the label and have appropriate channel permissions.

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.

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

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.

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

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.

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

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

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.

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

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

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_management_permission()

AranyaError aranya_assign_role_management_permission ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaRoleId role,
const struct AranyaRoleId managing_role,
AranyaRoleManagementPermission  perm 
)
related

Assigns a role management permission to a managing role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe ID of the subject role
[in]managing_rolethe ID of the managing role
[in]permthe management permission to assign

◆ aranya_assign_role_management_permission_ext()

AranyaError aranya_assign_role_management_permission_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaRoleId role,
const struct AranyaRoleId managing_role,
AranyaRoleManagementPermission  perm,
struct AranyaExtError __ext_err 
)
related

Assigns a role management permission to a managing role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe ID of the subject role
[in]managing_rolethe ID of the managing role
[in]permthe management permission to assign

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

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

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.

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

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,
const struct AranyaRoleId managing_role_id,
struct AranyaLabelId __output 
)
related

Create a channel label.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]namelabel name string
[in]managing_role_idthe ID of the role that manages this label

◆ aranya_create_label_ext()

AranyaError aranya_create_label_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaLabelName  name,
const struct AranyaRoleId managing_role_id,
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
[in]teamthe team's ID
[in]namelabel name string
[in]managing_role_idthe ID of the role that manages this label

◆ aranya_create_role()

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

Create a role.

The owning_role is the initial owner of the new role.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]role_namethe name of the new role
[in]owning_rolethe role ID of the role that will own 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,
const struct AranyaRoleId owning_role,
struct AranyaRole role_out,
struct AranyaExtError __ext_err 
)
related

Create a role.

The owning_role is the initial owner of the new role.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]role_namethe name of the new role
[in]owning_rolethe role ID of the role that will own 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.

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

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.

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

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, nor should it own any other roles.

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

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, nor should it own any other roles.

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

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 *  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
[in]team_idthe team's ID
[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
[in]team_idthe team's ID
[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
[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 *  keybundle,
size_t *  keybundle_len 
)
related

Gets the public key bundle for this device.

Parameters
[in]clientthe Aranya Client
[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
[out]keybundlekeybundle byte buffer KeyBundle.
[in,out]keybundle_lenreturns the length of the serialized keybundle.

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

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

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.

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

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]devicethe device's ID

◆ aranya_remove_role_owner()

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

Removes an owning_role as an owner of role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe ID of the subject role
[in]owning_roleID of the owning role

◆ aranya_remove_role_owner_ext()

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

Removes an owning_role as an owner of role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe ID of the subject role
[in]owning_roleID of the owning role

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

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

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.

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

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.

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

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.

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

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_management_permission()

AranyaError aranya_revoke_role_management_permission ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaRoleId role,
const struct AranyaRoleId managing_role,
AranyaRoleManagementPermission  perm 
)
related

Revokes a role management permission from a managing role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe ID of the subject role
[in]managing_rolethe ID of the managing role
[in]permthe management permission to assign

◆ aranya_revoke_role_management_permission_ext()

AranyaError aranya_revoke_role_management_permission_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
const struct AranyaRoleId role,
const struct AranyaRoleId managing_role,
AranyaRoleManagementPermission  perm,
struct AranyaExtError __ext_err 
)
related

Revokes a role management permission from a managing role.

Parameters
[in]clientthe Aranya Client
[in]teamthe team's ID
[in]rolethe ID of the subject role
[in]managing_rolethe ID of the managing role
[in]permthe management permission to assign

◆ aranya_role_owners()

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

Returns the roles that own role.

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
[in]rolethe ID of the subject role
[in]roles_outreturns a list of roles that own role
[in,out]roles_lenthe number of roles written to the buffer.

◆ aranya_role_owners_ext()

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

Returns the roles that own role.

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
[in]rolethe ID of the subject role
[in]roles_outreturns a list of roles that own role
[in,out]roles_lenthe number of roles written to the buffer.

◆ aranya_setup_default_roles()

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

Assign a role to a device.

Setup default roles on team.

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

  • admin
  • operator
  • member

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.

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
[in]owning_rolethe ID of the owning role
[in]roles_outreturns a list of roles that own role
[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,
const struct AranyaRoleId owning_role,
struct AranyaRole roles_out,
size_t *  roles_len,
struct AranyaExtError __ext_err 
)
related

Assign a role to a device.

Setup default roles on team.

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

  • admin
  • operator
  • member

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.

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
[in]owning_rolethe ID of the owning role
[in]roles_outreturns a list of roles that own role
[in,out]roles_lenthe number of roles written to the buffer.

◆ aranya_sync_hello_subscribe()

AranyaError aranya_sync_hello_subscribe ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  peer,
AranyaDuration  graph_change_delay,
AranyaDuration  duration,
AranyaDuration  schedule_delay 
)
related

Subscribe to hello notifications from a sync peer.

This will request the peer to send hello notifications when their graph head changes.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]peerthe peer's Aranya network address `AranyaAddr`.
[in]graph_change_delayminimum delay between notifications when graph changes.
[in]durationhow long the subscription should remain active.
[in]schedule_delayinterval for periodic scheduled hello sends.

◆ aranya_sync_hello_subscribe_ext()

AranyaError aranya_sync_hello_subscribe_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  peer,
AranyaDuration  graph_change_delay,
AranyaDuration  duration,
AranyaDuration  schedule_delay,
struct AranyaExtError __ext_err 
)
related

Subscribe to hello notifications from a sync peer.

This will request the peer to send hello notifications when their graph head changes.

Parameters
[in]clientthe Aranya Client `AranyaClient`.
[in]teamthe team's ID `AranyaTeamId`.
[in]peerthe peer's Aranya network address `AranyaAddr`.
[in]graph_change_delayminimum delay between notifications when graph changes.
[in]durationhow long the subscription should remain active.
[in]schedule_delayinterval for periodic scheduled hello sends.

◆ aranya_sync_hello_unsubscribe()

AranyaError aranya_sync_hello_unsubscribe ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  peer 
)
related

Unsubscribe from hello notifications from a sync peer.

This will stop receiving hello notifications from the specified peer.

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

◆ aranya_sync_hello_unsubscribe_ext()

AranyaError aranya_sync_hello_unsubscribe_ext ( const struct AranyaClient client,
const struct AranyaTeamId team,
AranyaAddr  peer,
struct AranyaExtError __ext_err 
)
related

Unsubscribe from hello notifications from a sync peer.

This will stop receiving hello notifications from the specified peer.

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

◆ 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 *  keybundle,
size_t *  keybundle_len 
)
related

Query device's keybundle.

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

◆ 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 *  keybundle,
size_t *  keybundle_len,
struct AranyaExtError __ext_err 
)
related

Query device's keybundle.

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

◆ 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_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_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]devicethe device'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]devicethe device's ID
[in]labelthe label
[out]__outputboolean indicating whether the label exists.

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