Planning to secure your environment

 

Planning to secure your environment

When you access information on the Internet, you connect through Web servers and product servers, to the enterprise data at the back-end. This section examines some typical configurations and common security practices. WebSphere Application Server security is built on a layered security architecture as showed in the following figure. This section also examines the security protection that is offered by each security layer and common security practice for good quality of protection in end-to-end security. The following figure illustrates the building blocks that comprise the operating environment for
security within WebSphere Application Server:

WebSphere Application Server Network Deployment installation : The following figure shows a typical multiple-tier business computing environment for a WebSphere Application Server Network Deployment installation.

Important: There is a node agent instance on every computer node.

Each product application server consists of a Web container, an EJB container, and the administrative subsystem.

The WebSphere Application Server deployment manager contains only WebSphere administrative code and the administrative console.

The administrative console is a special J2EE Web application that provides the interface for performing administrative functions. WebSphere Application Server configuration data is stored in XML descriptor files, which must be protected by operating system security. Passwords and other sensitive configuration data can be modified using the administrative console. However, protect these passwords and sensitive data. For more information, see Protecting plain text passwords.

The
administrative console Web application has a setup data constraint that requires the administrative console servlets and JSP files to be accessed only through an SSL connection when global security is enabled. After installation, the administrative console HTTPS port is configured to use DummyServerKeyFile.jks and DummyServerTrustFile.jks with the default self-signed certificate. Using the dummy key and trust store certificate is not safe and you need to generate your own certificate to replace dummy ones immediately. It is more secure if you first enable global security and complete other configuration tasks after global security is enforced. For more information, see Changing the default Secure Sockets Layer keystore and truststore files.

Figure 1. Multiple-tier business computing environment.

Global and administrative security :

WebSphere Application Servers interact with each other through CSIv2 and Secure Authentication Services (SAS) security protocols as well as the HTTP and HTTPS protocols.

You can configure these protocols to use Secure Sockets Layer (SSL) when you enable WebSphere Application Server global security. The WebSphere Application Server administrative subsystem in every server uses Simple Object Access Protocol (SOAP) Java Management Extensions (JMX) connectors and Remote Method Invocation over the Internet Inter-ORB Protocol (RMI/IIOP) JMX connectors to pass administrative commands and configuration data. When global security is disabled, the SOAP JMX connector uses the HTTP protocol and the RMI/IIOP connector uses the TCP/IP protocol. When
global security is enabled, the SOAP JMX connector always uses the HTTPS protocol. When global security is enabled, you can configure the RMI/IIOP JMX connector to either use SSL or to use TCP/IP. IBM recommends that you enable global
security and enable SSL to protect the sensitive configuration data.

Global security and administrative security configuration is at the cell level.

When global security is enabled, you can disable application security at each individual application server by clearing the Enable global security option on the global security panel. The global security panel is accessed through the administrative console by clicking Security > Global security . Disabling application server
security does not affect the administrative subsystem in that application server, which is controlled by the global security configuration only. Both administrative subsystem and application code in an application server share the optional per server security protocol configuration. For more information, see Configuring server security.

Security for J2EE resources : Security for J2EE resources is provided by the Web container and the EJB container. Each container provides two kinds of security: declarative security and programmatic security.

In declarative security,
an application security structure includes network message integrity and confidentiality, authentication requirements, security roles, and access control. Access control is expressed in a form that is external to the application. In particular, the deployment descriptor is the primary vehicle for declarative security in the J2EE platform. WebSphere Application Server maintains J2EE security policy, including information derived from the deployment descriptor and specified by deployers and administrators in a set of XML descriptor files. At run time, the container uses the security policy that is defined in the XML descriptor files to enforce data constraints and access control.

When declarative
security alone is not sufficient to express the security model of an application, you might use Programmatic login to make access decisions. When global security is enabled and application server
security is not disabled at the server level, J2EE applications security is enforced. When the security policy is specified for a Web resource, the Web container performs access control when the resource is requested by a Web client. The Web container challenges the Web client for authentication data if none is present according to the specified authentication method, ensures the data constraints are met, and determines whether the authenticated user has the required security role. The Web security collaborator enforces role-based access control by using an access manager implementation. An access manager makes authorization decisions that are based on security policy derived from the deployment descriptor. An authenticated user principal can access the requested servlet or JavaServer Pages (JSP) file if it has one of the required
security roles. Servlets and JSP pages can use the HttpServletRequest methods isUserInRole and getUserPrincipal.

When global security is enabled and application server security is not disabled, the EJB container enforces access control on EJB method invocation.

The authentication takes place regardless of whether method permission is defined for the specific EJB method. The EJB security collaborator enforces role-based access control by using an access manager implementation. An access manager makes authorization decisions that are based on security policy derived from the deployment descriptor. An authenticated user principal can access the requested EJB method if it has one of the required security roles. EJB code can use the EJBContext methods isCallerInRole and getCallerPrincipal. Use the J2EE role-based access control to protect valuable business data from access by unauthorized users from both the Internet and the intranet. Refer to Securing Web applications using an assembly tool and Securing enterprise bean applications . Role-based security : WebSphere Application Server extends the security, role-based access control to administrative resources including the JMX system management subsystem, user registries, and JNDI name space. WebSphere administrative subsystem defines four administrative security roles:

Monitor role

A monitor can view the configuration information and status, but cannot make any changes.

Operator role

An operator can trigger run-time state changes, such as start an application server or stop an application, but cannot make configuration changes.

Configurator role

A configurator can modify the configuration information, but cannot change the state of the run time.

Administrator role

An operator as well as a configurator, which additionally can modify sensitive
security configuration and security policy such as setting server ID and password, enable or disable global security and Java 2 security, and map users and groups to the administrator role.

A user with the configurator role can perform most administrative work including installing new applications and application servers. There are certain configuration tasks a configurator does not have sufficient authority to do when global security is enabled, including modifying a WebSphere Application Server identity and password, LTPA password and keys, and assigning users to administrative security roles.

Those sensitive configuration tasks require the administrative role because the server ID is mapped to the administrator role.

WebSphere Application Server administrative security is enforced when global security is enabled. IBM recommends that WebSphere Application Server global security be enabled to protect administrative subsystem integrity. Application server
security can be selectively disabled if there is no sensitive information to protect. For securing administrative security, refer to Assigning users to administrator roles and Assigning users and groups to roles.

Java 2 security permissions : WebSphere Application Server uses the Java 2 security model to create a secure environment to run application code. Java 2 security provides a fine-grained and policy-based access control to protect system resources such as files, system properties, opening socket connections, loading libraries, and so on. The J2EE Version 1.4 specification defines a typical set of Java 2 security permissions that Web and EJB components expect to have. These permissions are shown in the following table.

Table 1. J2EE security permissions set for Web components
Security Permission Target Action
java.lang.RuntimePermission loadLibrary  
java.lang.RuntimePermission queuePrintJob  
java.net.SocketPermission * connect
java.io.FilePermission * read, write
java.util.PropertyPermission * read

Table 1. J2EE security permissions set for EJB components
Security Permission Target Action
java.lang.RuntimePermission queuePrintJob  
java.net.SocketPermission * connect
java.util.PropertyPermission * read
The WebSphere Application Server Java 2 security default policies are based on the J2EE Version 1.4 specification. The specification granted Web components read and write file access permission to any file in the file system, which might be too broad. The WebSphere Application Server default policy gives Web components read and write permission to the subdirectory and the subtree where the Web module is installed. The default Java 2 security policy for all Java virtual machines and WebSphere Application Server processes are contained in the following policy files:

/QIBM/ProdData/Java400/jdk14/lib/security/java.policy

Used as the default policy for the Java virtual machine (JVM) on iSeries (OS/400).

${java.home}/jre/lib/security/java.policy

Used as the default policy for the Java virtual machine (JVM).

${USER_INSTALL_ROOT}/properties/server.policy

Used as the default policy for all product server processes
To simplify policy management, WebSphere Application Server policy is based on resource type rather than code base (location). The following files are the default policy files for WebSphere Application Server subsystem. These policy files, which are an extension of WebSphere Application Server run time and are referred to as Service Provider Programming Interfaces (SPI), are shared by multiple J2EE applications:

profile_root/config/cells/cell_name/nodes/node/spi.policy

Used for embedded resources defined in the resources.xml file, such as the Java Message Service (JMS), JavaMail, and JDBC drivers.

profile_root/config/cells/cell_name/nodes/node/library.policy

Used by the shared library that is defined by the WebSphere Application Server administrative console.

profile_root/config/cells/cell_name/nodes/node/app.policy

Used as the default policy for J2EE applications.
In general, applications should not require more permissions to run than those recommended by the J2EE specification to be portable among various application servers. However, some applications might require more permissions. WebSphere Application Server supports a per application policy file, was.policy, to be packaged together with each application from granting extra permissions to that application.

Attention: Grant extra permissions to an application after careful consideration because of the potential of compromising the system integrity.

Loading libraries into the WebSphere Application Server does allow applications to leave the Java sandbox. When you install an application for WebSphere Application Server, the server uses a permission filtering policy file to alert you when an application requires additional permissions and causes the affected application installation to fail. For example, it is recommended that you not give the java.lang.RuntimePermission exitVM permission to an application so that application code cannot terminate WebSphere Application Server. The filtering policy is defined by the filterMask in profile_root/config/cells/cell_name/filter.policy. Moreover, WebSphere Application Server also performs run-time permission filtering that is based on the run-time filtering policy to ensure that application code is not granted a permission that is considered harmful to system integrity.

Therefore, many applications developed for prior releases of WebSphere Application Server might not be Java 2 Security ready. To migrate those applications to WebSphere Application Server Version 6.0.x quickly, you might temporarily give those applications java.security.AllPermission in the was.policy file. IBM recommends that you test those applications to ensure that they execute in an environment where Java 2 Security is active. For example, identity what extra permissions, if any, are required and to grant only those permissions to a particular application. Not granting applications AllPermission can certainly reduce the risk of compromising system integrity. For more information on migrating applications to WebSphere Application Server Version 6.0.x, refer to Migrating Java 2 security policy.

