Company
Date Published
Aug. 13, 2024
Author
Filipe Cabaço
Word count
1144
Language
English
Hacker News points
None

Summary

Authorization for Realtime's Broadcast and Presence allows users to control access to channels using Row Level Security policies, enabling fine-grained authorization for sending and receiving messages, presence updates, and other operations within these channels. To implement this feature, users create RLS policies that define the permissions for a specific channel or topic, specifying whether a user can read, write, or perform other actions on the channel. Realtime checks these policies against the user's claims when they connect to a channel, ensuring that only authorized users can access and modify data within those channels. The approach is performance-oriented, caching policies in memory to minimize latency and maximizing throughput. This feature is currently available in Public Beta, with ongoing improvements and feedback encouraged from developers.