![]() |
![]() |
e-docs > WebLogic Server > Securing a Production Environment > Ensuring the Security of Your Production Environment |
Securing a Production Environment
|
Ensuring the Security of Your Production Environment
BEA recommends that you implement the following actions to ensure the security of your production environment:
Securing the WebLogic Server Host
A WebLogic Server production environment is only as secure as the security of the machine on which it is running. Therefore, it is important that you lock down the physical machine, the operating system, and all other software that is installed on the host machine. The following are suggestions for locking down a WebLogic Server host in a production environment. Also check with the manufacturer of the machine and operating system for recommended security measures.
Keep your hardware in a secured area to prevent unauthorized users from tampering with the deployment machine or its network connections. |
|
Secure networking services that the operating system provides. |
Have an expert review network services such as the e-mail program or directory service to ensure that a malicious attacker cannot access the operating system or system-level commands. Avoid sharing file systems with other machines in the enterprise network. |
Make sure that the file system on each WebLogic Server host can prevent unauthorized access to protected resources. For example, on a Windows computer, use only NTFS. |
|
Avoid creating more user accounts than you need on WebLogic Server hosts, and limit the file access privileges granted to each account. Ideally, the host machine would have two user accounts with system administrator privileges and one user with sufficient privileges to run WebLogic Server. Review active user accounts regularly and when personnel leave. Background Information: |
|
Create no fewer than two user accounts with system administrator privileges. |
One of the system administrator users should be created when the domain is created. You can create the other user(s). Having at least two system administrator user accounts ensures that one user maintains account access in case another user becomes locked out by a dictionary attack. |
For your system administrator user accounts, choose names that are not obvious. |
For additional security, avoid choosing an obvious name such as "system", "admin", or "administrator" for your system administrator user accounts. |
The passwords for user accounts on production machines should be difficult to guess and should be guarded carefully. |
|
On each host computer, give only one user account access to WebLogic resources. |
On each WebLogic Server host computer, use the operating system to establish a special user account (for example, wls_owner) specifically to run WebLogic Server. Grant to this operating-system (OS) user account the following privileges:
No other OS user should have read, write, or execute access to BEA files and your domain files. This protection limits the ability of other applications executing on the same machine as WebLogic Server to access BEA files and your domain files. Without this protection, some other application could gain write access and insert malicious, executable code in JSPs and other files that provide dynamic content. The code would be executed the next time the file was served to a client. |
Run WebLogic Server Windows services under the special OS user account. |
On the Windows platform, you can run a WebLogic Server instance as a Windows service. This causes the server instance to start automatically each time you boot the Windows computer. To set up a WebLogic Server instance to run as a Windows service, you must log in to the Windows computer with a user account that has privileges to modify the Windows registry. For more information, refer to "Setting Up a WebLogic Server Instance as a Windows Service" in the Administration Guide. You do not need these administrator-level privileges to run a WebLogic Server instance as a Windows service. Instead, the Windows service should run under the special OS user account that you created for running WebLogic Server. To ensure that the WebLogic Server instance runs under the special OS user account, provide the username and password on the Windows service's Properties page. For more information, refer to "Verifying the User Account Under Which the Service Runs" in the Administration Guide. |
To bind to protected ports on UNIX, configure WebLogic Server to switch user IDs or use Network Address Translation (NAT) software. |
On UNIX systems, only processes that run under a privileged user account (in most cases, root) can bind to ports lower than 1024. However, long-running processes like WebLogic Server should not run under these privileged accounts. Instead, you can do either of the following:
|
Develop first on a development machine and then move code to the production machine when it is completed and tested. This process prevents bugs in the development environment from affecting the security of the production environment. |
|
Do not install development and sample software on a production machine. |
Do not install development tools on production machines. Keeping development tools off of the production machine reduces the leverage intruders have should they get partial access to a WebLogic Server production machine. Do not install the WebLogic Server sample applications on a production machine. When the BEA installation program asks whether you want a Typical Installation or Custom Installation: |
If the operating system on which WebLogic Server runs supports security auditing of file and directory access, BEA recommends using audit logging to track any denied directory or file access violations. |
|
Consider using additional software to secure your operating system. |
Most operating systems can run additional software to secure a production environment. For example, an Intrusion Detection System (IDS) can detect attempts to modify the production environment. Refer to the vendor of your operating system for information about available software. |
Refer to the vendor of your operating system for a list of recommended service packs and security-related patches. |
|
Apply the latest BEA service packs and implement the latest security advisories. |
If you are responsible for security related issues at your site, register on the BEA Advisories & Notifications page at http://dev2dev.bea.com/advisories to receive notifications of newly available security advisories. Remedies recommended in the security advisories are posted on the Advisories & Notifications page. In addition, you are advised to apply each service pack as it is released. Service packs include a roll-up of all bug fixes for each version of the product, as well as each of the previously released service packs. You can download service packs from http://commerce.beasys.com/downloads. Report possible security issues in BEA products to secalert@bea.com. |
Do not run WebLogic Server in Development mode in a production environment. |
Production mode sets the server to run with settings that are more secure and appropriate for a production environment. |
When designing network connections, you balance the need for a security solution that is easy to manage with the need to protect strategic WebLogic resources. The following table describes options for securing your network connections.
A firewall limits traffic between two networks. Firewalls can be a combination of software and hardware, including routers and dedicated gateway machines. They employ filters that allow or disallow traffic to pass based on the protocol, the service requested, routing information, packet content, and the origin and destination hosts or networks.They can also limit access to authenticated users only. The WebLogic Security Service supports the use of third-party Identity Assertion providers, which perform perimeter-based authentication (Web server, firewall, VPN) and handle multiple security token types/protocols (SOAP, IIOP-CSIv2). For more information, refer to "Perimeter authentication" in Introduction to WebLogic Security. For more information about using firewalls with WebLogic Server, refer to "Security Options for Cluster Architectures" in Using WebLogic Server Clusters. |
|
Instead of, or in addition to, using hardware and third-party software to create firewalls, consider using WebLogic Server connection filters to limit network traffic based on protocols, IP addresses, and DNS node names. Connection filters are most appropriate when the machines in a WebLogic Server domain can access each other without going through a firewall. For example, you might use a firewall to limit traffic from outside the network, and then use WebLogic Server connection filters to limit traffic behind the firewall. See "Configuring Connection Filtering" in Managing WebLogic Security. |
|
Use a domain-wide Administration Port for administrative traffic. |
An Administration Port limits all administrative traffic between server instances in a WebLogic Server domain to a single port. When the server is run without an Adminstrative Port, an application can inadvertently transmit confidential server configuration on the wire in clear-text. Running the server with an Administration Port significantly reduces the chances of this happening. Furthermore, having an Administrative Port configured is helpful should a denial-of-service attack occur because the resources for handling requests for, and the limitations on Administration Port requests are separate from those of the rest of the server. When used in conjunction with a connection filter, you can specify that a WebLogic Server instance accepts administrative requests only from a known set of machines or subnets and only on a single port. Enabling the Administration Port requires clients to interact with the Administration Console using SSL which protects sensitive data from being sniffed on the wire by an attacker and protects against some cross site scripting attacks. You enable the domain wide Administration Port in the Administration Console on the DomainName See "Enabling the Domain-Wide Administration Port" in the Administration Console Online Help. |
The Administration channel must be enabled to ensure that inter-server administrative communication is secured. Without the Adminstration channel, some key administrative messages will be passed in clear-text allowing the capture, modification, deletion, and replay of messages. See "Configuring Network Resources" in Creating and Configuring WebLogic Server Domains. |
|
To protect the embedded LDAP port against brute force attacks, close off the embedded LDAP listen port using a connection filter in a single server configuration. While this does not protect the embedded LDAP port in a multiple server configuration, the built-in implementation supports filtering based on the source IP address which should be used to allow access only from servers that are part of the domain. As a result, only the machines in the domain can access the LDAP port. For more information on using connection filters, see "Using Network Connection Filters" in Programming WebLogic Security. |
Most Web applications use a database to store their data. Common databases used with WebLogic Server are Oracle, Microsoft SQL Server, and Informix. The databases frequently hold the Web application's sensitive data including customer lists, customer contact information, credit card information, and other proprietary data. When creating your Web application you must consider what data is going to be in the database and how secure you need to make that data. You also need to understand the security mechanisms provided by the manufacturer of the database and decide whether they are sufficient for your needs. If the mechanisms are not sufficient, you can use other security techniques to improve the security of the database, such as encrypting sensitive data before writing it to the database. For example, leave all customer data in the database in plain text except for the encrypted credit card information.
Securing the WebLogic Security Service
The WebLogic Security Service provides a powerful and flexible set of software tools for securing the subsystems and applications that run on a server instance. The following table provides a checklist of essential features that BEA recommends you use to secure your production environment.
Apply the latest BEA service packs and implement the latest security advisories. |
If you are responsible for security related issues at your site, register on the BEA Advisories & Notifications page at http://dev2dev.bea.com//advisories to receive notifications of newly available security advisories. Remedies recommended in our security advisories are posted on the Advisories & Notifications page. In addition, you are advised to apply each service pack as it is released. Service packs include a roll-up of all bug fixes for each version of the product, as well as each of the previously released service packs. Download service packs from http://commerce.beasys.com/downloads. Report possible security issues in BEA products to secalert@bea.com. |
Deploy production-ready security providers to the security realm. |
The WebLogic Security Service uses a pluggable architecture in which you can deploy multiple security providers, each of which handles a specific aspect of security. By default WebLogic Server includes its own security providers that provide a complete security solution. If you have purchased or written your own security providers:
Refer to "Customizing the Default Security Configuration" in Managing WebLogic Security. |
Use SSL, but do not use the demonstration identity and trust in a production environment. |
To prevent sensitive data from being compromised, secure data transfers by using the SSL and the HTTPS protocol (HTTP over the Secure Sockets Layer (SSL)) rather than the HTTP protocol. WebLogic Server includes a set of demonstration private keys, digital certificates, and trusted certificate authorities that are for development only. Everyone who downloads WebLogic Server has the private keys for these digital certificates. Do not use the demonstration identity and trust. Refer to "Configuring SSL" in Managing WebLogic Security. |
The version of WebLogic Server that you download supports 512-bit keys and 40-bit bulk encryption. If you want to use a version that supports maximum-strength encryption (1024-bit keys with 128-bit bulk encryption), contact your BEA sales representative. Because of export restrictions, this version of WebLogic Server is available only for customers in specific countries. |
|
Make sure that WebLogic Server enforces security constraints on digital certificates. |
When communicating via SSL, by default WebLogic Server rejects any digital certificates in a certificate chain that do not have the Basic Constraint extension defined by the Certificate Authority. This level of enforcement protects your Web site from the spoofing of digital certificates. Make sure that no server startup command includes the following option, which disables this enforcement: -Dweblogic.security.SSL.enforceConstraints=false This option could be located in a startup script, or, if you use the Node Manager to start Managed Servers, in the Administration Console on the Servers In your development environment, you might have disabled the enforcement of security constraints to work around incompatibilities with demonstration digital certificates that WebLogic Server provided in releases prior to 7.0 Service Pack 2. Make sure you enable this feature in your production environment. |
Verify that host name verification is enabled to avoid man-in-the-middle attacks. |
By default, the WebLogic SSL implementation validates that the host to which a connection is made is the intended or authorized party. However, during the implementation of WebLogic Server at your site, you might have disabled host name verification. You can ensure that a Hostname Verifier is being used with your WebLogic Server deployment by disabling the Hostname Verification Ignored setting. This setting is in the Administration Console on the Server s Background Information: |
Restrict the size and the time limit of requests to prevent denial of service attacks. |
To prevent some denial of service attacks, WebLogic Server can restrict the size of a message as well as the maximum time it takes a message to arrive. The default settings allow 2 gigabytes for the maximum message size and 480 seconds for the complete message timeout. You can configure these settings for the HTTP, T3, and IIOP protocols in the Administration Console on the Servers Background Information: To perpetrate a denial of service attack on a WebLogic Server instance, an intruder bombards the server with many requests that are very large, are slow to complete, or never complete so that the client stops sending data before completing the request. |
Configure user lockouts and login time limits to prevent attacks on user accounts. |
By default, the WebLogic Security Service provides maximum security against dictionary attacks of user accounts. If during development you changed the settings for the number of invalid login attempts required before locking the account, the time period in which invalid login attempts have to take place before locking the account, or the amount of time the user account is locked, review the settings and verify that they are adequate for your production environment. You verify or change these settings in the Administration Console on the Security Background Information: |
If you use multiple Authentication providers, set the JAAS control flag. |
If a security realm has multiple Authentication providers configured, configure the order and precedence of each provider by setting the JAAS control flags. You set the JAAS control flag in the Administration Console on the Security Refer to "Setting the JAAS Control Flag Attribute" in the Managing WebLogic Security guide. |
Auditing is the process of recording key security events in your WebLogic Server environment. When the Auditing provider that the WebLogic Security Service provides is enabled, it logs events in DomainName\DefaultAuditRecorder.log You enable an Auditing provider in the Administration Console on the Security For more information, refer to "Configuring a WebLogic Auditing Provider" in the Administration Console Online Help. Note: Using an Auditing provider might adversely affect the performance of WebLogic Server even if only a few events are logged. Review the auditing records periodically to detect security breaches and attempted breaches. Noting repeated failed logon attempts or a surprising pattern of security events can prevent serious problems. |
|
Ensure that you have correctly assigned users and groups to the default WebLogic Server security roles. |
By default, all WebLogic resources are protected by security policies that are based on a default set of security roles. Make sure you have assigned the desired set of users and groups to these default security roles. Refer to "Securing System Administration Operations" in WebLogic Server Administration Guide. |
Create no fewer than two user accounts with system administrator privileges. |
One of the system administrator users should be created when the domain is created. You can create the other user(s). Having at least two system administrator user accounts helps to ensure that one user maintains account access in case another user becomes locked out by a dictionary/brute force attack. |
Consider preventing WebLogic Server from sending its name and version number in HTTP responses. |
By default, when an instance of WebLogic Server responds to an HTTP request, its HTTP response header includes the server's name and WebLogic Server version number. This poses a potential security risk if an attacker knows about a vulnerability in the specific version of WebLogic Server. To prevent a WebLogic Server instance from sending its name and version number, disable the Send Server Header Enabled attribute in the Administration Console. The attribute is located on the Server |
Although most of the responsibility for securing the WebLogic resources in a WebLogic Server domain fall within the scope of the server, some security responsibilities that within the scope of individual applications. For some security options, the WebLogic Security Service enables you to determine whether the server or individual applications are responsible. For each application that you deploy in a production environment, review the items in the following table to verify that you have secured its resources.
Determine which technique secures your Web applications and EJBs. |
By default, each Web application and EJB uses deployment descriptors (XML files) to declare its secured resources and the security roles that can access the secured resources. Instead of declaring security in Web application and EJB deployment descriptors, you can use the Administration Console to set security policies that secure access to Web applications and EJBs. This technique provides a single, centralized location from which to manage security for all Web applications and EJBs. You can combine these two techniques and configure WebLogic Server to copy security configurations from existing deployment descriptors upon the initial deployment of a URL (Web) or EJB resource. Once these security configurations are copied, the Administration Console can be used for subsequent updates. Refer to "URL (Web) and EJB (Enterprise JavaBean) Resources" in Securing WebLogic Resources. |
Comments in JSP files that are not meant for the end user should use the JSP syntax of <%/* ... */%> instead of the HTML syntax <!-- ... -->. The JSP comments are deleted when the JSP is compiled and therefore cannot be viewed. |
|
Do not install uncompiled JSPs and other source code on the production machine. |
Always keep source code off of the production machine. Getting access to your source code allows an intruder to find security holes. Consider precompiling JSPs and installing only the compiled JSPs on the production machine. For information about precompiling JSPs, refer to "Precompiling JSPs" in Programming WebLogic JSP. |
Set the transport-guarantee to CONFIDENTIAL in the user-data-constraint element of the web.xml file. Refer to "security-constraint" in Developing Web Applications for WebLogic Server. |
|
BEA does not recommend using the Servlet servlet in a production environment. Instead, map servlets to URIs explicitly. Remove all existing mappings between WebLogic servlets and the Servlet servlet from all Web applications before using the applications in a production environment. For information on mapping servlets, refer to "Configuring Servlets" in Developing Web Applications for WebLogic Server. |
|
Do not leave FileServlet as the default servlet in a production environment. |
BEA does not recommend using the FileServlet servlet as the default servlet a production environment. For information on setting up a default servlet, refer to "Setting Up a Default Servlet" in Developing Web Applications for WebLogic Server. |
In WebLogic Server 7.0, security policies replace ACLs and answer the question "who has access" to a WebLogic resource. Make sure that you have not removed security policies from WebLogic resources, and make sure that your security role assignments provide users the kind of access that you intend. Refer to "Security Policies" in Securing WebLogic Resources. |
|
If your applications contain untrusted code, enable the Java security manager. |
The Java security manager defines and enforces permissions for classes that run within a JVM. In many cases, where the threat model does not include malicious code being run in the JVM, the Java security manager is unnecessary. However, when third-parties use WebLogic Server and unknown classes are being run, the Java security manager may be useful. To enable the Java security manager for a server instance, use the following Java options when starting the server: -Djava.security.manager Refer to "Using Java Security to Protect Server Resources" in Programming WebLogic Security. |
Replace HTML special characters when servlets or JSPs return user-supplied data. |
The ability to return user-supplied data can present a security vulnerability called cross-site scripting, which can be exploited to steal a user's security authorization. For a detailed description of cross-site scripting, refer to "Understanding Malicious Content Mitigation for Web Developers" (a CERT security advisory) at http://www.cert.org/tech_tips/malicious_code_mitigation.html. To remove the security vulnerability, before you return data that a user has supplied, scan the data for HTML special characters. If you find any such characters, replace them with their HTML entity or character reference. Replacing the characters prevents the browser from executing the user-supplied data as HTML. See "Securing User-Supplied Data in JSPs" in Programming WebLogic JSP and "Securing Client Input in Servlets" in Programming WebLogic HTTP Servlets. |
If the WebLogic Server Administration Console is used to create multiple domains, the System user in one domain can access the other domains created by that instance of the Administration Console. This behavior can present a security risk in a production environment. If you do not want this behavior, make sure that each domain in your enviroment in created in a different location (meaning on a different host or through a different WebLogic Server instance). You can also use the file protections offered through the operating system to protect the config.xml file so that only the appropriate System user has access to the file. |
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |