You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending on the security posture of your app, you could be broadcasting sensitive or semi-sensitive information via websockets. This may not be an issue with conventional Redis/NOTIFY setups since the messages are more ephemeral, but it becomes noticeable with Solid Cable since messages are stored in the database for up to a day by default.
Proposed Solution
Add opt-in encryption of payload (and maybe channel) for the solid_cable_messages table.
There's good precedent for this in Solid Cache (1, 2, 3) and it looks like that logic could be copied over fairly verbatim.
I'd be willing to take a swing at a PR next week if there's interest!
happy to take a pr to optionally enable this. We would also have to handle the case where people want to migrate to having their messages encrypted and are currently unencrypted
Nice! Didn't realize you could have unencrypted and encrypted messages at the same time. I think a note in the readme is sufficient enough. This sounds like a good game plan to me!
Activity
kieraneglin commentedon Aug 9, 2025
I'm not comfortable recommending it or anything, but initial tests seem to be working:
Note that this may break existing setups unless you have
config.active_record.encryption.support_unencrypted_dataenablednpezza93 commentedon Aug 10, 2025
happy to take a pr to optionally enable this. We would also have to handle the case where people want to migrate to having their messages encrypted and are currently unencrypted
kieraneglin commentedon Aug 12, 2025
Sounds good! I'll try and take a look some time this week 👍
As for the migration case, I don't personally think that's something we'd need to handle for a few reasons:
active_record.encryption.support_unencrypted_dataMy opinion is that adding a note to the README would be enough here but let me know what you think!
npezza93 commentedon Aug 12, 2025
Nice! Didn't realize you could have unencrypted and encrypted messages at the same time. I think a note in the readme is sufficient enough. This sounds like a good game plan to me!
Add encryption support
Add encryption support
Add encryption support (#88)