I recently registered with IFTTT, which seems like a fantastic service to chain events together in order to create a smart home or automate various services.
I've just found the Maker channel which allows you to make simple HTTP requests (e.g. GET and POST), and I'm hoping to use this to securely send a message to a Raspberry Pi I have running that is waiting for any API request on a certain route (let's say, for example, POST /foo
).
The Makezine article I linked suggests this method for security:
Now what I did above was horribly insecure, I basically exposed to the world a script — a web application in other words — that could toggle a switch controlling a light in my house on and off. This is obviously not something you want to do, but that’s why IFTTT’s services provides the capabilities to pass more information to the remote service.
It wouldn’t be difficult to set up a TOTP authenticated link between the two for instance, or a token or key exchange — and to protect your IFTTT account itself? They’ve just added two-factor authentication.
I read more about Time-based One-time Passwords on Wikipedia, which seems to suggest that there is an element of computation involved in order to generate the one-time password.
Since IFTTT does not support chaining of tasks or any scripting, how do I generate the TOTP as suggested in the article? Is it possible at all to do this, since some calculations are required and there doesn't seem to be a way to do these?