Environment configuration
The env.conf configuration file contains system level configuration. These are mostly properties required to start Java itself.
JAVA_HOME
As first priority, nevisAuth uses the Java installation defined in the file env.conf using the configuration property JAVA_HOME. If the JAVA_HOME property is not defined in the file env.conf, the Java version as defined in the PATH environment variable is used.
To define the usage of a specific Java installation, set the configuration property JAVA_HOME in the file env.conf:
JAVA_HOME=/etc/alternatives/jre_1.8.0
JAVA_OPTS
Java system properties can be passed to nevisAuth using the JAVA_OPTS property in the env.conf.
The JAVA_OPTS environment variable can be an expression that will be replaced.
JAVA_OPTS=(
'-server'
'-Djavax.net.ssl.keyStorePassword=${exec:cat /var/opt/pwd.txt}'
)
JAVA_OPTS=(
"-server"
"-Djavax.net.ssl.keyStorePassword=\${exec:cat /var/opt/pwd.txt}"
)
JAVA_OPTS="-server \
-Djavax.net.ssl.keyStorePassword=\${exec:cat /var/opt/pwd.txt}"
If you use double quotes the $ must be escaped.
For more on expressions see nevisauth.yml expression.
CLASSPATH
Custom classpath extends the Root classloader configuration.
NevisAuth has 3 levels of class-loading:
- Root classloader
- AutheEngine classloader
- AuthState classloader
Specifying something on the Root level may interfere with all AuthStates. Making Root level changes needs to be done carefully. This option is typically used when system level customization is required. For example Securosys HSM.
The Java command is started with the following classpath in order:
/opt/nevisauth/serverCLASSPATHdefined in env.conf
CLASSPATH="/var/opt/nevisauth/`<instance>`/lib/*:"