node.js and juggernaut pub/sub

By : sfs
Source: Stackoverflow.com
Question!

I'm using express framework and juggernaut. I looked at many examples about juggernaut, all examples using this method(client side):

  var jug = new Juggernaut;
  jug.subscribe("channel_name", function(data){
    console.log("Got data: " + data);
  });

Is it secure? I don't think so, everybody can subscribe to a channel from javascript console. Is there a way to subscribe a channel from server side?

By : sfs


Answers

I don't know how Juggernaut works, but I know that Faye supports extensions that can include authentication, so that subscribe operations require a valid token. See: http://faye.jcoglan.com/node.html

It would be worth checking whether Juggernaut supports a similar extension/intercept model.



Use security through obscurity, use a random channel name (HMAC).



This video can help you solving your question :)
By: admin