Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Security Best Practices

Server safety is first

The demands of security have gone far beyond simply managing user accounts and restricting access between internal and external networks. Emerging business practices challenge the enterprise to create flexible and robust security architectures that meet rapidly changing business demands. This article provides best practices tips that an administrator can implement to secure an enterprise. The land mines are highlighted so you know what to avoid.

The open, flexible, easy-to-configure security architecture of BEA WebLogic Server delivers advantages at multiple levels and introduces an advanced security design for application servers. Systems have to be protected from both insiders and outsiders. Misuse of a system or improper administration can leave it open for intrusion or attack.

Using development mode for domains running in production mode is not recommended. Never use development mode for production servers; it relaxes the security constraints for all servers in a domain. If you are using compatible security (using 6.x security configuration in 8.x), disable guest logins in production so that they cannot be used to access WebLogic resources in a WebLogic Server domain.

SerializedSystemIni.dat contains hashes for the passwords in a domain; ensure that you store a copy of this file in a safe place. Give read privileges for SerializedSystemIni.dat only to the WebLogic system administrator account. If you lose the administrative password, and the boot identity is not stored in the form of a boot.properties file, you cannot restart your servers. Later, I will explain how to recover the administrative password if you lose it.

While creating scripts to automate WebLogic administration tasks, the option ?Dweblogic.system.BootIdentityFile lets you avoid hard-coding a username and password in your text script. Also, more than anything else file system security of the WebLogic installation directories is most important. Allow access only to the user account that will be used to run or administer the WebLogic domain.

Tips

  • Install JRE instead of the complete SDK.
  • Remove or delete the development tools provided by BEA, such as the Configuration Wizard, WebLogic Builder, and jCOM tools.
  • The Pointbase database provided with WebLogic installation is for evaluation purposes and not supported in a production environment. Delete it.
  • Do not install the sample domains while installing in production or delete the sample domains if already installed.
  • Instead of hard-coding user identity in the start scripts, store the encrypted boot identity of the user who has privileges to start WebLogic Server in the boot.properties file.
  • BEA recommends using security roles (rather than users or groups) to secure WebLogic resources; assign users to groups, then create role statements.
  • Do not install or run WebLogic Server software as root. If you must bind to a privileged port, use postbind UID or postbind GID in the WebLogic machine configuration.
  • Set the ownership of the WebLogic installation and applications directory for access only by the user account that runs the server.

J2EE Application Security

Changing a security policy defined in a J2EE deployment descriptor requires redeployment; changing an embedded LDAP policy in the admin console is dynamic. Create application policies using the WebLogic Administration Console. When you create a security policy using the administration console, if inherited policy statements are present in the Inherited Policy Statement box of the Policy Editor page, the new policy overrides them.

Always keep source code off the production machine. Do not install uncompiled JSPs and other source code on the production machine. Configure your applications to use SSL. Set the transport- guarantee to CONFIDENTIAL in the user-data-constraint element of the web.xml file to secure specific resources of the web application using SSL.

Recovering Administrator Password

