Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Grails to use a signed certificate with run-app or run-war

Tags:

grails

groovy

Even after adding this code to Config.groovy, Grails insists on using its own self-signed certificate:

grails.tomcat.truststorePath = "${grailsSettings.baseDir}/conf/ssl/truststore.jks"
grails.tomcat.truststorePassword = "changeit"
grails.tomcat.clientAuth = "want"
grails.tomcat.keystorePath = "${grailsSettings.baseDir}/conf/ssl/keystore.jks"
grails.tomcat.keystorePassword = "changeit"
grails.tomcat.keyAlias = "localhost"

Any idea how to force Grails to use the real keystore here?

like image 457
Mike Thomsen Avatar asked Sep 29 '22 14:09

Mike Thomsen


1 Answers

Apparently, it's a common mistake to put these settings in Config.groovy. They belong in BuildConfig.groovy. Once I put them in BuildConfig.groovy, everything worked for me.

like image 142
Mike Thomsen Avatar answered Oct 04 '22 02:10

Mike Thomsen