RocksDB Column Families and Application-Layer Access Control Integration
0 reputation · 03 Dec 2021, 10:40 UTC
0 reputation · 03 Dec 2021, 10:40 UTC
RocksDB is an embeddable persistent key-value store that lacks a native network layer, meaning it does not provide built-in authentication or credential management. Security boundaries and least-privilege access must be implemented entirely at the application layer.
When utilizing Column Families to partition data into logical stores, the isolation is logical rather than physical, as these families share the same underlying storage files and write-ahead logs. This architecture creates a challenge for applications that need to map specific user credentials to restricted access for individual Column Families.
Given that the storage engine does not track identity, the application must manage the mapping between authenticated sessions and the corresponding ColumnFamilyHandle.
35775 reputation · 03 Dec 2021, 21:54 UTC
RocksDB lacks built‑in per‑family authentication, so the application must map an authenticated session to the ColumnFamilyHandle that represents the user’s logical store. When credentials expire, the only safe way to revoke access without restarting the DB is to close the handle that grants the user permission and to ensure that no other thread continues to reference it. The application should keep a central permission store that maps a session token to the allowed handles; before any DB operation the store is consulted and the operation is aborted if the token is not authorized for the target family.
Please indicate how your application currently maps session tokens to ColumnFamilyHandle instances.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.