WebSphere

 

Portal Express, Version 6.0
Operating systems: i5/OS, Linux, Windows

 

Use Java 2 security with WebSphere Portal Express

Java 2 (J2SE) security provides a policy-based, fine-grain access control mechanism that increases overall system integrity by checking for permissions before allowing access to certain protected system resources. J2SE security allows you to set up individual policy files that control the privileges assigned to individual code sources.

If the code does not have the required permissions and still tries to execute a protected operation, a corresponding security exception will be thrown by the Java Access Controller.

The assignment of individual permissions to individual code sources is done via policy files. The syntax and semantics of those files is defined in the Java Language Specification. WebSphere Application Server uses a specific set of policy files to set up Java 2 Security. Refer to the WebSphere Application Server information center for a complete discussion of all policy files used by WebSphere Application Server.

The following table contains information on the policy files and their protection scope:

File Default Location Description
java.policy

app_server_root/java/jre/lib/security/java.policy

Root policy file containing permissions for all the processes launched by WebSphere Application Server.
server.policy WebSphere Application Server:

was_profile_root/properties/server.policy

Default permissions granted to all product servers.
client.policy WebSphere Application Server:

was_profile_root/properties/client.policy

Default permissions for all of the product client containers and applets on a node.
spi.policy WebSphere Application Server:

was_profile_root/config/cells/cell/nodes/node/spi.policy

This template is for the Service Provider Interface (SPI) or the third party resources that are embedded in the product. The default permission is java.security.AllPermissions.
library.policy WebSphere Application Server:

was_profile_root/config/cells/cell/nodes/node/library.policy

Default permissions (empty) granted to code contained in the shared library (Java library classes) to use in multiple product applications.
app.policy WebSphere Application Server:

was_profile_root/config/cells/cell/nodes/node/app.policy

Default permissions granted to all enterprise applications running on this node, in this cell.
was.policy Installed EAR: was_profile_root/config/cells/cell/applications/ear_file_name/deployments/application_name/META-INF/was.policy Permissions assigned to a specific enterprise application, and imbedded within EAR:/META-INF/was.policy.
ra.xml rar_file_name/META-INF/was.policy.RAR This file can have a permission specification that is defined in the ra.xml file. The ra.xml file is embedded in the RAR file.

All WebSphere Portal Express code has the java.security.AllPermission specified in the server.policy file and all was.policy files that ship with the product. doPrivileged() calls are introduced into the portlet API to provide a portlet sandbox.

Java 2 security can be enabled/disabled using the WebSphere Application Server administration facilities. Java 2 security is independent from J2EE security so you can enable Java 2 security independently from enabling Global Security on the server profile. Enabling Java 2 security will decrease overall system performance to some degree.

 

Parent topic:

Keeping your environment secure

 

Java 2 Security in the WebSphere Application Server information center
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/csec_rsecmgr2.html

 

Java 2 Platform Security
http://java.sun.com/j2se/1.3/docs/guide/security/index.html