The moose likes Ruby and the fly likes Security with REST Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Other Languages » Ruby
Reply Bookmark "Security with REST" Watch "Security with REST" New topic
Author

Security with REST

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4925

Security of remote calls is always an issue at architecture review boards. What are currently the best ways to secure remote communications with REST?


Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11945
As far as security goes, securing a RESTful web application isn't that different from securing a non-RESTful web application. For example, the transport layer is the same so you can use SSL. In Rails, you can use filters around controllers to enforce authentication/authorization regardless of whether or not the controller is RESTful.

Having said that, I don't have much experience with Rails and I'd be curious to hear from Ben how he sees this.


Author of Test Driven (Manning Publications, 2007) [Blog] [HowToAskQuestionsOnJavaRanch]
Ben Scofield
author
Greenhorn

Joined: May 20, 2008
Posts: 29
Lasse, your answer is exactly correct. You can protect RESTful services just as you protect your standard applications.

The only thing I'd add is that you can also use HTTP Basic authentication if you like - it's built into Rails as of version 2.0, and works very nicely for some scenarios.
 
 
subject: Security with REST
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com