The WebSphere Application Server run time uses Java 2 Security to protect sensitive run-time functions; therefore, it is recommended that you enforce Java 2 security. Applications that are granted AllPermission not only have access to sensitive system resources, but also WebSphere Application Server run-time resources and can potentially cause damage to both. In cases where an application can be trusted to be safe, WebSphere Application Server allows Java 2 Security to be disabled on a per application server basis. You can enforce Java 2
security by default in the security center and disable the per application server Java 2 Security flag to disable it at the particular application server. When you specify the Enable global security and Enable Java 2 Security options on the Global security panel of the administrative console, the information, along with other sensitive configuration data, are stored in a set of XML configuration files. Both role-based access control and Java 2 Security permission-based access control are employed to protect the integrity of the configuration data. The example uses configuration data protection to illustrate how system integrity is maintained.

Other Runtime resources : Other WebSphere Application Server run time resources are protected by a similar mechanism as described previously. It is very important to enable WebSphere Application Server global security and to enforce Java 2 Security. J2EE Specification defines several authentication methods for Web components: HTTP Basic Authentication, Form-Based Authentication, and HTTPS Client Certificate Authentication. When you use client certificate login, it is more convenient for the browser client if the Web resources have integral or confidential data constraint. If a browser uses HTTP to access the Web resource, the Web container automatically redirects the browser to the HTTPS port. The CSIv2 security protocol also supports client certificate authentication. You can also use SSL client authentication to set up secure communication among a selected set of servers based on a trust relationship. If you start from the WebSphere Application Server plug-in at the Web server, you can configure SSL mutual authentication between it and the WebSphere Application Server HTTPS server. When using a self-signed certificate, you can restrict the WebSphere Application Server plug-in to communicate with only the selected two WebSphere Application Server servers as shown in the following figure. Suppose you want to restrict the HTTPS server in WebSphere Application Server A and in WebSphere Application Server B to accept secure socket connections only from the WebSphere Application Server plug-in W . You can generate three self-signed certificates using the IKEYMAN and the certificate management utilities. For example, use certificate W and trust certificate A and B. The HTTPS server of WebSphere Application Server A is configured to use certificate A and to trust certificate W. The HTTPS server of WebSphere Application Server B is configured to use certificate B and to trust certificate W . For more information on IKEYMAN, refer to Starting the key management utility (iKeyman).

If you start from the WebSphere Application Server plug-in at the Web server, SSL mutual authentication can be configured between it and the WebSphere Application Server HTTPS server. When using self signed certificates, one can restrict the WebSphere Application Server plug-in to communicate with only the selected two WebSphere Application Server servers as shown in the following picture. Suppose you want to restrict the HTTPS server in WebSphere Application Server A and in WebSphere Application Server B to accept secure socket connections only from WebSphere Application Server plug-in W. The trust relationship depicted in the previous picture is shown in the following table.

Server Key Trust
WebSphere Application Server plug-in W A, B
WebSphere Application Server A A W
WebSphere Application Server B B W
In a Network Deployment installation, the WebSphere Application Server Deployment Manager is a central point of administration. System management commands are sent from the Deployment Manager to each individual application server. When global security is enabled, you can configure the WebSphere Application Servers to require SSL and mutual authentication. Suppose you want to further restrict WebSphere Application Server A so that it can communicate with WebSphere Application Server C only and WebSphere Application Server B can communicate with WebSphere Application Server D only.

Attention: As mentioned previously, all WebSphere Application Servers must be able to communicate with WebSphere Application Server Deployment Manager E ; therefore, when using self-signed certificates, you might configure the CSIv2 and SOAP/HTTPS Key and trust relationship, as shown in the following table.

Server Key Trust
WebSphere Application Server Server A A C, E
WebSphere Application Server Server B B D, E
WebSphere Application Server Server C C A, E
WebSphere Application Server Server D D B, E
WebSphere Application Server Deployment Manager E E A, B, C, D

When WebSphere Application Server is configured to use an Lightweight Directory Access Protocol (LDAP) user registry, you also can configure SSL with mutual authentication between every application server and the LDAP server with self-signed certificate so that a password is not passed in clear text from WebSphere Application Server to the LDAP server.

In this example, the
node agent processes are not discussed. Each node agent must communicate with
application servers on the same node and with the Deployment Manager. Node agents also must communicate with LDAP servers when they are configured to use an LDAP user registry. It is reasonable to let the deployment manager and the node agents use the same certificate. Suppose application server A and C are on the same computer node. The Node agent on that node needs to have certificates A and C in its trust store. WebSphere Application Server does not provide a user registry configuration or management utility. In addition, it does not dictate the user registry password policy. IBM recommends that you use the password policy recommended by your user registry, including the password length and expiration period.

  1. Determine which versions of WebSphere Application Server you are using.

  2. Review the WebSphere Application Server security architecture.

  3. Review each of the following topics as also defined in Related reference.




Sub-topics
Security considerations when adding a Base Application Server node to Network Deployment
Creating login key files
Preparing truststore files
Configuring the application server for interoperability

Related concepts
Programmatic login

Related tasks
Assigning users to administrator roles
Assigning users to naming roles