-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Turbo's signed stream names provided by turbo_stream_from never expire: hotwired/turbo-rails#61
Example of how this could be a problem
- Turbo stream is generated for a
@teamof users:
<%= turbo_stream_from @team %>- A team member saves the generated signed-stream-name, or keeps a page open containing the generated
<turbo-cable-stream-source signed-stream-name=...>tag in their browser. - This team member is removed from the
@team. - The removed team member can still receive data from the turbo stream as they have the signed-stream-name.
Potential mitigations?
- Use a custom channel class that performs authorization checks. See the
:channeloption forturbo_stream_fromand the docs forTurbo::StreamsChannel: https://github.com/hotwired/turbo-rails/blob/main/app/channels/turbo/streams_channel.rb . Is this sufficient? How often are any customTurbo::StreamsChannelauthorization checks invoked - on every message?? - Frequently rotate the secret used for
Turbo.signed_stream_verifier_key?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels