Configure spi.policy files

Java 2 security uses several policy files to determine the granted permission for each Java program. See Dynamic policy for the list of available policy files supported by WAS v5.

Since the default permissions for Service Provider Interface (SPI) is AllPermission, the only reason to update the spi.policy file is a restricted SPI permission. When a change in the spi.policy is required, complete the following steps.

Syntax errors in the policy files cause the application server to fail. Edit these policy files carefully.

Note that Do not place the codebase keyword or any other keyword after the filterMask and runtimeFilterMask keywords. The Signed By and the JAAS Principal keywords are not supported in the spi.policy file. The Signed By keyword is supported in the following policy files: java.policy, server.policy, and client.policy. The JAAS Principal keyword is supported in a JAAS policy file that is specified by the JVM system property, You can statically set the authorization policy files in with auth.policy.url.n=URL where URL is the location of the authorization policy.

  1. Modify the spi.policy file with the Policy Tool.

The updated spi.policy is applied to the SPI libraries after the Java process is cycled.


Usage Scenario


The spi.policy file supplied by WAS resides at $WAS_HOME/config/cells/cell/nodes/node/spi.policy. It contains the following default permission...

grant {

Restart the related Java processes for the changes in the spi.policy file to become effective.


See Also

Java 2 security policy files
Configuring the was.policy file
Configuring server.policy files
Configuring java.policy files
Using PolicyTool to edit policy files
Adding the was.policy file to applications