6.5. Run JBoss EAP 6 Within the Java Security Manager
standalone.shscripts. The following procedure guides you through the steps of configuring your instance to run within a Java Security Manager policy.
- Before you following this procedure, you need to write a security policy, using the
policytoolcommand which is included with your Java Development Kit (JDK). This procedure assumes that your policy is located at
EAP_HOME/bin/server.policy. As an alternative, write the security policy using any text editor and manually save it as
- The domain or standalone server must be completely stopped before you edit any configuration files.
Procedure 6.2. Configure the Security Manager for JBoss EAP 6
Open the configuration file.Open the configuration file for editing. This file is located in one of two places, depending on whether you use a managed domain or standalone server. This is not the executable file used to start the server or domain.
Add the Java options to the file.To ensure the Java options are used, add them to the code block that begins with:
if [ "x$JAVA_OPTS" = "x" ]; thenYou can modify the
-Djava.security.policyvalue to specify the exact location of your security policy. It should go onto one line only, with no line break. You can modify the
-Djava.security.debugto log more or less information, by specifying the debug level. The most verbose is
JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djboss.home.dir=$PWD/.. -Djava.security.policy==$PWD/server.policy -Djava.security.debug=access:failure"
Start the domain or server.Start the domain or server as normal.