title: Protect Play framework applications MySQL password and app secret within Amazon Linux EC2
body: <p>I have setup a Amazon linux EC2 that I use to host a Play Framework application, the app uses a local mysql database to store sensitive information (usernames and passwords). If somehow someone managed to gain access to the server how can I protect the sensitive information stored in the database?</p>
  
  <p>I have set up MySQL to have a strong password, however the password needs to be stored in the application's configuration file, all an attacker has to do is look in the applications code/configuration file, or just, i.e. grep -r db.default.password</p>
  
  <p>This configuration file also stores the app secret key which is used for encrypting data within the database, so from this single file an attacker could gain access to my data and then decrypt it.</p>
  
  <p>How can I secure these details?</p>