Hubs in one Caddy process share a transport and receive each other's private updates
Description
Impact
Several mercure handlers in one Caddy process, for example one per site block, are meant to be independent hubs. The Caddy module pooled transports by configuration only: every hub using the local transport got the same instance, and hubs using the bolt transport (or the deprecated transport_url) shared one whenever their configuration matched, which includes the default Bolt path.
An update published on one hub is then dispatched to the subscribers of every other hub sharing the transport, private updates included, since each hub authorizes the subscriber against its own keys but the update comes from the shared transport. Subscribers replaying history with Last-Event-ID also receive the other hubs' history.
Affected deployments. A Caddy configuration running two or more hubs with distinct names, where the hubs use local, or bolt with the same (or default) path, or the same transport_url. A subscriber authorized on one hub reads updates published on another, which matters most when the hubs belong to different tenants: whoever controls one hub's keys can mint a token granting every topic and receive all the private updates of the others.
Patches
Pooled transports are now keyed by the hub name as well: hubs with distinct names never share a transport, and hubs with the same name keep sharing it on purpose. Two differently named hubs pointing at the same Bolt file now fail at startup with an explicit error instead of silently sharing it.
The 0.x branch is no longer maintained and won't receive a fix: upgrade to 1.x.
Workarounds
Give each hub a Bolt transport with its own path. There is no workaround for the local transport other than running the hubs in separate processes.