Expand description
Convenience import for building applications
Re-exports§
pub use crate::backend_kv_store::BackendHandler;pub use crate::prefabs::client::peer_connection::PeerConnectionSetupAggregator;pub use crate::prefabs::client::PrefabFunctions;pub use crate::prefabs::client::DefaultServerConnectionSettingsBuilder;pub use crate::prefabs::client::ServerConnectionSettings;pub use crate::prefabs::ClientServerRemote;pub use crate::remote_ext::remote_specialization::PeerRemote;pub use crate::responses;pub use crate::sign_in::SignInManagementExt;pub use crate::remote_ext::*;
Structs§
- Abandon
Session - Ends the C2S session
session_cidlocally, without waiting for the server’s ack (seeproto::session_abandon). Answered with aNodeResult::Disconnectunder the request’s ticket once the session has dropped. - Account
Manager - The default manager for handling the list of users stored locally. It also allows for user creation, and is used especially for when creating a new user via the registration service.
- Active
Sessions - Admission
Challenge - The check a refusal asks the client to complete before it tries again.
- Argon
Default Server Settings - CNAC
Metadata - For passing metadata from a cnac
- Callback
Receiver - A receiver for the tracked callback channel.
- Citadel
Node - Command
Path - A position in a command hierarchy: ordered segments from the root (e.g.
/HQ/Bn1/Co-A/Plt-2). An empty path is the root authority.is_ancestor_ofis the “superior reads subordinate” predicate. - Connect
Fail - Connect
Success - Connect
ToHypernode - Connection
Info - Crypto
Parameters - DeRegistration
- Delete
Object - Deregister
From Hypernode - Disconnect
- Disconnect
From Hypernode - Encryption
Algorithm Iter - An iterator over the variants of EncryptionAlgorithm
- Explicit
Panic Future - Ensures that if a panic occurs in a task, the panic backtrace prints and halts the program
- FcmKeys
- Group
Broadcast Command - Group
Channel - Group
Channel Created - Group
Channel Recv Half - Group
Channel Send Half - Group
Event - Host
SqlHandle - The
SqlHostacrate::backend::BackendType::HostSqlcarries. Two handles are equal only when they are the same host, which is what “the same backend” means for them. - IfEq
- Internal
Server Error - KemAlgorithm
Iter - An iterator over the variants of KemAlgorithm
- Kernel
Executor - Creates a KernelExecutor
- Kernel
Executor Settings - Used for fine-tuning parameters within the [
KernelExecutor] - Mailbox
Delivery - Message
Group Key - Message
Group Options - Options for creating message groups
- Mono
Ratchet - A compact ratchet meant for protocols that require smaller payloads
- Mutual
Peer - This is to replace a tuple for greater organization
- NativeIO
- Default [
ProtocolIO] implementation for native platforms. - Native
Ordered Reliable Config - Config for ordered reliable transport without encryption (TCP).
- Native
P2PConfig - Config for P2P-capable transport (QUIC).
- Native
Secure Config - Config for ordered reliable secure transport (TLS).
- Network
Error - The single error type used across the entire Citadel workspace.
- Node
Builder - Used to construct a running client/peer or server instance
- Node
Future - An awaitable future whose return value propagates any internal protocol or kernel-level errors
- Node
Remote - allows convenient communication with the server
- Object
Id - Object
Transfer Handle - Object
Transfer Handler - Object
Transfer Handler Inner - Used to keep track of file transfer progress for either sender or receiver orientation
- Outbound
Request Rejected - Outbound
UdpSender - P2pPath
Cell - Shared, live view of a virtual connection’s
P2pPath, read by the application’s channel and written when a P2P connection is established, lost, or given up on. Every change is published, so an application cansubscribeinstead of polling. - P2pPath
Status - A snapshot of a virtual connection’s path and of its background upgrade campaign.
- Path
Control - Asks a connection’s P2P campaign to try again (see the module docs). It outlives
PeerChannel::split, asP2pPathCelldoes. - Peer
Channel - Peer
Channel Created - Peer
Channel Recv Half - A stream interface for receiving secure packets NOTE: on drop, if this is used for a P2P connection, disconnection will occur
- Peer
Channel Send Half - Peer
Command - Peer
Event - Peer
Info - Contains info about a peer, used for giving the user access to usernames and names of peers
- Persistence
Handler - This is what every C/NAC gets. This gets called before making I/O operations
- PreShared
Key - Probe
Server - Sends a liveness probe to the server of
session_cidnow and reports its round trip, or that no answer came withintimeout(seeproto::server_probe). - Pull
Object - Quic
Redirect Signal - Redirect signal carrying QUIC connection parameters.
- ReKey
- ReKey
Result - ReVFS
Result - Rebind
Failure - One endpoint that could not be moved. It keeps its old socket.
- Rebind
Report - What a rebind did to each live endpoint.
- Rebound
- One endpoint moved from
fromtoto. - Register
Failure - Register
Okay - Register
ToHypernode - Rtdb
Config - For use in the TOML config as well as for during the Post-login phase
- SecBuffer
- A memory-secure wrapper for shipping around Bytes
- Secrecy
Mode Iter - An iterator over the variants of SecrecyMode
- Secure
BufMut Handle - Security
KeyChallenge - One request for a touch. Answer it once, or drop it to decline.
- Security
KeyPrf - The SDK’s end of the channel; pass it in
crate::auth::SignInFactors. - Security
KeyRequest - What the embedding application must ask a security key for: a WebAuthn
getwith theseallowCredentialsand the PRF extension evaluated atprf_eval_salt. - Security
Level Iter - An iterator over the variants of SecurityLevel
- Send
Object - Server
Misc Settings - Miscellaneous settings for a node serving connections
- Server
Only Session Init Settings - Server
Probe Result - The outcome of
NodeRequest::ProbeServer. - Services
Config - Services
Object - Passed to the services handler post-login at the server. Intended to be passed to the client afterwards
- Session
Info - Session
List - Session
Security Settings - Session
Security Settings Builder - SetPeer
Turn Config - Supplies (
Some) or withdraws (None) the TURN relay configuration for the next P2P attempt betweensession_cidandpeer_cid. Both peers must supply one for the relay to be used; it is consumed by that attempt. Local only — credentials are never sent over the wire. - SigAlgorithm
Iter - An iterator over the variants of SigAlgorithm
- Sign
InCredential - One enrolled factor, as
ListCredentialsreports it. - Sign
InFactors - The factors a post-quantum sign-in (or a management step-up) offers. Offer what the user gave; the account’s policy decides what suffices, and the server never says which was wrong.
- SqlStatement
- One statement and its positional (
?) parameters. - Stacked
Ratchet - A container meant to establish perfect forward secrecy AND scrambling w/ an independent key This is meant for messages, not file transfer. File transfers should use a single key throughout the entire file
- Symmetric
Identifier Handle - A convenience structure for executing commands that depend on a specific registered user
- Symmetric
Identifier Handle Ref - A reference to a user identifier
- TcpTo
Quic Upgrade - TCP-to-QUIC protocol upgrade.
- Ticket
- A type sent through the server when a request is made
- Tracked
Callback Channel - A tracked callback channel that provides request-response tracking and monitoring.
- Tracked
Callback Channel Payload - A payload for the tracked callback channel.
- Transfer
Metadata - Platform-portable file metadata returned by
PlatformOps::open_and_validate_for_transfer. - Turn
Relay Config - Everything the relay needs for one P2P attempt. Both peers must supply one; the lower-CID peer allocates, the other dials the relayed address.
- Turn
Server Config - TURN server configuration for NAT traversal relay.
- Turn
Server Credential - One TURN server and the long-term credential used to authenticate against it.
- TurnUrl
- A parsed RFC 7065 TURN URI:
turn:host[:port][?transport=udp|tcp]orturns:host[:port][?transport=tcp]. - UdpChannel
- UdpMode
Iter - An iterator over the variants of UdpMode
- Virtual
Object Metadata - WebRTC
Compat Channel - WebSocket
Endpoint - A
ws://orwss://URL naming a Citadel server.
Enums§
- Admission
Provider - Who issues the tokens a challenge asks for. A client that does not know a provider ignores the challenge (it decodes as absent) and shows a plain refusal.
- Authentication
Request - Arguments for connecting to a node
- Backend
Type - Used when constructing the account manager
- Client
Connection Type - Type of client-to-server connection.
- Connect
Mode - How a client asks the server to treat a login for an account that the server already holds a session for.
- Connect
Protocol - For saving the state of client-side connections
- Encryption
Algorithm - Factor
Kind - What a factor is derived from.
- Generic
Network Stream - Group
Broadcast - Enum representing different types of group broadcast messages
- Group
Broadcast Payload - Group
Hierarchy Mode - How a group’s encryption is structured.
Flatis the ordinary zero-trust CGKA where every member shares one epoch key;CommandHierarchyadds the Decentralized Hierarchy Encryption overlay where a superior can read its subordinates’ messages (seeReadPolicy). - Group
Member Alter Mode - Group
Type - Header
Obfuscator Settings - KemAlgorithm
- Member
State - Node
Request - These are sent down the stack into the server. Most of the requests expect a ticket ID in order for processes sitting above the [Kernel] to know how the request went
- Node
Result - This type is for relaying results between the lower-level protocol and the higher-level kernel
- Node
Type - Used for determining the proper action when loading the server
- Object
Transfer Orientation - Object
Transfer Status - P2pPath
- The path carrying a P2P connection’s traffic.
- Peer
Connection Type - Type of peer-to-peer connection.
- Peer
Response - Peer
Signal - Proposed
Credentials - When creating credentials, this is required
- ReKey
Return Type - Read
Policy - Who can read a hierarchy-group message.
- Secrecy
Mode - Security
KeyPurpose - Why the SDK is asking.
- Security
Level - Provides the enumeration for all security levels
- Server
Mode - Capability-based server configuration.
- Server
Probe Outcome - How a probe ended.
- Session
Scope - What a session that has signed in may do.
- SigAlgorithm
- Sign
InManagement Op - A change to an account’s sign-in factors. Each one needs a fresh proof of the account’s factors (a step-up), except the two a recovery session may make.
- Sign
InManagement Outcome - What a
SignInManagementOpthat the server carried out returns to the application. - Sign
InPolicy - Which factors a sign-in must prove.
- SqlValue
- A value bound into, or read out of, a statement. Integers must stay within ±2^53 so a JS host can carry them as numbers; CIDs, which do not, travel as decimal text.
- Storage
Quota - How much RE-VFS storage a
SqlHostgrants. - Transfer
Type - Turn
Policy - When the relay is used for a P2P attempt.
- Turn
Transport - How the client reaches the TURN server. The relayed leg (TURN server ↔ peer) is always UDP.
- UdpMode
- User
Identifier - A convenience wrapper for passing arguments to functions that require searches for a user
- Virtual
Connection Type - Unified type representing all possible virtual connections.
Constants§
- AES_
GCM_ NONCE_ LENGTH_ BYTES - ASCON_
NONCE_ LENGTH_ BYTES - C2S_
IDENTITY_ CID - Constant for C2S identity (target_cid = 0 means server).
- CHA_
CHA_ NONCE_ LENGTH_ BYTES - KEM_
ALGORITHM_ COUNT - KYBER_
NONCE_ LENGTH_ BYTES - LARGEST_
NONCE_ LEN
Traits§
- Algorithms
Ext - IfEq
Conditional - IfTrue
Conditional - Native
Server Mode Ext - Extension trait for
ServerMode<NativeIO>convenience methods. - NetKernel
- The
NetKernelis the thread-safe interface between the single-threaded OR multi-threaded async protocol and your network application - Object
Source - PairMap
- Platform
Ops - Platform-specific capabilities extending the transport abstraction.
- Ratchet
- For allowing registration inside the toolset
- Remote
- Runtime
Future - SqlHost
- SQL storage supplied by the host.
- SyncIO
- Convenient serialization methods for types that #[derive(Serialize, Deserialize)]
- Target
Locked Remote - Then
Functions§
- add_
inner - calculate_
optimal_ argon_ params - Uses: https://www.ory.sh/choose-recommended-argon2-parameters-password-hashing/ “To reach the desired execution time, you can tweak two variables. It is recommended to start with the highest amount of memory possible and one iteration. Reduce the memory until one hashing operation takes less than your desired duration. Next, advance the number of iterations to approach the desired execution time as close as possible”
- challenge_
of - The challenge a connect or register error carries, when the server’s refusal sent one.
- load_
server_ endpoint - The WebSocket URL the account
cidregistered to, orNonefor an account whose server is its address. - prepare_
virtual_ path - read_
one_ packet_ as_ framed - security_
key_ channel - A channel for security-key requests: hand the first half to the SDK, serve the second.
- username_
to_ cid - Generates a CID given a username.
- validate_
virtual_ path - write_
one_ packet
Type Aliases§
- Default
Node Builder - Default node builder type using platform-appropriate transport
- Default
Transport - Platform-appropriate default transport.
- Factor
Id - The server’s identifier for one enrolled factor of an account. Unique within the account and never reused, so a removed factor’s id cannot come to mean a different factor.
- Lightweight
Node Builder - Lightweight node builder using
MonoRatchetfor reduced cryptographic overhead - Restored
UdpChannels - Every UDP channel a P2P path recovery restores, in order (see
PeerChannel::upgrade). - SqlRow
- A result row, columns in the order the statement selected them.
- Tracked
Callback Error - Error type for tracked callback channel operations.
- Virtual
Target Type - Alias for VirtualConnectionType (for readability in target contexts).