Use WildFly with Java 2 security manager

You can configure the Java agent when using WildFly with Java 2 security. WildFly versions 9 through 20 are supported. WildFly 8 is not supported.

To enable the Java 2 security manager in Wildfly:

  1. Either pass a command-line argument -secmgr, or set an environment variable SECMGR to true:

    SECMGR="true"
  2. To enable permissions for the Java agent, append this Contrast policy to $JAVA_HOME/jre/lib/security/java.policy (for JDK 6-8), or $JAVA_HOME/lib/security/default.policy (for JDK 9 and later). Replace <YourContrastJarPath> with the path to your Contrast JAR and use:

    grant codeBase "file:<YourContrastJarPath>" {
      permission java.security.AllPermission;
    };
  3. To allow the agent to function with Wildfly’s classloader system, modify the value of the environment variable JBOSS_MODULES_SYSTEM_PKGS (originally org.jboss.byteman), to also include the Java agent base package: com.contrastsecurity.agent,org.jboss.byteman