Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: SSL certificate for HTTP trigger driver
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anybody have an easy solution to install an SSL certificate for HTTP trigger driver? 

I'm using the free certificates for my Serverpilot sites. Anyone have luck with those?

The server driver would have to be updated to support secure connections, which wouldn't be trivial to do. I can put it on the list. The certificate itself wouldn't help much. But it would allow you to pass a username/password that you can check in your actions, and have that info be encrypted during transmission.
Dean. Thanks. I'm trying to put a button on an HTTPS webpage to hit my http trigger. I'm running into "unauthorized script" errors and thought a certificate would get me around those. I can probably solve that problem by using the http version of my webpage.

The bigger problem is figuring out the best way to trigger the http trigger. A simple link works, but takes me to a page that simply says Done. I'd like to know how to craft a link that hits the http trigger, without taking me to a page that says Done.

Any ideas?

If you do that from within a web page, then it's going to treat it like a page query and display the page. I'm not sure how you'd prevent that if using a browser. To a browser, all HTTP operations are pretty much either a GET of a page or a POST to post something which returns a page with the results of the POST. The HTTP trigger driver just returns a simple page to be returning something, since it tends to be invoked with a GET. But it's not expected that that would be used. Typically it's being invoked via some means other than a browser.

You probably would have to do it from javascript kicked off by the button. But doing HTTP queries from javascript, from what I've seen of it, tends to get you into some less than standardized bits. And it has to be done asynchronously because of the nature of browsers. You'd think that sort of thing would be really simple, but unless I'm missing something it's not.

If you really want to write an HTML based client, a websocket based scheme would be the most practical and high performance way to do it, but that involves create a CML based handler on our web server side to talk to your client. It does though open you up a a lot of flexibility.
Is there an example somewhere of a CML based handler to do this. I don't think I could write one from scratch, but I can adapt and copy.

If you look at the Tips O the Day sticky thread at the top of this section, one of them is how to do a custom websockets client. It'll be a bit to bite off if you haven't done such things before.
I have no learning-curve with HTML and I can do things that I can't do through CQC Interfaces. Using a button to kick off javascript to hit the HTTP trigger is pretty easy. My big problem is, browsers enforce HTTPS and refuse to cooperate with an HTTP site.

I'll see if I can find a middleware solution that lets me hit an HTTPS site, which then hits the HTTP trigger.

IFTTT has a websockets service which hits the HTTP trigger nice and easy. If I hit IFTTT through Google Home, it hits the HTTP trigger very quickly after it acknowledges the voice command. Unfortunately, if I hit IFTTT through their websockets service, and then use their websockets service to hit CQC, there is too much lag.

You're right that Websockets looks like a lot to bite off. Even getting an SSL for the CQC web server seems daunting. Maybe someone else will do it all and make a tutorial.

It's not that much to set up a certificate for our web server. There's plenty of discussion of that around her. If it's just for internal use you can create a self-signed one. For external use you have to get a public domain name, which for most folks means as dynamic DNS service. You buy a certificate for that DNS name, drop the two appropriate files into the right places in the Windows certificate store, then run the CQC installer and provide a little info on the web server page.