Skip to main content
Version: 7.2405.x.x LTS

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.

Example using single quotes
JAVA_OPTS=(
'-server'
'-Djavax.net.ssl.keyStorePassword=${exec:cat /var/opt/pwd.txt}'
)
Example using double quotes
JAVA_OPTS=(
"-server"
"-Djavax.net.ssl.keyStorePassword=\${exec:cat /var/opt/pwd.txt}"
)
Old string syntax (cannot handle spaces in jvm arguments and inline comments)
JAVA_OPTS="-server \
-Djavax.net.ssl.keyStorePassword=\${exec:cat /var/opt/pwd.txt}"
Important

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:

  1. Root classloader
  2. AutheEngine classloader
  3. 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:

  1. /opt/nevisauth/server
  2. CLASSPATH defined in env.conf
Example for default configuration
CLASSPATH="/var/opt/nevisauth/`<instance>`/lib/*:"