Complete technical specification of the TapsIM Federation Protocol
The TapsIM Federation Protocol enables secure, real-time communication between independent Taps.IM servers using HTTP/2 streaming with NDJSON frame encoding. The protocol implements zero-knowledge message relay, ensuring servers cannot decrypt content while maintaining message integrity and ordering.
Long-lived bidirectional streams with h2c cleartext support for efficient frame exchange
Newline-delimited JSON with ULID identifiers and monotonic sequence numbers
CREDIT-based backpressure with configurable event and byte budgets
All federation endpoints must negotiate the correct media type for frame exchange:
type - Frame type (enum)id - ULID identifierorigin - Server identifiersequence - Monotonic countergroup_id - Target group (group frames only)timestamp - UTC timestamppayload - Frame-specific dataEstablishes federation connection and exchanges server capabilities. Must be the first frame sent in any stream.
server_id - Unique server identifierversion - Protocol version (semantic versioning)capabilities - Array of supported featuressupported_groups - Group patterns or "*" for allmax_message_size - Maximum event size in bytesImplements flow control by granting the remote peer permission to send events. Essential for backpressure management.
Carries encrypted message content between federated servers. Content is treated as opaque ciphertext.
Acknowledges successful receipt and processing of EVENT frames. Enables reliable delivery guarantees.
Implements keepalive mechanism to maintain stream connections and detect failures.
Returns server capabilities and supported protocol versions. Used for capability negotiation.
Returns the server's current federation signing key for message verification.
Establishes bidirectional streaming connection for real-time frame exchange within a specific group.
One-shot endpoint for sending single events without establishing a persistent stream.
Federation servers implement anti-entropy mechanisms to detect and repair inconsistencies in distributed state, ensuring eventual consistency across the network.
Returns a cryptographic digest of the group's current state for comparison with peers.
Exchanges checkpoint data to repair detected inconsistencies between peer states.
Used to signal errors in frame processing and provide debugging information.
High-level overview of the federated network architecture and design principles.
Detailed documentation of the zero-knowledge encryption and server opacity guarantees.
Instructions for deploying and configuring Taps.IM federation servers.
Security audit reports and penetration testing results for the federation protocol.