-
Notifications
You must be signed in to change notification settings - Fork 3
Environment Setup
This page can be referenced for local environment configuration steps that may be needed to get Geodashboard running correctly.
Setting up a local security certificate for running https requests through geoserver-manager/Geoserver REST API from Sandbox.java
This is a step that is needed to make HTTPS requests from a Sandbox to the Geoserver REST API through geoserver-manager. This is a fix for local systems only.
Note: There are two options depending on if tomcat.crt exits in /geodashboard-web/src/test/resources. Only one of these options are needed
If (tomcat.crt) {
- Add the certificate into the keystore of your JVM:
keytool -importcert -alias tomcat -file GIT_HOME/geodashboard/geodashboard-web/src/test/resources/tomcat.crt -keystore JAVA_HOME/jre/lib/security/cacerts -storepass changeit
} else if (tomcat.ks) {
-
Get the certificate used by tomcat for SSL. "tomcat.crt" should already be included in the GIT repository at GIT_HOME/geodashboard/geodashboard-web/src/test/resources/tomcat.crt, but if it is not export an new certificate from keystore with the following command:
keytool -export -alias tomcat -file GIT_HOME/geodashboard/geodashboard-web/src/test/resources/tomcat.crt -keystore GIT_HOME/geodashboard/geodashboard-web/src/test/resources/keystore.ks -storepass 2v8hVW2rPFncN6m
-
Add the certificate into the keystore of your JVM:
keytool -importcert -alias tomcat -file GIT_HOME/geodashboard/geodashboard-web/src/test/resources/tomcat.crt -keystore JAVA_HOME/jre/lib/security/cacerts -storepass changeit
}
NOTE: Change GIT_HOME and JAVA_HOME in the terminal commands above to your match your system.
For mac you can find your JAVA_HOME by running this command: /usr/libexec/java_home
On my system (Maverick) the commands outputs: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Set your -keystore to: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
Nathan's Java 6:
sudo keytool -importcert -alias tomcat -file /Users/nathan/git/geodashboard/geodashboard-web/src/test/resources/tomcat.crt -keystore /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts -storepass changeit
Richard's Java 8:
sudo keytool -importcert -alias tomcat -file /Users/terraframe/git/geodashboard/geodashboard-web/src/test/resources/tomcat.crt -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/security/cacerts -storepass changeit
-
Delete the existing pair in the keystore:
keytool -delete -alias tomcat -keystore GIT_HOME/geodashboard/geodashboard-web/src/test/resources/keystore.ks -storepass 2v8hVW2rPFncN6m
-
Generate a new key pair key
keytool -genkey -alias tomcat -keyalg RSA -keystore GIT_HOME/geodashboard/geodashboard-web/src/test/resources/keystore.ks -keysize 2048 -sigalg "SHA512withRSA" -storepass 2v8hVW2rPFncN6m