History | Edit

The Oxygen XML Web Author requires access to the following file resources:
  • READ access to the directory where the Oxygen XML Web Author is deployed.
  • READ and WRITE access to the application's working directory.
  • READ and WRITE access to JVM's temporary directory.

It is a good security practice to allow a component to access only the information and resources that are necessary for its purpose.

Enabling Security Mode

To enable security mode, use the following procedure, depending on your installation method:

Installation Kit Method
If you installed Oxygen XML Web Author using one of the installation kits (All Platforms, Linux, or Windows), you can enable security mode by setting the following system property: -Djava.security.manager.
Apache Tomcat Method
In an environment that uses Apache Tomcat, you can enforce these rules by following these steps:
  1. Start the Apache Tomcat server using the -security flag.
  2. Edit the catalina.policy file and add the following snippet:
grant codeBase "file:${catalina.base}/webapps/oxygenxml-web-author/-" {
  // Oxygen uses System properties for various configuration purposes.
  permission java.util.PropertyPermission "*", "read,write";
  // Oxygen custom protocols need access to network.
  permission java.net.NetPermission "*";
  permission java.net.SocketPermission "*", "accept,connect,listen,resolve";
  // The web framework used by Oxygen Webapp uses reflection and classloaders.
  permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
  permission java.security.SecurityPermission "*";
  permission java.util.logging.LoggingPermission "control";
  permission java.lang.RuntimePermission "*";

  // Oxygen requires these permissions to connect to a URL.
  permission java.net.URLPermission "http:*", "*";
  permission java.net.URLPermission "https:*", "*";
  permission java.net.URLPermission "file:*", "*";

  // Oxygen should be allowed to read JVM jars
  permission java.io.FilePermission "${java.home}/-", "read";
  // Oxygen uses the JVM's java.io.tempdir for various file handling tasks.
  permission java.io.FilePermission "${java.io.tmpdir}/-", "read,write,delete";
  permission java.io.FilePermission "${java.io.tmpdir}", "read,write,delete";

  // Folder used by Oxygen to deploy the plugins to.
  permission java.io.FilePermission "${oxygen.data.dir}/-", "read,write,delete";
  permission java.io.FilePermission "${oxygen.data.dir}", "read,write,delete";
// The jar that contains sandboxing code.
grant codeBase 
oxygen-sandbox.jar!/-" {
    permission java.security.AllPermission;
// Give all permissions to plugins code unless otherwise instructed by vendor.
grant codeBase "file:${oxygen.data.dir}/plugins/-" {
    permission java.security.AllPermission;
// Give all permissions to frameworks code unless otherwise instructed by vendor
grant codeBase "file:${oxygen.data.dir}/frameworks/-" {
    permission java.security.AllPermission;
Note: In the previous example, replace oxygenxml-web-author with the name of your deployment of Oxygen XML Web Author.

Configuring File Permissions to Custom Locations

There are cases when the Oxygen XML Web Author needs to access files system resources, but due to security reasons, you want to prevent your users from opening them directly in the Oxygen XML Web Author editing page using the file:// protocol.

You can do this by following these steps:
  1. Edit the catalina.policy file and add a line such as:
    permission java.io.FilePermission "path/to/yourSecretDir/-", "read,write,delete";
    permission java.io.FilePermission "path/to/yourSecretDir", "read,write,delete";
  2. Use the following system property when starting the Tomcat server:
    Note: Use the value of path.separator system property to separate more directories. For example, under Linux, the value of path.separator property is a colon punctuation character :.