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:
Either pass a command-line argument
-secmgr
, or set an environment variableSECMGR
to true:SECMGR="true"
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; };
To allow the agent to function with Wildfly’s classloader system, modify the value of the environment variable
JBOSS_MODULES_SYSTEM_PKGS
(originallyorg.jboss.byteman
), to also include the Java agent base package:com.contrastsecurity.agent,org.jboss.byteman
Tip
Learn more about using Java EE 7 security manager with WildFly, or read the default policy implementation and policy file syntax.