WebLogic provides four default administrative roles. The administrative user created during domain creation will be a part of the "Admin" role. Configure additional administrative users to roles such as Admin, Deployer, Monitor, or Operator. When using the default authenticator, if you have not modified the global Admin role (which by default is granted to the Administrator's group), you can recover the administrator password in a WebLogic domain.

To recover the administrator password in a WebLogic domain:

  • At the command line, change directory to the domain and run the setEnv script to set the PATH and CLASSPATH.
  • Create a new DefaultAuthenticatorInit.ldift: run java weblogic.security.utils.AdminAccount <tempadmin> <temppassword>.
  • Remove the initialized status file, DefaultAuthenticatormyrealmInit.initialized from the <Domain>/<Server>/ldap subdirectory.
  • Restart the server, using the new user identity.
  • To change the old admin user identity, log into the admin console (Optional).

SSL

When using SSL with WebLogic Server, use keystores; storing identity (private keys and certs) and trust (CA) in files is deprecated. Migrating from an earlier version might require you to create keystores from private keys, certs, or trust files.

If the network that connects WebLogic Servers in a domain is not trusted, enable SSL on each server in the domain so that LDAP replication between the admin server and managed servers uses SSL connections. Enabling the administration port of the domain enforces all the servers in the WebLogic domain to use SSL.

The default WebLogic installation represents exportable-strength SSL implementation (the maximum SSL strength is 512-bit keys with 40-bit bulk encryption). Key lengths longer than 512 bits require a domestic-strength SSL license key from BEA. If you use SSL in your production environment, use high-strength SSL. Key lengths of less than 1024 bits are generally considered weak.

SSL hardware accelerators: Running SSL on the WebLogic Servers is a tremendous drain on server resources. By offloading SSL processing, the resources can be applied to WebLogic functions. SSL processing can be handled by Web servers, load balancers, firewalls, or switches.

Incoming connections in WebLogic Server can be controlled by filtering them. WebLogic Server provides a default implementation of connection filter that you can configure in the admin console.

Tips

  • To avoid compromising application security, install and configure server-specific SSL certificates and enable hostname verification on production servers.
  • In production, do not use the sample SSL certificates that are provided with WebLogic.
  • Use a load balancer with built-in secure sockets layer (SSL) support, or run WebLogic Server on a machine that has SSL hardware, with Java Cryptography Extension (JCE).
  • Use SSL with WebLogic Server only if it is necessary. SSL degrades performance.
  • To control the types of connections accepted by WebLogic Server instances, use Connection Filters.

Securing the Admin Console

Applications should be installed on the managed server rather than installing them on the administration server. But if you use the admin server to serve applications (or in a single-server domain), do the following for better security:
  • Change the default admin user and password to custom.
  • Change the admin console context root path.
  • Enable domain-wide administration port.
  • Consider disabling the admin console.

Authentication Providers

If you use an external LDAP provider, store the server boot identity in the embedded LDAP server, and set timeouts on the external LDAP authentication provider. This way, if the external LDAP server is unavailable you can continue to restart and to serve unprotected data with WebLogic Server. Also before you apply any changes, set the control flag for all authentication providers to OPTIONAL; this prevents a configuration error from causing a production server not to restart.

WebLogic Server provides a custom realm, the NTRealm, based on older security realm API that supports native Windows domain authentication. NTRealm is useful with Windows domains that are not set up to use Active Directory.

Tips

  • Store the server boot identity in the embedded LDAP server.
  • For finer control of a production environment, use Active Directory authentication, rather than native Windows domain (NTRealm) authentication.
  • To prevent denial-of-service attacks, modify the timeout and maximum-size values for the incoming protocol ports (T3, COM, IIOP, HTTP Post time out) on the server.
  • Have a security audit performed by an internal or external auditing group.

Backup and Recovery

To migrate or recover WebLogic domains in case of failures, periodically back up the entire domain directory tree from the administration server machine. This way you can recover from a hardware or system failure by merely restoring the domain directory and restarting the admin server. Some important files to be watched/backed up periodically from the administration server machine in a WebLogic production domain are:
  • config.xml: Domain configuration repository.
  • config.xml.booted: Good backup of domain configuration repository from a successful boot.
  • boot.properties: Encrypted username and password for booting administration server.
  • running-managed-servers.xml: List of dependent managed servers currently running. This file is used for discovering managed servers if administration server gets restarted while the managed servers are running.
  • domain/configArchive/: Contains the copies of the Domain Configuration Repository files. When updated using administration tools, the administration server copies the old config.xml to this directory.
  • domain\adminserver\ldap\ldapfiles: Embedded LDAP data files currently being used by the domain's administration server.
  • *.ldift files: Can be used to initialize the WebLogic Domain Embedded LDAP server back to when the Domain was created.
  • domain/adminserver/ldap/backup/EmbeddedLDAPBackup.zip: Backup of the WebLogic Domain embedded LDAP server. Embedded LDAP is used to store users, groups, roles, policies by the default security realm, myrealm's security providers.
  • SerializedSystemIni.dat: Contains encrypted security data that must be present to boot the server.
  • Security Certificates: Security certificates and keys being used by the servers of a domain should also be backed up. The location of these files is user configurable.
  • Batch/Shell Scripts: setEnv.cmd/sh, startWebLogic.cmd/sh, startManagedWebLogic.cmd/sh.
The WebLogic administrator can check for BEA security advisories to download security-related patches and register to receive notifications of newly available security advisories. Refer to the BEA Advisories & Notifications page on the dev2dev Web site at http://dev2dev.bea.com/advisories.

More Stories By Balamurali Kothandaraman

Balamurali Kothandaraman is a delivery technologist for education services at BEA Systems Inc. He has over 7 years of experience in Java and J2EE technologies and is a BEA Certified Server Specialist, Administrator, and Instructor. Bala is a frequent speaker at various conferences, including eWorld and JavaOne.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
Cell networks have the advantage of long-range communications, reaching an estimated 90% of the world. But cell networks such as 2G, 3G and LTE consume lots of power and were designed for connecting people. They are not optimized for low- or battery-powered devices or for IoT applications with infrequently transmitted data. Cell IoT modules that support narrow-band IoT and 4G cell networks will enable cell connectivity, device management, and app enablement for low-power wide-area network IoT. B...
The hierarchical architecture that distributes "compute" within the network specially at the edge can enable new services by harnessing emerging technologies. But Edge-Compute comes at increased cost that needs to be managed and potentially augmented by creative architecture solutions as there will always a catching-up with the capacity demands. Processing power in smartphones has enhanced YoY and there is increasingly spare compute capacity that can be potentially pooled. Uber has successfully ...
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...