Skip Headers

Oracle9i Application Server Best Practices
Release 2 (9.0.3)

Part Number B10578-02
Go To Documentation Library
Core
Go To Product List
Platform
Go To Table Of Contents
Contents

Go to previous page Go to next page

9
Security Best Practices

This chapter describes security best practices. The topics include:

9.1 General Best Practices

This section describes general best practices. The topics include:

9.1.1 Best Practices for HTTPS Use

The following are recommended for using HTTPS with Oracle9iAS:

If secure pages are composed of many GIF, JPEG, or other files that would be displayed on the same screen, it is probably not worth the effort to segregate secure from non-secure static content. The SSL key exchange (a major consumer of CPU cycles) is likely to be called exactly once in any case, and the overhead of bulk encryption is not that high.

9.1.2 Assign Lowest Level Privileges Adequate for the Task

When assigning privileges to module(s), use the lowest levels adequate to perform the module(s) function(s). This is essentially "fault containment" which means if security is compromised, it is contained within a small area of the network and cannot invade the entire intranet.

9.1.3 Best Practices for Cookie Security

Use the following as guidelines for cookies:

9.1.4 Best Practices in Systems Setup

Use the following as guidelines for system setup:

9.1.5 Best Practices for Certificates Use

Use the following guidelines when using certificates:

9.1.6 Review Code and Content Against Already Known Attacks

It is quite common for viruses or known attacks to resurface in slightly altered shape or form. Thus, just because a threat has been apparently eliminated does not mean it won't resurface. Use the following as guidelines to minimize the recurrence of the threat:

9.1.7 Follow "Common Sense" Firewall Practices

The following are some common recommended practices pertaining to firewalls.

While not unique to Oracle9iAS, these are important to overall Oracle9iAS security.

9.1.8 Leverage Declarative Security

Oracle HTTP Server has several features that provide security to an application without requiring the application to be modified. These should be leveraged and/or evaluated before programming similar functionality as those features into the application. Specifically:

These three features should be leveraged heavily before designing any application specific security mechanisms.

9.1.9 Use the Oracle Integrated Version of JAAS

Oracle9iAS provides a J2EE compliant version of JAAS. One can use the infrastructure provided by Sun for configuring and managing users, roles and privileges or one can use JAAS integrated with Oracle9iAS Single Sign-On and Oracle Internet Directory infrastructure. The latter is better integrated with the rest of the Oracle infrastructure and results in less programming, better manageability, and more control than the standard offering. In addition, use of the Oracle infrastructure can greatly improve the scalability, failover, and management by substituting Oracle Internet Directory and other Oracle infrastructure for the text file administration of the standard offering.

9.1.10 Use Switched Connections in DMZ

It is recommended that all DMZ attached devices be connected by switched, not bussed connections. Furthermore, devices such as the Cisco 11000 series devices, which can provide IP, port, and protocol rules between each pair of connected devices are preferred.

9.1.11 Place Application Server in the DMZ

Application servers should be in the DMZ. In this architecture Oracle9iAS Web Cache only forwards requests to boxes containing Web servers; Web servers only forward requests to application servers (or via PL/SQL to database servers); application servers only forward inward requests to the database or, perhaps, special message processing processors in the intranet. This provides excellent fault containment because, except for PL/SQL which has special security, a compromised Web server must somehow compromise an application server before the database can be attacked - a very difficult and improbable situation.

9.1.12 Tune the SSL SessionCacheTimeout Directive if You Are Using SSL

The Apache server in Oracle9iAS caches a client's SSL session information by default. With session caching, only the first connection to the server incurs high latency.

In a simple test to connect and disconnect to an SSL-enabled server, the elapsed time for 5 connections was 11.4 seconds without SSL session caching as opposed to 1.9 seconds when session caching was enabled.

The default SSLSessionCacheTimeout is 300 seconds. Note that the duration of a SSL session is unrelated to the use of HTTP persistent connections. You can change the SSLSessionCacheTimeout directive in httpd.conf file to meet your application needs.

9.2 OC4J Security Best Practices

This section describes OC4J security best practices. The topics include:

9.2.1 Use the Oracle9iAS JAAS Provider for OC4J User Management in Place of principals.xml

In the earlier releases of Oracle9iAS, the J2EE application server component stored all user information in a file called principals.xml (including storing passwords in cleartext). The Oracle9iAS JAAS Provider provides a similar simple security model as a default without storing passwords in cleartext. However, it also provides tight integration with Oracle9iAS Infrastructure (including Oracle9iAS Single Sign-On and Oracle Internet Directory) out of the box. Hence, we strongly recommend that you leverage the Oracle9iAS JAAS Provider for J2EE security in OC4J.

9.2.2 Avoid Writing Custom User Managers and Instead Extend the JAAS Provider, Oracle9iAS Single Sign-On, and Oracle Internet Directory

The OC4J container continues to provide several methods and levels of extending security providers. Although the UserManager class can be extended to build a custom user manager, leveraging the rich functionality provided by the JAAS Provider, Oracle9iAS Single Sign-On, and Oracle Internet Directory will allow developers more time to focus on actual business logic instead of infrastructure code. Both Oracle9iAS Single Sign-On and Oracle Internet Directory provide APIs to integrate with external authentication servers and directories respectively.

9.2.3 Use Oracle9iAS Single Sign-On as the Authentication Mechanism with the JAAS Provider

Oracle9iAS JAAS Provider allows different authentication options. However, Oracle strongly recommends leveraging the Oracle9iAS Single Sign-On server whenever possible for the following reasons:

  1. It is the default mechanism for most Oracle9iAS components such as Portal, Forms, Reports, Wireless etc.

  2. It is easy to setup in a declarative fashion and does not require any custom programming.

  3. It provides a seamless way for PKI integration.

9.2.4 Use the JAAS Provider's Declarative Features to Reduce Programming

Since most of the features in the Oracle9iAS JAAS Provider are controlled declaratively, particularly in the area of authentication, their setup can be postponed until deployment time. This not only reduces the programming tasks for integrating a JAAS based application, it also enables the deployer to control the same J2EE application via his/her environment-specific security models.

9.2.5 Use Fine-Grained Access Control Provided by the JAAS Provider and the Java Permission Model

Unlike the "coarse-grained" J2EE authorization model as it exists today, the JAAS Provider integrated with OC4J allows any protected resource to be modeled using Java permissions. The Java permission model (and associated Permission class) is extensible and allows a flexible way to define fine-grained access control.

9.2.6 Use Oracle Internet Directory as the Central Repository for the JAAS Provider in Production Environments

Although the JAAS Provider supports a flat-file XML-based repository useful for development and testing environments, it should be configured to use Oracle Internet Directory for production environments. Oracle Internet Directory provides LDAP standard features for modeling administrative metadata and is built on the Oracle database platform inheriting all of the database properties of scalability, reliability, manageability, and performance.

9.2.7 Take Advantage of the Authorization Features of the JAAS Provider

In addition to the authorization functionality defined in the JAAS 1.0 specification, the Oracle9iAS JAAS Provider supports:

Both of these extensions allow a more scalable and manageable framework for security policies covering a large user population.

9.3 Oracle9iAS Single Sign-On Best Practices

This section describes Oracle9iAS Single Sign-On best practices. The topics include:

9.3.1 Oracle9iAS Single Sign-On Servers Should Be Configured for High Availability

Single sign-on failure is catastrophic since it means no single sign-on protected application can be accessed. Two recommendations for high availability of Oracle9iAS Single Sign-On are:

  1. Carefully consider inclusion of any other types of processing on the single sign-on servers since this can make instability more likely.

  2. Consider deploying multiple single sign-on servers fronted by load balancing hardware to protect against failures in single sign-on listeners. In this case, the address of the load balancer is used as the single sign-on address and the single sign-on listener configuration information is replicated. It is also recommended that the database be Real Application Cluster (RAC) configured for additional improvements in availability. Configuration details for multiple single sign-on servers can be found in the Oracle Technology Network.

9.3.2 Leverage Oracle9iAS Single Sign-On Whenever Possible

Oracle9iAS Single Sign-On should be used as the primary point of security. This is a benefit administratively and a major convenience to application customers. Also, Oracle9iAS Single Sign-On is well integrated with the rest of Oracle infrastructure and can, via Oracle Internet Directory and other means, be integrated with non-Oracle application and infrastructure. Also, as single sign-on becomes a single point for authentication, opportunities to attack the multiple authentication entities of sites today are reduced. Finally, single sign-on's single authenticated user for all applications allows better control for more uniform authorization.

9.3.3 Have an Enterprise-Wide Directory in Place

In order to deploy an effective single sign-on solution, the user population must be centralized in a directory, preferably an LDAP-based directory such as Oracle Internet Directory. Having users represented in multiple systems (e.g. in multiple Windows NT domains) makes setting up the infrastructure for a common identity more difficult. In addition, clearly defining and automating the user provisioning process makes managing the single sign-on environment much easier.

9.3.4 Always Use Oracle9iAS Single Sign-On Instead of Writing Custom Authentication Logic

Oracle9iAS Single Sign-On provides the infrastructure to validate credentials and allows for various different authentication mechanisms such as username/password, X.509 certificates. Moreover, since these can be shared across different applications and web sites, end users do not have to create a new username/password for each different corporate application.

9.3.5 For Devloping Single Sign-on Enabled Applications, Use mod_osso and Not the Single Sign-on SDK

Oracle9iAS Single Sign-On provides an SDK, which can be leveraged to develop a partner application. This SDK was commonly used in earlier releases of Oracle9iAS. However, beginning in Release 2, all of the common usage patterns have been embodied in a new Oracle HTTP Server module, mod_osso, that requires significantly less programming than the SDK. By single sign-on enabling an application with mod_osso, the application will automatically get future enhancements without changing any code.

9.3.6 Always Use SSL with Oracle9iAS

The Oracle9iAS Single Sign-On server simplifies user interaction by providing a mechanism to have a single username and password that can be used by multiple partner applications. However, with this ease, comes the caution that the single sign-on server should always be accessed in the correct fashion; a breach of the common password can now put all the partner applications at risk. Hence, the single sign-on server should always be configured to allow connections in SSL mode only. This protects the end user's credentials going across the wire. Applications where security and data confidentiality is important should also be protected by SSL. From a performance perspective, use of SSL hardware accelerators is recommended.

9.3.7 Train Users to be Wary of Providing Their Oracle9iAS Single Sign-On Username and Password Anywhere Other Than Through the Oracle9iAS Single Sign-On URL

The Oracle9iAS Single Sign-On server provides a standard login screen. This login page is serviced from the single sign-on server machine, which is typically a different machine from the one the end user is trying to access. Thus, it is critical that before the end user enters her login and password, she ensures that she is at a valid single sign-on screen that looks the same as it always has - from a valid login server computer. This prevents users from unknowingly providing their username/password to inappropriate servers.

9.3.8 Train Users to Log Out So the Cookie Does Not Remain Active

This is generic and not really single sign-on specific, but it is of particular importance when leveraging single sign-on. Most users do not log out of Internet applications and this creates problems at two levels:

  1. A security risk - since someone else walking to the station can now reuse the cookie. Also, since the session remains valid until it times out, a hacker from another machine has a longer time window to guess the session id/cookie value.

  2. The system resources on the server associated with the cookie are not released until the session is ended or invalidated.

For application developers and administrators, single sign-on session duration and inactivity timeouts should be configured appropriately (for example, one hour inactivity timeouts for sensitive applications).

For external apps, single sign-on cannot logout users from external apps - so closing all browser windows is important in this case.


Go to previous page Go to next page
Oracle
Copyright © 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Core
Go To Product List
Platform
Go To Table Of Contents
Contents