Java 2 security uses several policy files to determine the granted permission for each Java program. See Java 2 security policy files for the list of available policy files supported by WebSphere Application Server Version 6.0.x.
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.
Important: Do not place the codebase keyword or any other keyword after the filterMask and runtimeFilterMask keywords. The Signed By and the Java Authentication and Authorization Service (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 Java Virtual Machine (JVM) system property, java.security.auth.policy. You can statically set the authorization policy files in java.security.auth.policy with auth.policy.url.n=URL where URL is the location of the authorization policy.
ResultThe updated spi.policy is applied to the SPI libraries after the Java process is restarted.
Examplespi.policyresources.xmlspi.policyresources.xmljava.policyspi.policyspi.policy
The spi.policy file supplied by WebSphere Application Server resides at profile_root/config/cells/cell_name/nodes/node/spi.policy. It contains the following default permission:
grant {
permission java.security.AllPermission;
};
Related concepts
Java 2 security policy files
Related tasks
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