Chat Daemon and HTTPS

Chat Daemon and HTTPS

by Andy Byers -
Number of replies: 4

Running Moodle 2.3, we've set up a cluster with HAProxy load balancing, but quickly noticed that Chat wasn't working. After investigation we attempted to use the chat daemon, which runs fine. The issue is that our site is HTTPs with permanent redirect from HTTP. When you attempt to use the chat tool modern browsers like Chrome and Firefox block the insecure content (and do so without a pop up now, just a little shield in the top left/right hand corner). Has anyone managed to get the Daemon running under HTTPS?

Cheers,

Andy

Average of ratings: -
In reply to Andy Byers

Re: Chat Daemon and HTTPS

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
In reply to Matteo Scaramuccia

Re: Chat Daemon and HTTPS

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Andy,
in the past days I've reviewed some minor issues (MDL-43482, MDL-43483) in the chatd daemon so I had the chance to get in touch with the chatd daemon code design for my first time.
I was wrong in my previous post when talking about a "bug": long story short, this requires some more changes in the code and documentation on how a SSL tunneling could be achieved in order to support HTTPS by design so it could be filed into the Moodle Tracker as "an improvement".

It is "by design" since the chatd daemon talks with the browser using a plain but simplified HTTP protocol and the only way to let it support HTTPS should be to change those hard-coded http:// plus to re-route the chatd daemon port into an SSL tunneling using the same server certificate e.g. by introducing stunnel.

Creating the tunnel depends on the infrastructure too: in your case it could be a combination of HTTPS tunneling and proxying the chatd daemon port into the standard 443 - please, note that using the chatd daemon should mean to not use the web server otherwise why not using the standard (ajax or normal) chat? - i.e. use cases about the potential feasible setups are required in order to code a valuable solution.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Chat Daemon and HTTPS

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Andy,
follow MDL-43500 for the SSL tunnelling improvement.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Chat Daemon and HTTPS

by Andy Byers -

Hi Matteo,

Thanks for that. At the moment we've got a very iffy integration with a in-house chat system and I'd prefer to swap back to using the built in tool. I'll monitor the ticket.

Andy