Grails application with ws-client on AWS Elastic Beanstalk

If you happen to have a grails project to deploy on Amazon AWS Elastic Beanstalk, and your project depends on ws-client, you may experience a few issues, which I am documenting here.

Please note that there is nothing new here, as the information is already available on the Internet, and I am reposting here for ease of use. Continue reading “Grails application with ws-client on AWS Elastic Beanstalk”

Grails spring-security-core using dynamodb

Using Spring Security plugin for grails with Amazon DynamoDB plugin for Amazon DynamoDB is pretty straightforward, but there are two issues to be confronted with.

The id into your User, Role and UserRole classes has to be explicitly set to String, since DynamoDB uses UUID as default primary key hash generator. Otherwise you can set the id_generator to hilo, if you prefer to stick to Spring Security model.

Second issue is a Spring Security bug which will double encode your password if you’re using a second datasource, which is likely unless you removed hibernate from you project. A workaround is posted in the above thread

class User implements Serializable {
transient bEncoded = false
protected void encodePassword() {
if (!bEncoded ) { password = springSecurityService.encodePassword(password); bEncoded = true; }

Besides these two issues, the plugins work like a charm together.