Skip to content

Commit

Permalink
Merge branch '2.5.x' of github.com:grails/grails-doc into 2.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Jun 24, 2016
2 parents ab4ba83 + c08e92e commit f537729
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
grails.version=2.5.3
grails.version=2.5.5
4 changes: 2 additions & 2 deletions src/en/guide/commandLine/forkedMode.gdoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ Then just us the regular @run-app@ command as per normal. Note that in forked mo
grails stop-app
{code}

To customize the JVM arguments passed to the forked JVM you can specify a map instead:
To customize the JVM arguments passed to the forked JVM you can specify a list instead:

{code}
grails.project.fork.run= [maxMemory:1024, minMemory:64, debug:false, maxPerm:256, jvmArgs: '..arbitrary JVM arguments..']
grails.project.fork.run= [maxMemory:1024, minMemory:64, debug:false, maxPerm:256, jvmArgs: ['-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005']]
{code}

h4. Auto-deploying additional WAR files in Forked Mode
Expand Down
48 changes: 48 additions & 0 deletions src/en/guide/security/ssl.gdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
You can configure the embedded Tomcat server to use SSL in development mode. Typically with Tomcat you would edit the @server.xml@ file to define these properties. However in Grails you need to hook into Tomcat by configuring @grails-app/scripts/_Events.groovy@. In the example below I am using environment variables to pass in the values of the keystore and truststore. Notice also that we must add the keystore/truststore properties twice. Using

{code:java}
System.setProperty("javax.net.ssl.keyStore", "$keystorepath")
{code}

will define the keystore path for Grails. You will also need to also define the keystore/truststore paths for the Tomcat connector. Here is an example in @grails-app/scripts/_Events.groovy@:

{code:java}
import org.apache.catalina.connector.*
import grails.util.Environment

eventConfigureTomcat = { org.apache.catalina.startup.Tomcat tomcat ->
if (Environment.getCurrent() == Environment.DEVELOPMENT) {
String keystorepass = System.getenv("KEY_STORE_PASS")
String keystorepath = System.getenv("KEY_STORE_PATH")
String truststorepass = System.getenv("TRUST_STORE_PASS")
String truststorepath = System.getenv("TRUST_STORE_PATH")

System.setProperty("javax.net.debug", "ssl") //use this to confirm grails adds proper keystore/truststore settings
System.setProperty("javax.net.ssl.keyStoreType", "jks")
System.setProperty("javax.net.ssl.keyStore", "$keystorepath")
System.setProperty("javax.net.ssl.keyStorePassword", "$keystorepass")
System.setProperty("javax.net.ssl.trustStoreType", "jks")
System.setProperty("javax.net.ssl.trustStore", "$truststorepath")
System.setProperty("javax.net.ssl.trustStorePassword", "$truststorepass")

def connector = new org.apache.catalina.connector.Connector()
connector.port = 8443
connector.protocol = 8443
connector.scheme = "https"
connector.setProperty("maxThreads", "150")
connector.setProperty("SSLEnabled", "true")
connector.setProperty("secure", "true")
connector.setProperty("clientAuth", "true")
connector.setProperty("sslProtocol", "TLS")
connector.setProperty("keystoreType", "JKS")
connector.setProperty("keystoreFile", "$keystorepath")
connector.setProperty("keystorePass", "$keystorepass")
connector.setProperty("truststoreType", "JKS")
connector.setProperty("truststoreFile", "$truststorepath")
connector.setProperty("truststorePass", "$truststorepass")

tomcat.service.addConnector connector
println "SSL configuration complete"
}
}
{code}
1 change: 1 addition & 0 deletions src/en/guide/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ security:
xssPrevention: Cross Site Scripting (XSS) Prevention
codecs: Encoding and Decoding Objects
authentication: Authentication
ssl: SSL in Development
securityPlugins:
title: Security Plugins
springSecurity: Spring Security
Expand Down
2 changes: 1 addition & 1 deletion src/en/ref/Command Line/bug-report.gdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ h1. bug-report

h2. Purpose

The bug-report command packages up the sources of your application (excluding jars, static resources etc.) into a ZIP file. The file name includes the application name and a timestamp. This is useful for reporting issues to the "Grails JIRA":http://jira.grails.org/
The bug-report command packages up the sources of your application (excluding jars, static resources etc.) into a ZIP file. The file name includes the application name and a timestamp. This is useful for reporting issues to the "Grails Issue Tracker":https://github.com/grails/grails-core/issues

h2. Examples

Expand Down

0 comments on commit f537729

Please sign in to comment.