Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protecting Huginn with HTTP auth breaks Twilio integration. #815

Closed
virtadpt opened this issue May 4, 2015 · 7 comments
Closed

Protecting Huginn with HTTP auth breaks Twilio integration. #815

virtadpt opened this issue May 4, 2015 · 7 comments

Comments

@virtadpt
Copy link
Collaborator

virtadpt commented May 4, 2015

When using the Twilio agent to interact with the outside world, putting Huginn behind a web server which implements HTTP Basic Auth breaks inbound interaction from Twilio's API server. For example, sending a text message to an agent network results in the following error at Twilio:

Error              11200 HTTP retrieval failure 
Description    An attempt to retrieve content from https://exocortex.virtadpt.net/ returned the HTTP status code 401.

Is there a way to work around this such that Twilio's API server can send incoming events while still preventing untrusted users from monkeying with Huginn?

@dsander
Copy link
Collaborator

dsander commented May 4, 2015

Doesn't the invitation code offer enough 'protection'?

You could try https://username:password@exocortex.virtadpt.net/.

@virtadpt
Copy link
Collaborator Author

virtadpt commented May 4, 2015

I don't know. I set it up at the advice of @cantino.

Hmmm... I'll try that.

@cantino
Copy link
Member

cantino commented May 7, 2015

@dsander Since he is running in development mode, I encouraged him to put the site behind basic auth in nginx. Rails in development is fairly insecure (interactive debug consoles, error logs, etc.).

@virtadpt you could probably set nginx to allow only requests to the webhook routes without basic auth, right?

@virtadpt
Copy link
Collaborator Author

virtadpt commented Jun 5, 2015

I could try. I haven't had time to mess with Huginn for a few weeks now.

@cantino
Copy link
Member

cantino commented Jun 6, 2015

That'd be my recommendation.

@virtadpt
Copy link
Collaborator Author

I've created a separate basic auth user for webhooks and I'm trying that URL spec - I forgot that you could do that.

It works like a charm!

@cantino
Copy link
Member

cantino commented Jun 22, 2015

Great!

@cantino cantino closed this as completed Jun 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants