Configure the was.policy file

Java 2 Security uses several policy files to determine the granted permission for each Java program. The was.policy file is a application-specific policy file for an enterprise application. It is embedded in the EAR file (META-INF/was.policy).

Note: The Signed By and the Java Authentication and Authorization Service (JAAS) principal keywords are not supported in the was.policy file. However, the Signed By keyword is supported in the following policy files: java.policy and server.policy. The JAAS principal keyword is supported in a JAAS policy file when it 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 n is an integer and URL is the location of the authorization policy.

The union of the permission contained in the java.policy file, server.policy file, the app.policy file, the application's was.policy file, and the permission specification of ra.xml file are applied to the enterprise application.

If the default permissions for enterprise application are enough, no action is required. If an application must access a specific resource, you may need to update the was.policy file. Note that syntax errors in the policy file may cause the application server to fail to start.

To create or update the was.policy file for your application, See Create and edit policy files with the policy tool. After you have created the was.policy file, you must add it to your application. See Add the was.policy file to applications for more information.

Restart your enterprise application for the changes to take effect.