2

In the book Programming Grails, Burt Beckwith gives some really good insights about how to develop Grails applications which follows OWASP Top 10 recommendations in chapter 9.

Punctually,I'm trying to implement the recommendation for Insecure Cryptographic Store. That reads as follows

Do not store passwords in config files, or even in files on the filesystem. Instead, create a web page that you use to initialize the system where people trusted with passwords enter the passwords (using SSL!) when the application starts up. Ideally, you shouldn’t trust any one person with all of the information to start the system. For example, to use JCE encryption, you will need to load a java.security.KeyStore , and this requires a password, and you use this to create a javax.crypto.SecretKey , which also requires a password. Use different passwords. If two people know the key store password and two other people know the key password (it’s a good idea to have backup users in case someone isn’t available), then no one person can decrypt the data or be coerced into giving someone else access.

I want to secure the Amazon AWS[1] Access Credentials that will be used by the application in order to use the KMS[2] API call to secure encrypt and decrypt information.

I would like and example about how this can be achieved. My initial idea is to use a Service in the Singleton scope which holds the credentials and those credentials are setted by a Controller which is responsible of loading the KeyStore and the SecretKey used to decrypt a previusly encrypted and store AWS Access Credentials.

[1]http://en.wikipedia.org/wiki/Amazon_Web_Services

[2]http://aws.amazon.com/en/kms/

Neoecos
  • 569
  • 4
  • 16
  • 1
    Unsure if this is of help : http://stackoverflow.com/questions/19192117/is-it-possible-to-use-the-grails-jasypt-plugin-outside-the-gorm-layer-for-simple which you could possibly use with existing aws plugin http://grails-aws.github.io/grails-aws/1.2.12.4/guide/1%20Introduction%20to%20Grails%20AWS%20Plugin.html – V H Dec 12 '14 at 16:40
  • Thank you @vahid, but the problem is not to actually connect or how to setup AWS Credentials is about how securely store and setup those credentials. – Neoecos Dec 17 '14 at 15:36

0 Answers0