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

Added ability to authenticate by authenticity token, needed for compatibility with hubot. #346

Merged
merged 1 commit into from
Apr 27, 2014

Conversation

JangoSteve
Copy link
Contributor

Hubot couldn't actually create activities in Kandan due to the removal of authenticity-token based validation from Devise in the Kandan app. This isn't ideal, but it works and will allow the Kandan Hubot to post activities in response to commands.

…tibility with hubot.

Conflicts:
	app/controllers/application_controller.rb
@scouttyg
Copy link
Member

Looks good! Is there something we can fix with https://github.com/kandanapp/hubot-kandan-app so that it can authenticate via other methods, or is there another strategy we can use?

In the mean time let's pull this in so its fixed.

@JangoSteve
Copy link
Contributor Author

To be fair, there's a reason authentication tokens were removed from core Devise. Authenticating via static authenticity tokens has some vulnerabilities. This is the writeup from when it was removed and why:

http://blog.plataformatec.com.br/2013/08/devise-3-1-now-with-more-secure-defaults/

To do this sort of thing securely, we'd need to build dynamic authentication tokens that expire and get regenerated after each use, using some sort of handshake method for the bot to get and use the authentication method.

I'm guessing this will have to do for now.

@scouttyg
Copy link
Member

Alright we'll pull this in for now and make sure we note it somewhere so we know to come back to it at a later time.

scouttyg added a commit that referenced this pull request Apr 27, 2014
Added ability to authenticate by authenticity token, needed for compatibility with hubot.
@scouttyg scouttyg merged commit 5cd6e66 into kandanapp:master Apr 27, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants