IBM Worklight v5.0.5 > WL server administration > Installation

Run IBM Worklight in WAS with Java 2 security enabled

To run IBM Worklight in WAS with Java 2 security enabled...

  1. Install WL server on a WAS instance.

  2. Enable Java 2 security in WAS.

    In the WAS console, select...

      Security | Global security | Use Java 2 security to restrict application access to local resources

  3. Edit...

      <ws.install.root>/profiles/<server_name>/config/cells/<cell_name>/node/<node_name>/app.policy

    ...and add the following content....

    grant codeBase "file:${was.install.root}/worklight-jee-library-xxx.jar"{
      permission java.security.AllPermission;};
    
    // The war file is your WL server war.
    grant codeBase "file:worklight.war"{
      //permission java.security.AllPermission; 
      //Use all permission for simplicity, however, it might
      // cause security problems.
      permission java.lang.RuntimePermission "*";
      permission java.io.FilePermission "${was.install.root}${/}-", "read,write,delete";
      // In Linux need to set TEMP folder of Linux.
      permission java.io.FilePermission "C:/Windows/TEMP/${/}-", "read,write,delete";
      permission java.util.PropertyPermission "*", "read, write";
      permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
      permission com.ibm.tools.attach.AttachPermission "createAttachProvider";
      permission com.ibm.tools.attach.AttachPermission "attachVirtualMachine";
      permission com.sun.tools.attach.AttachPermission "createAttachProvider";
      permission com.sun.tools.attach.AttachPermission "attachVirtualMachine";
      permission java.net.SocketPermission "*", "accept,resolve";};

  4. Restart WAS for the modification to take effect.


Parent Installation