Grant Directive

Nested Elements

Element Occurance Description
permission 0..n The permission descriptor.
certificates 0..1 The certificates descriptor. In this nested element, one can list the certificates required for the code sources. Either X.509 or PKCS#7 certificates.

Description

The Grant is somewhat similar to the standard Java Security policy files, except that it is assigned per container instead of for the code loading location. This allow for sharing central repositories of code, without necessary giving all the same level of security within a system.

Example XML

  <grant>
    <permission class="java.lang.RuntimePermission" name="getClassLoader" />
    <permission class="java.util.PropertyPermission" name="java.*" >
      <action>read</action>
    </permission>
    <permission class="java.util.FilePermission" name="com.mycompany.*" >
      <action>read</action>
      <action>write</action>
    </permission>
  </grant>