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.


@ThingsExpo Stories
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
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...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
SYS-CON Events announced today that Telecom Reseller 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, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...
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, it’s about the data consumed and generated. The devices are tools, mechanisms, conduits. In his session at Internet of Things at Cloud Expo | DXWor...