Note that there are some explanatory texts on larger screens.

plurals
  1. POSecurity with Play! from Outside Application
    primarykey
    data
    text
    <p>I am working on writing a private REST API with Play! that I will make calls to from a mobile application and I am confused about how to keep it secure. </p> <p>When working through the Yet Another Blog Engine example in Play!'s documentation, I worked through their <a href="http://www.playframework.com/documentation/1.2.2/guide8" rel="nofollow noreferrer">authentication example</a>, and it deals with logging in through a browser. From what I understand about Play!'s Secure module, it helps with browser sessions. Additionally, every StackOverflow question I have seen has been involved with an administration module on the web and the questions have been pertaining to sessions as well.</p> <p><a href="https://stackoverflow.com/questions/8731624/does-the-play-framework-have-any-built-in-mechanism-to-prevent-session-hijackin">Does the Play! framework have any built in mechanism to prevent session hijacking?</a></p> <p><a href="https://stackoverflow.com/questions/7415030/enforce-https-routing-for-login-with-play-framework">Enforce Https routing for login with play framework</a></p> <p>My current understanding of how the security should work:</p> <ul> <li>The mobile app "logs in" to the web app and obtains some kind of token</li> <li>With each subsequent call the token is appended to the end of the API call</li> <li>If the mobile user "logs out" or the token expires, the web app removes the token</li> <li>Every API call uses HTTPS in order to maintain security</li> </ul> <p>Is it possible for me to make an HTTP request from the mobile application to the web application I create using Play! Framework while keeping it secure?</p> <p>Am I approaching the whole situation incorrectly?</p> <p>This is the first Play! app I have created and this is the first time I have used Heroku. I am not too far in that I would be opposed to switching to something else if it were significantly easier/more efficient/better suited to solve this problem.</p> <p><strong>EDIT:</strong> Also, in Play!'s YABE tutorial, it seems like they check the password in plain text. Just from a general standpoint, how is that not a security issue?</p> <p><strong>EDIT 2:</strong> I have looked over OAuth provider information and it seems to solve the problem. My only apprehension with it is that v2.0 has known security flaws and v1.0 seems complicated to implement for a situation where all I need is a secure connection between a mobile app and a web app. If I were to make every call require SSL, could I make each Play method just take username and password as parameters and disregard OAuth completely?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload