Securing WebLogic Server

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Configuring Security for a WebLogic Domain

The following sections describe how to set security configuration options for a WebLogic domain:

Note: These sections apply to WebLogic Server deployments using the security features in this release of WebLogic Server as well as deployments using Compatibility Security.


Enabling Trust Between WebLogic Server Domains

Trust between domains is established so that principals in a Subject from one WebLogic Server domain can make calls in another domain. In previous releases of WebLogic Server, there was only one type of domain trust which is now refered to as Global Trust. In this release of WebLogic Server, BEA introduces a new type of domain trust which is refered to as Cross Domain Security.

Enabling Cross Domain Security Between WebLogic Server Domains

Cross Domain Security establishes trust between two WebLogic Server domain pairs by using a credential mapper to configure communication between these WebLogic Server domains. Configuration and use of cross-domain security is described in the following sections:

In addition to the approach that uses a Credential Mapping security provider for cross-domain security, WebLogic Server also enables a different approach, under which global trust is established between two or more domains by using the same domain credential in each domain. If you enable global trust between two or more domains, the trust relationship is transitive and symmetric. In other words, if Domain A trusts Domain B and Domain B trusts Domain C, then Domain A will also trust Domain C and Domain B and Domain C will both trust Domain A. In most cases, the Cross Domain Security approach is preferable to the global trust approach, because its use of a specific user group and role for cross-domain actions allows for finer grained security. For information about the global trust approach in WebLogic Server, see Enabling Global Trust.

Configuring Cross-Domain Security

To configure cross-domain security in a WebLogic Server domain, set the SecurityConfigurationMBean.CrossDomainSecurityEnabled attribute to true. To do this in the WebLogic Server Administration Console:

  1. Click the name of the domain in the Domain Configuration panel.
  2. Open the Security: General tab in the console.
  3. Check Cross Domain Security Enabled.

If you maintain any WebLogic Server domains that have not enabled cross-domain security, you need to add their domain names to the list of excluded domains, in the SecurityConfigurationMBean.ExcludedDomainNames attributes. To do this in the WebLogic Server Administration Console:

  1. Click the name of the domain in the Domain Configuration panel.
  2. Open the Security: General tab in the console.
  3. In the Excluded Domain Names field, enter the names of any domains that do not have cross-domain security enabled. Enter the names of these domains separated either by semicolons or line breaks.

Configuring a Cross-Domain User

Cross-domain security in WebLogic Server uses a global security role named CrossDomainConnector with resource type remote and a group named CrossDomainConnectors, which is assigned the CrossDomainConnector role. Invocation requests from remote domains are expected to be from users with the CrossDomainConnector role. By default, the CrossDomainConnectors has no users as members. You need to create one or more users and add them to the group CrossDomainConnectors. Typically, such a user will be a virtual system user and preferably should have no privileges other than those granted by the CrossDomainConnector security role.

Configure a Credential Mapping for Cross-Domain Security

Note: The Credential Mapper identifies domains by their names. Therefore, it is important that the domains involved have unique names.

In each WebLogic Server domain, you need to specify a credential to be used by each user on each remote domain that needs to be trusted. Do this by configuring credential mappings for each domain in the connection. Each credential mapping needs to specify:

To configure a cross-domain security credential mapping in the WebLogic Server Administration Console, click Security Realms in the left panel.

  1. Click the name of your security realm (default is myrealm).
  2. On the Credential Mappings > Default tab, click New.
  3. On the Creating the Remote Resource for the Security Credential Mapping:
    • Select Use cross-domain protocol. In the alternative, in the Protocol field, enter cross-domain-protocol.
    • In the Remote Host field, enter the name of the remote domain that needs to interact with the local domain.
    • Leave blank the Remote Port, Path and Method parameters.
  4. Click Next.
  5. On the Create a New Security Credential Map Entry page, enter the following:
  6. Local User: cross-domain

    Remote User: User configured in the Remote Domain that is authorized to interact with the Local Domain.

    Password: The password for the Remote User.

  7. Click Finish.

See Create a Cross-Domain Security Credential Mapping in the Administration Console online help.

Enabling Global Trust

Note: Enabling Global Trust between WebLogic Server domains has the potential to open the servers up to man-in-the-middle attacks. Great care should be taken when enabling trust in a production environment. BEA recommends having strong network security such as a dedicated communication channel or protection by a strong firewall.

WebLogic Server enables you to establish global trust between two or more domains. You do this by specifying the same Domain Credential for each of the domains. By default, the Domain Credential is randomly generated and therefore, no two domains will have the same Domain Credential. If you want two WebLogic Server domains to interoperate, you need to replace the generated credential with a credential you select, and set the same credential in each of the domains. For configuration information, see Enable global trust between domains in the Administration Console online help.

If you enable global trust between two domains, the trust relationship is transitive and symmetric. In other words, if Domain A trusts Domain B and Domain B trusts Domain C, then Domain A will also trust Domain C and Domain B and Domain C will both trust Domain A. In most cases, the credential mapper approach, described in Enabling Cross Domain Security Between WebLogic Server Domains, is preferable to the global trust approach, because it is provides closer control over access.

Global trust between domains is established so that principals in a Subject from one WebLogic Server domain are accepted as principals in another domain. When this feature is enabled, identity is passed between WebLogic Server domains over an RMI connection without requiring authentication in the second domain (for example: log in to Domain 1 as Joe, make an RMI call to Domain 2 and Joe is still authenticated). WebLogic Server signs Principals with the Domain Credential as Principals are created. When a Subject is received from a remote source, its Principals are validated (the signature is recreated and if it matches, the remote domain has the same Domain Credential). If validation fails, an error is generated. If validation succeeds, the Principals are trusted as if they were created locally.

Note: Any credentials in clear text are encrypted the next time the config.xml file is persisted to disk.

If you are enabling global trust between domains in a Managed Server environment, you must stop the Administration Server and all the Managed Servers in both domains and then restart them. If this step is not performed, servers that were not rebooted will not trust the servers that were rebooted.

Keep the following points in mind when enabling global trust between WebLogic Server domains:

To avoid these issues, BEA recommends that rather than enabling global trust between two domains, you should instead configure users with the CrossDomainConnector role and use the credential mapping approach described in Enabling Cross Domain Security Between WebLogic Server Domains.


Using Connection Filters

Connection filters allow you to deny access at the network level. They can be used to protect server resources on individual servers, server clusters, or an entire internal network or intranet. For example, you can deny any non-SSL connections originating outside of your corporate network. Network connection filters are a type of firewall in that they can be configured to filter on protocols, IP addresses, and DNS node names.

Connection filters are particularly useful when using the Administration port. Depending on your network firewall configuration, you may be able to use a connection filter to further restrict administration access. A typical use might be to restrict access to the Administration port to only the servers and machines in the domain. An attacker who gets access to a machine inside the firewall, still cannot perform administration operations unless the attacker is on one of the permitted machines.

WebLogic Server provides a default connection filter called This connection filter accepts all incoming connections and also provides static factory methods that allow the server to obtain the current connection filter. To configure this connection filter to deny access, simply enter the connection filters rules in the WebLogic Administration Console.

You can also use a custom connection filter by implementing the classes in the package. For information about writing a connection filter, see Using Network Connection Filters in Programming WebLogic Security. Like the default connection filter, custom connection filters are configured in the WebLogic Administration Console.

To configure a connection filter:

  1. Enable the logging of accepted messages. This Connection Logger Enabled option logs successful connections and connection data in the server. This information can be used to debug problems relating to server connections.
  2. Choose which connection filter is to be used in the domain.
    • To configure the default connection filter, specify in Connection Filter.
    • To configure a custom connection filter, specify the class that implements the network connection filter in Connection Filter. This class must also be specified in the CLASSPATH for WebLogic Server.
  3. Enter the syntax for the connection filter rules.

For more information:


Using the Java Authorization Contract for Containers

The Java Authorization Contract for Containers (JACC) Standard can replace the EJB and Servlet container deployment and authorization provided by WebLogic Server. When you configure a WebLogic Server domain to use JACC, EJB and servlet authorization decisions are made by the classes in the JACC framework. All other authorization decisions within WebLogic Server are still determined by the WebLogic Security Framework. For information about the WebLogic JACC provider, see Using the Java Authorization Contract for Containers in Programming WebLogic Security.

You configure WebLogic Server to use JACC with a command line start option. For more information, see the description of the option in the weblogic.Server Command-Line Reference.

Note that an Administration Server and all Managed Servers in a domain need to have the same JACC configuration. If you change the JACC setting on the Administration Server, you should shut down the Managed Server and reboot them with the same settings as the Administration Server to avoid creating a security vulnerability. Otherwise, it may appear that EJBs and servlets in your domain are protected by WebLogic Security Framework roles and policies, when in fact the Managed Servers are still operating under JACC.


Viewing MBean Attributes

The Anonymous Admin Lookup Enabled option specifies whether anonymous, read-only access to WebLogic Server MBeans should be allowed from the MBean API. With this anonymous access, you can see the value of any MBean attribute that is not explicitly marked as protected by the Weblogic Server MBean authorization process. This option is enabled by default to assure backward compatibility. For greater security, you should disable this anonymous access.

To verify the setting of the Anonymous Admin Lookup Enabled option through the WebLogic Administration Console, see the Domain: Security: General page in the Administration Console or the SecurityConfigurationMBean.AnonymousAdminLookupEnabled attribute.


How Passwords Are Protected in WebLogic Server

It is important to protect passwords that are used to access resources in a WebLogic Server domain. In the past, usernames and passwords were stored in clear text in a WebLogic security realm. Now all the passwords in a WebLogic Server domain are hashed. The SerializedSystemIni.dat file contains the hashes for the passwords. It is associated with a specific WebLogic Server domain so it cannot be moved from domain to domain.

If the SerializedSystemIni.dat file is destroyed or corrupted, you must reconfigure the WebLogic Server domain. Therefore, you should take the following precautions:


Protecting User Accounts

WebLogic Server defines a set of configuration options to protect user accounts from intruders. In the default security configuration, these options are set for maximum protection. You can use the Administration Console to modify these options on the Configuration: User Lockout page.

As a system administrator, you have the option of turning off all the configuration options, increasing the number of login attempts before a user account is locked, increasing the time period in which invalid login attempts are made before locking the user account, and changing the amount of time a user account is locked. Remember that changing the configuration options lessens security and leaves user accounts vulnerable to security attacks. See Set user lockout attributes in the Administration Console online help.

Notes: The User Lockout options apply to the default security realm and all its security providers. The User Lockout options do not work with custom security providers in a security realm other than the default security realm. To use the User Lockout options with custom security providers, configure the custom security providers in the default security realm. Include the customer providers in the authentication process after the WebLogic Authentication provider and the WebLogic Identity Assertion provider. This ordering may cause a small performance hit.
Note: If you are using an Authentication provider that has its own mechanism for protecting user accounts, disable Lockout Enabled.
Note: If a user account becomes locked and you delete the user account and add another user account with the same name and password, the User Lockout configuration options will not be reset.

For information about unlocking a locked user account on the Administration Server, see Unlock a user account in the Administration Console online help. Unlocking a locked user account on a Managed Server cannot be done through the WebLogic Administration Console. The unlock information is propagated through a multicast message which is only configured in a cluster environment. Use the following command instead:

java weblogic.Admin -url url -username adminuser 
passwordforadminuser -type -method clearLockout lockedusername

You can also wait the time specified in the Lockout Duration attribute: the user account will be unlocked after the specified time.

  Back to Top       Previous  Next