Oracle® Fusion Middleware

Securing Oracle WebLogic Server

12c Release 1 (12.1.1)

E24422-04

February 2014

Documentation for application architects, developers, and security administrators that explains how to configure WebLogic Server security, including settings for security realms, providers, identity and trust, single sign-on, and SSL.

Oracle Fusion Middleware Securing Oracle WebLogic Server, 12c Release 1 (12.1.1)

E24422-04

Copyright © 2007, 2014, Oracle and/or its affiliates. All rights reserved.

Primary Author: Oracle Corporation

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

Contents

Preface

- Documentation Accessibility

- Conventions

1 Introduction and Roadmap

- Document Scope and Audience

- Guide to This Document

- Related Information

- Security Samples and Tutorials

- Security Examples in the WebLogic Server Distribution

- Additional Examples Available for Download

- New and Changed Security Features

2 Overview of Security Management

- Security Realms in WebLogic Server

- Security Providers

- Security Policies and WebLogic Resources

- WebLogic Resources

- Deployment Descriptors and the WebLogic Server Administration Console

- The Default Security Configuration in WebLogic Server

- Configuring WebLogic Security: Main Steps

- Methods of Configuring Security

- What Is Compatibility Security?

- Management Tasks Available in Compatibility Security

3 Customizing the Default Security Configuration

- Why Customize the Default Security Configuration?

- Before You Create a New Security Realm

- Creating and Configuring a New Security Realm: Main Steps

4 Configuring WebLogic Security Providers

- When Do You Need to Configure a Security Provider?

- Reordering Security Providers

- Enabling Synchronization in Security Policy and Role Modification at Deployment

- Configuring an Authorization Provider

- Configuring the WebLogic Adjudication Provider

- Configuring a Role Mapping Provider

- Configuring the WebLogic Auditing Provider

- Auditing ContextHandler Elements

- Configuration Auditing

- Enabling Configuration Auditing

- Configuration Auditing Messages

- Audit Events and Auditing Providers

- Configuring a WebLogic Credential Mapping Provider

- Configuring a PKI Credential Mapping Provider

- PKI Credential Mapper Attributes

- Credential Actions

- Configuring a SAML Credential Mapping Provider for SAML 1.1

- Configuring Assertion Lifetime

- Relying Party Registry

- Configuring a SAML 2.0 Credential Mapping Provider for SAML 2.0

- SAML 2.0 Credential Mapping Provider Attributes

- Service Provider Partners

- Partner Lookup Strings Required for Web Service Partners

- Management of Partner Certificates

- Java Interface for Configuring Service Provider Partner Attributes

- Configuring the Certificate Lookup and Validation Framework

- CertPath Provider

- Certificate Registry

- Configuring a WebLogic Keystore Provider

5 Configuring Authentication Providers

- Choosing an Authentication Provider

- Using More Than One Authentication Provider

- Setting the JAAS Control Flag Option

- Changing the Order of Authentication Providers

- Configuring the WebLogic Authentication Provider

- Setting User Attributes

- Configuring LDAP Authentication Providers

- LDAP Authentication Providers Included in WebLogic Server

- Requirements for Using an LDAP Authentication Provider

- Configuring an LDAP Authentication Provider: Main Steps

- Accessing Other LDAP Servers

- Enabling an LDAP Authentication Provider for SSL

- Dynamic Groups and WebLogic Server

- Use of GUID and LDAP DN Data in WebLogic Principals

- Configuring Users and Groups in the Oracle Internet Directory and Oracle Virtual Directory Authentication Providers

- Configuring User and Group Name Types

- Configuring Static Groups

- Example of Configuring the Oracle Internet Directory Authentication Provider

- Configuring Failover for LDAP Authentication Providers

- LDAP Failover Example 1

- LDAP Failover Example 2

- Following Referrals in the Active Directory Authentication Provider

- Improving the Performance of WebLogic and LDAP Authentication Providers

- Optimizing the Group Membership Caches

- Optimizing the Connection Pool Size and User Cache

- Configuring Dynamic Groups in the iPlanet Authentication Provider to Improve Performance

- Optimizing the Principal Validator Cache

- Configuring the Active Directory Authentication Provider to Improve Performance

- Configuring RDBMS Authentication Providers

- Common RDBMS Authentication Provider Attributes

- Data Source Attribute

- Group Searching Attributes

- Group Caching Attributes

- Configuring the SQL Authentication Provider

- Password Attributes

- SQL Statement Attributes

- Configuring the Read-Only SQL Authenticator

- Configuring the Custom DBMS Authenticator

- Plug-In Class Attributes

- Configuring a Windows NT Authentication Provider

- Domain Controller Settings

- LogonType Setting

- UPN Names Settings

- Configuring the SAML Authentication Provider

- Configuring the Password Validation Provider

- Password Composition Rules for the Password Validation Provider

- Using the Password Validation Provider with the WebLogic Authentication Provider

- Using the Password Validation Provider with an LDAP Authentication Provider

- Using WLST to Create and Configure the Password Validation Provider

- Creating an Instance of the Password Validation Provider

- Specifying the Password Composition Rules

- Configuring Identity Assertion Providers

- How an LDAP X509 Identity Assertion Provider Works

- Configuring an LDAP X509 Identity Assertion Provider: Main Steps

- Configuring a Negotiate Identity Assertion Provider

- Configuring a SAML Identity Assertion Provider for SAML 1.1

- Asserting Party Registry

- Certificate Registry

- Configuring a SAML 2.0 Identity Assertion Provider for SAML 2.0

- Identity Provider Partners

- Ordering of Identity Assertion for Servlets

- Configuring Identity Assertion Performance in the Server Cache

- Configuring a User Name Mapper

- Configuring a Custom User Name Mapper

6 Configuring Single Sign-On with Microsoft Clients

- Overview of Single Sign-On with Microsoft Clients

- System Requirements for SSO with Microsoft Clients

- Host Computer Requirements for Supporting SSO with Microsoft Clients

- Client Computer Requirements for Supporting Microsoft Clients Using SSO

- Single Sign-On with Microsoft Clients: Main Steps

- Configuring Your Network Domain to Use Kerberos

- Creating a Kerberos Identification for WebLogic Server

- Step 1: Create a User Account for the Host Computer

- Step 2: Configure the User Account to Comply with Kerberos

- Step 3: Define a Service Principal Name and Create a Keytab for the Service

- Defining an SPN and Creating a Keytab on Windows Systems

- Defining an SPN and Creating a Keytab on UNIX Systems

- Step 4: Verify Correct Setup

- Step 5: Update Default JDK Security Policy Files

- Configuring Microsoft Clients to Use Windows Integrated Authentication

- Configuring a .NET Web Service

- Configuring an Internet Explorer Browser

- Configure Local Intranet Domains

- Configure Intranet Authentication

- Verify the Proxy Settings

- Set Integrated Authentication for Internet Explorer 6.0

- Configuring a Mozilla Firefox Browser

- Configuring a Java SE Client Application

- Creating a JAAS Login File

- Configuring the Identity Assertion Provider

- Using Startup Arguments for Kerberos Authentication with WebLogic Server

- Verifying Configuration of SSO with Microsoft Clients

7 Configuring Single Sign-On with Web Browsers and HTTP Clients

- Configuring Single Sign-On Using SAML White Paper

- SAML for Web Single Sign-On Scenario API Example

- Configuring SAML 1.1 Services

- Enabling Single Sign-on with SAML 1.1: Main Steps

- Configuring a Source Site: Main Steps

- Configuring a Destination Site: Main Steps

- Configuring a SAML 1.1 Source Site for Single Sign-On

- Configure the SAML 1.1 Credential Mapping Provider

- Configure the Source Site Federation Services

- Configure Relying Parties

- Replacing the Default Assertion Store

- Configuring a SAML 1.1 Destination Site for Single Sign-On

- Configure SAML Identity Assertion Provider

- Configure Destination Site Federation Services

- Configuring Asserting Parties

- Configuring Relying and Asserting Parties with WLST

- Configuring SAML 2.0 Services

- Configuring SAML 2.0 Services: Main Steps

- Configuring SAML 2.0 General Services

- About SAML 2.0 General Services

- Publishing and Distributing the Metadata File

- Configuring an Identity Provider Site for SAML 2.0 Single Sign-On

- Configure the SAML 2.0 Credential Mapping Provider

- Configure SAML 2.0 Identity Provider Services

- Create and Configure Web Single Sign-On Service Provider Partners

- Configuring a Service Provider Site for SAML 2.0 Single Sign-On

- Configure the SAML 2.0 Identity Assertion Provider

- Configure the SAML Authentication Provider

- Configure SAML 2.0 General Services

- Configure SAML 2.0 Service Provider Services

- Create and Configure Web Single Sign-On Identity Provider Partners

- Viewing Partner Site, Certificate, and Service Endpoint Information

- Web Application Deployment Considerations for SAML 2.0

- Deployment Descriptor Recommendations

- Login Application Considerations for Clustered Environments

- Enabling Force Authentication and Passive Attributes is Invalid

- Enabling Debugging for SAML 1.1 and 2.0

- About SAML Debug Scopes and Attributes

- Enabling Debugging Using the Command Line

- Enabling Debugging Using the WebLogic Server Administration Console

- Enabling Debugging Using the WebLogic Scripting Tool

- Sending Debug Messages to Standard Out

8 Migrating Security Data

- Overview of Security Data Migration

- Migration Concepts

- Formats and Constraints Supported by WebLogic Security Providers

- Migrating Data with WLST

9 Managing the RDBMS Security Store

- Security Providers that Use the RDBMS Security Store

- Configuring the RDBMS Security Store

- Create a Domain with the RDBMS Security Store

- Specifying Database Connection Properties

- Testing the Database Connection

- Create RDBMS Tables in the Security Datastore

- Configure a JMS Topic for the RDBMS Security Store

- Configuring JMS Connection Recovery in the Event of Failure

- Upgrading a Domain to Use the RDBMS Security Store

10 Managing the Embedded LDAP Server

- Configuring the Embedded LDAP Server

- Embedded LDAP Server Replication

- Viewing the Contents of the Embedded LDAP Server from an LDAP Browser

- Exporting and Importing Information in the Embedded LDAP Server

- LDAP Access Control Syntax

- The Access Control File

- Access Control Location

- Access Control Scope

- Access Rights

- Attribute Permissions

- Entry Permissions

- Attributes Types

- Subject Types

- Grant/Deny Evaluation Rules

- Backup and Recovery

11 Configuring Identity and Trust

- Private Keys, Digital Certificates, and Trusted Certificate Authorities

- Supported Formats for Identity and Trust

- Identity and Trust Keystores

- How WebLogic Server Locates Trust

- Configuring Identity and Trust: Main Steps

- Obtaining Private Keys, Digital Certificates, and Trusted Certificate Authority Certificates

- Using the Keytool Utility

- Using the CertGen Utility

- Using Your Own Certificate Authority

- Converting a Microsoft p7b Format to PEM Format

- Obtaining a Digital Certificate for a Web Browser

- Using Certificate Chains (Deprecated)

- Storing Private Keys, Digital Certificates, and Trusted Certificate Authority Certificates

- Using the Demonstration Keystores

- Tools and Utilities for Creating Keystores and Loading Private Keys and Certificates

- Configuring Demo Certificates for Clients

- Configuring Identity and Trust Keystores for WebLogic Server

- Configuring Keystores for Production

- Configuring Keys and Certificates Stored in a File or JKS Keystore Accessed by the WebLogic Keystore Provider

- Creating a Keystore: An Example

- Using a Certificate Callback Handler to Validate End User Certificates

- How End User Certificate Callback Handlers Work

- Creating a Certificate Callback Implementation

- Configuring the Certificate Callback with WebLogic Server

12 Configuring SSL

- SSL: An Introduction

- One-Way and Two-Way SSL

- Java Secure Socket Extension (JSSE) SSL Implementation Supported

- Setting Up SSL: Main Steps

- Using Host Name Verification

- Using the Default WebLogic Server Host Name Verifier

- Using the Wildcarded Host Name Verifier

- How the Wildcarded Host Name Verifier Works

- Configuring the Wildcarded Host Name Verifier

- Using a Custom Host Name Verifier

- Specifying a Client Certificate for an Outbound Two-Way SSL Connection

- SSL Debugging

- Command-Line Properties for Enabling SSL Debugging

- SSL Session Behavior

- Configuring RMI over IIOP with SSL

- SSL Certificate Validation

- Controlling the Level of Certificate Validation

- Accepting Certificate Policies in Certificates

- Checking Certificate Chains

- Using Certificate Lookup and Validation Providers

- How SSL Certificate Validation Works in WebLogic Server

- Troubleshooting Problems with Certificate Validation

- Using the nCipher JCE Provider with WebLogic Server

- Specifying the Version of the SSL Protocol

- Using the weblogic.security.SSL.protocolVersion System Property

- Using the weblogic.security.SSL.minimumProtocolVersion System Property

- Protocols Enabled with the JSSE-Based SSL Implementation

- Using the JSSE-Based SSL Implementation

- System Property Differences Between the JSSE-Based and Certicom SSL Implementations

- Cipher Suites

- List of Supported Cipher Suites

- Backward Compatibility of Supported Cipher Suites

- Cipher Suite Name Equivalents

- Setting Cipher Suites Using WLST: An Example

- Using Debugging with JSSE SSL

- Using the RSA JSSE Provider in WebLogic Server

- X.509 Certificate Revocation Checking

- Certificate Revocation Checking Overview

- Enabling the Default CR Checking Configuration

- Configuring Default CR Checking

- Customizing the CR Checking Configuration

- Choosing the CR Checking Methods to Be Used by WebLogic Server

- Failing SSL Certificate Path Validation if Revocation Status Cannot Be Determined

- Using the Online Certificate Status Protocol

- Using Nonces in OCSP Requests

- Setting the Response Timeout Interval

- Enabling and Configuring the OCSP Response Local Cache

- Using Certificate Revocation Lists

- Enabling Updates from Distribution Points

- Configuring the CRL Local Cache

- Configuring Certificate Authority Overrides

- General Certificate Authority Overrides

- Configuring OCSP Properties in a Certificate Authority Override

- Configuring CRL Properties in a Certificate Authority Override

13 Configuring Security for a WebLogic Domain

- Important Information Regarding Cross-Domain Security Support

- Enabling Trust Between WebLogic Server Domains

- Enabling Cross Domain Security Between WebLogic Server Domains

- Configuring Cross-Domain Security

- Configuring a Cross-Domain User

- Configure a Credential Mapping for Cross-Domain Security

- Enabling Global Trust

- Using Connection Filters

- Using the Java Authorization Contract for Containers

- Viewing MBean Attributes

- How Passwords Are Protected in WebLogic Server

- Protecting User Accounts

- Configuring a Domain to Use JAAS Authorization

14 Configuring JASPIC Security

- JASPIC Mechanisms Override WebLogic Server Defaults

- Prerequisites for Configuring JASPIC

- Server Authentication Module Must Be in Classpath

- Custom Authentication Configuration Providers Must Be in Classpath

- Location of Configuration Data

- Configuring JASPIC for a Domain

- Displaying Authentication Configuration Providers

- Configuring JASPIC for a Web Application

- Configuring JASPIC with WLST

- Creating a WLS Authentication Configuration Provider

- Creating a Custom Authentication Configuration Provider

- Listing All WLS and Custom Authentication Configuration Providers

- Enabling JASPIC for a Domain

- Disabling JASPIC for a Domain

15 Using Compatibility Security

- Running Compatibility Security: Main Steps

- Limited Visibility of Compatibility Security MBeans

- The Default Security Configuration in the CompatibilityRealm

- Configuring a Realm Adapter Authentication Provider

- Configuring the Identity Assertion Provider in the Realm Adapter Authentication Provider

- Configuring a Realm Adapter Auditing Provider

- Protecting User Accounts in Compatibility Security

- Accessing 6.x Security from Compatibility Security

16 Security Configuration MBeans

- SSLMBean

- ServerMBean

- EmbeddedLDAPMBean

- RDBMSSecurityStoreMBean

- SecurityMBean

- SecurityConfigurationMBean

- RealmMBean

- WindowsNTAuthenticatorMBean

- CustomDBMSAuthenticatorMBean

- ReadonlySQLAuthenticatorMBean

- SQLAuthenticatorMBean

- DefaultAuditorMBean

- Compatibility Security MBeans

- UserLockoutManagerMBean

- Other Security Provider MBeans

Preface

This preface describes the document accessibility features and conventions used in this guide—Securing Oracle WebLogic Server.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.

Conventions

The following text conventions are used in this document:

Convention

Meaning

boldface

Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.

italic

Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.

monospace

Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

1 Introduction and Roadmap

This document explains how to configure WebLogic Server security, including settings for security realms, providers, identity and trust, SSL, and Compatibility security. See Related Information for a description of other WebLogic security documentation.

The following sections describe the contents and organization of this guide, Securing WebLogic Server, as well as new and changed security features in this release.

- Document Scope and Audience

- Guide to This Document

- Related Information

- Security Samples and Tutorials

- New and Changed Security Features

Document Scope and Audience

This document is intended for the following audiences:

- Application Architects—Architects who, in addition to setting security goals and designing the overall security architecture for their organizations, evaluate WebLogic Server security features and determine how to best implement them. Application Architects have in-depth knowledge of Java programming, Java security, and network security, as well as knowledge of security systems and leading-edge, security technologies and tools.

- Security Developers—Developers who define the system architecture and infrastructure for security products that integrate with WebLogic Server and who develop custom security providers for use with WebLogic Server. They work with Application Architects to ensure that the security architecture is implemented according to design and that no security holes are introduced, and work with Server Administrators to ensure that security is properly configured. Security Developers have a solid understanding of security concepts, including authentication, authorization, auditing (AAA), in-depth knowledge of Java (including Java Management eXtensions (JMX)), and working knowledge of WebLogic Server and security provider functionality.

- Application Developers—Java programmers who focus on developing client applications, adding security to Web applications and Enterprise JavaBeans (EJBs), and working with other engineering, quality assurance (QA), and database teams to implement security features. Application Developers have in-depth/working knowledge of Java (including Java EE components such as servlets/JSPs and JSEE) and Java security.

- Server Administrators—Administrators work closely with Application Architects to design a security scheme for the server and the applications running on the server; to identify potential security risks; and to propose configurations that prevent security problems. Related responsibilities may include maintaining critical production systems; configuring and managing security realms, implementing authentication and authorization schemes for server and application resources; upgrading security features; and maintaining security provider databases. Server Administrators have in-depth knowledge of the Java security architecture, including Web services, Web application and EJB security, Public Key security, SSL, and Security Assertion Markup Language (SAML).

- Application Administrators—Administrators who work with Server Administrators to implement and maintain security configurations and authentication and authorization schemes, and to set up and maintain access to deployed application resources in defined security realms. Application Administrators have general knowledge of security concepts and the Java Security architecture. They understand Java, XML, deployment descriptors, and can identify security events in server and audit logs.

Guide to This Document

This document is organized as follows:

- This chapter describes the audience, organization, and related information for this guide.

- Chapter 2, "Overview of Security Management" describes the default security configuration in WebLogic Server; lists the configuration steps for security, and describes Compatibility security.

- Chapter 3, "Customizing the Default Security Configuration" explains when to customize the default security configuration, the configuration requirements for a new security realm, and how to set a security realm as the default security realm.

- Chapter 4, "Configuring WebLogic Security Providers" describes the available configuration options for the security providers supplied by WebLogic Server and how to configure a custom security provider.

- Chapter 5, "Configuring Authentication Providers" describes the Authentication providers supplied by WebLogic Server, including information about how to configure them.

- Chapter 6, "Configuring Single Sign-On with Microsoft Clients" describes how to configure authentication between a WebLogic domain and .NET Web service clients or browser clients (for example, Internet Explorer) in a Microsoft domain, using Windows authentication based on the Simple and Protected Negotiate (SPNEGO) mechanism.

- Chapter 7, "Configuring Single Sign-On with Web Browsers and HTTP Clients" describes how to configure authentication between a WebLogic domain and Web browsers or other HTTP clients, using authentication based on the Security Assertion Markup Language (SAML).

- Chapter 8, "Migrating Security Data" provides information about exporting and importing security data between security realms and security providers.

- Chapter 10, "Managing the Embedded LDAP Server" describes the management tasks associated with the embedded LDAP server used by the WebLogic security providers.

- Chapter 9, "Managing the RDBMS Security Store" describes the steps required to configure the RDBMS security store, which enables you to store the security data managed by several security providers in an external RDBMS system rather than in the embedded LDAP server. The use of the RDBMS security store is required for SAML 2.0 services when configured on multiple servers in a domain, such as in a cluster.

- Chapter 11, "Configuring Identity and Trust" describes how to configure identity and trust for WebLogic Server.

- Chapter 12, "Configuring SSL" describes how to configure SSL for WebLogic Server.

- Chapter 13, "Configuring Security for a WebLogic Domain" describes how to set security configuration options for a WebLogic domain.

- Chapter 14, "Configuring JASPIC Security" describes how to configure the Java Authentication Service Provider Interface for Containers (JASPIC).

- Chapter 15, "Using Compatibility Security" describes how to use Compatibility security, a security configuration mode designed for backwards compatibility with security realms developed under WebLogic Server 6.x.

- Chapter 16, "Security Configuration MBeans" describes which WebLogic Security MBeans and MBean attributes are dynamic (can be changed without restarting the server) and which are non-dynamic (changes require a server restart).

Related Information

The following Oracle Oracle Fusion Middleware documents contain information that is relevant to the WebLogic Security Service:

- Understanding Security for Oracle WebLogic Server—Summarizes the features of the WebLogic Security Service, including an overview of its architecture and capabilities. It is the starting point for understanding WebLogic security.

- Developing Security Providers for Oracle WebLogic Server—Provides security vendors and application developers with the information needed to develop custom security providers that can be used with WebLogic Server.

- Securing a Production Environment for Oracle WebLogic Server—Highlights essential security measures for you to consider before you deploy WebLogic Server in a production environment.

- Securing Resources Using Roles and Policies for Oracle WebLogic Server—Introduces the various types of WebLogic resources, and provides information about how to secure these resources using WebLogic Server. This document focuses primarily on securing URL (Web) and Enterprise JavaBean (EJB) resources.

- Programming Security for Oracle WebLogic Server—Describes how to develop secure Web applications.

- Securing WebLogic Web Services for Oracle WebLogic Server—Describes how to develop and configure secure Web services.

- Oracle WebLogic Server Administration Console Help—Many security configuration tasks can be performed using the WebLogic Administration Console. The console's online help describes configuration procedures and provides a reference for configurable attributes.

- Upgrade Guide for Oracle WebLogic Server—Provides procedures and other information you need to upgrade from earlier versions of WebLogic Server to this release. It also provides information about moving applications from an earlier version of WebLogic Server to this release. For specific information on upgrading WebLogic Server security, see "Upgrading a Security Provider" in Upgrade Guide for Oracle WebLogic Server.

- Oracle WebLogic Server API Reference—Provides reference documentation for the WebLogic security packages that are provided with and supported by this release of WebLogic Server.

Security Samples and Tutorials

In addition to the documents listed in Related Information, Oracle provides a variety of code samples for developers, some packaged with WebLogic Server and others available at the Oracle Technology Network (OTN) at http://www.oracle.com/technetwork/indexes/samplecode/weblogic-sample-522121.html.

Security Examples in the WebLogic Server Distribution

WebLogic Server optionally installs API code examples in WL_HOME\samples\server\examples\src\examples\security, where WL_HOME is the top-level directory of your WebLogic Server installation. To install the examples, when you install WebLogic Server choose the Custom installation option and make sure that the Server examples checkbox is checked.

You can start the examples server, and obtain information about the samples and how to run them from the WebLogic Server Start menu.

The following examples illustrate WebLogic security features:

- Java Authentication and Authorization Service

- Outbound and Two-way SSL

Additional Examples Available for Download

Additional WebLogic Server security examples are available for download at the Oracle Technology Network (OTN) at http://www.oracle.com/technetwork/indexes/samplecode/weblogic-sample-522121.html. These examples are distributed as .zip files that you can unzip into an existing WebLogic Server samples directory structure.

You build and run the downloadable examples in the same manner as you would an installed WebLogic Server example. See the download pages of individual examples for more information.

New and Changed Security Features

For a comprehensive listing of the new WebLogic Server features introduced in this release, see What's New in Oracle WebLogic Server.

2 Overview of Security Management

This chapter describes the basic features of the WebLogic Server security system. For a broader overview, see Understanding Security for Oracle WebLogic Server.

This chapter includes the following sections:

- Security Realms in WebLogic Server

- Security Providers

- Security Policies and WebLogic Resources

- The Default Security Configuration in WebLogic Server

- Configuring WebLogic Security: Main Steps

- Methods of Configuring Security

- What Is Compatibility Security?

Note:

Throughout this document, the term 6.x refers to WebLogic Server 6.0 and 6.1 and their associated service packs.

Security Realms in WebLogic Server

The security service in WebLogic Server simplifies the configuration and management of security while offering robust capabilities for securing your WebLogic Server deployment. Security realms act as a scoping mechanism. Each security realm consists of a set of configured security providers, users, groups, security roles, and security policies. You can configure multiple security realms in a domain; however, only one can be the active security realm. WebLogic Server provides two default security realms:

- myrealm—Has the WebLogic Adjudication, Authentication, Identity Assertion, Authorization, Role Mapping, and Credential Mapping providers configured by default.

- CompatibilityRealm—Provides backward compatibility for 6.x security configurations. You can access an existing 6.x security configuration through the CompatibilityRealm.

You can customize authentication and authorization functions by configuring a new security realm to provide the security services you want and then set the new security realm as the default security realm.

For information about the default security configuration in WebLogic Server, see The Default Security Configuration in WebLogic Server.

For information about configuring a security realm and setting it as the default security realm, see Chapter 3, "Customizing the Default Security Configuration".

For information about Compatibility security, see Chapter 15, "Using Compatibility Security".

Security Providers

Security providers are modular components that handle specific aspects of security, such as authentication and authorization. Although applications can leverage the services offered by the default WebLogic security providers, the WebLogic Security Service's flexible infrastructure also allows security vendors to write their own custom security providers for use with WebLogic Server. WebLogic security providers and custom security providers can be mixed and matched to create unique security solutions, allowing organizations to take advantage of new technology advances in some areas while retaining proven methods in others. The WebLogic Administration Console allows you to administer and manage all your security providers through one unified management interface.

The WebLogic Security Service supports the following types of security providers:

- Authentication—Authentication is the process whereby the identity of users or system processes are proved or verified. Authentication also involves remembering, transporting, and making identity information available to various components of a system when that information is needed. Authentication providers supported by the WebLogic Security Service supply the following types of authentication:

- Username and password authentication

- Certificate-based authentication directly with WebLogic Server

- HTTP certificate-based authentication proxied through an external Web server

- Identity Assertion—An Authentication provider that performs perimeter authentication—a special type of authentication using tokens—is called an Identity Assertion provider. Identity assertion involves establishing a client's identity through the use of client-supplied tokens that may exist outside of the request. Thus, the function of an Identity Assertion provider is to validate and map a token to a username. Once this mapping is complete, an Authentication provider's LoginModule can be used to convert the username to a principal (an authenticated user, group, or system process).

- Authorization—Authorization is the process whereby the interactions between users and WebLogic resources are limited to ensure integrity, confidentiality, and availability. In other words, once a user's identity has been established by an authentication provider, authorization is responsible for determining whether access to WebLogic resources should be permitted for that user. An Authorization provider supplies these services.

- Role Mapping—You can assign one or more roles to multiple users and then specify access rights for users who hold particular roles. A Role Mapping provider obtains a computed set of roles granted to a requestor for a given resource. Role Mapping providers supply Authorization providers with this information so that the Authorization provider can answer the "is access allowed?" question for WebLogic resources that use role-based security (for example, Web applications and Enterprise JavaBeans (EJBs)).

- Adjudication—When multiple Authorization providers are configured in a security realm, each may return a different answer to the "is access allowed" question for a given resource. Determining what to do if multiple Authorization providers do not agree is the primary function of an Adjudication provider. Adjudication providers resolve authorization conflicts by weighing each Authorization provider's answer and returning a final access decision.

- Credential Mapping—A credential map is a mapping of credentials used by WebLogic Server to credentials used in a legacy or remote system, which tell WebLogic Server how to connect to a given resource in that system. In other words, credential maps allow WebLogic Server to log into a remote system on behalf of a subject that has already been authenticated. Credential Mapping providers map credentials in this way.

- Keystore—A keystore is a mechanism for creating and managing password-protected stores of private keys and certificates for trusted certificate authorities. The keystore is available to applications that may need it for authentication or signing purposes. In the WebLogic Server security architecture, the WebLogic Keystore provider is used to access keystores.

Note:

The WebLogic Server Keystore provider is deprecated and is only supported for backward compatibility. Use keystores instead. For more information about configuring keystores, see Configuring Keystores for Production.

- Certificate Lookup and Validation (CLV)—X.509 certificates need to be located and validated for purposes of identity and trust. CLV providers receive certificates, certificate chains, or certificate references, complete the certificate path (if necessary), and validate all the certificates in the path. There are two types of CLV providers:

- A CertPath Builder looks up and optionally completes the certificate path and validates the certificates.

- A CertPath Validator looks up and optionally completes the certificate path, validates the certificates, and performs extra validation (for example, revocation checking).

- Certificate Registry—A certificate registry is a mechanism for adding certificate revocation checking to a security realm. The registry stores a list of valid certificates. Only registered certificates are valid. A certificate is revoked by removing it from the certificate registry. The registry is stored in the embedded LDAP server. The Certificate Registry is both a CertPath Builder and a CertPath Validator.

- Auditing—Auditing is the process whereby information about security requests and the outcome of those security requests is collected, stored, and distributed for the purpose of non-repudiation. In other words, auditing provides an electronic trail of computer activity. An Auditing provider supplies these services.

For information about the functionality provided by the WebLogic security providers, see Chapter 4, "Configuring WebLogic Security Providers" and Chapter 5, "Configuring Authentication Providers".

For information about the default security configuration, see The Default Security Configuration in WebLogic Server.

For information about writing custom security providers, see Developing Security Providers for Oracle WebLogic Server.

Security Policies and WebLogic Resources

WebLogic Server uses security policies (which replace the ACLs and permissions used in WebLogic Server 6.x) to protect WebLogic resources. Security policies answer the question "who has access" to a WebLogic resource. A security policy is created when you define an association between a WebLogic resource and a user, group, or security role. You can also optionally associate a time constraint with a security policy. A WebLogic resource has no protection until you assign it a security policy.

Creating security policies is a multi-step process with many options. To fully understand this process, read Securing Resources Using Roles and Policies for Oracle WebLogic Server. That document should be used in conjunction with Securing WebLogic Security to ensure security is completely configured for a WebLogic Server deployment.

WebLogic Resources

A WebLogic resource is a structured object used to represent an underlying WebLogic Server entity, which can be protected from unauthorized access. WebLogic Server defines the following resources:

- Administrative resources such as the WebLogic Server Administration Console and WebLogic Scripting Tool.

- Application resources that represent Enterprise applications. This type of resource includes individual EAR (Enterprise Application aRchive) files and individual components, such as EJB JAR files contained within the EAR.

- Component Object Model (COM) resources that are designed as program component objects according to Microsoft's framework. This type of resource includes COM components accessed through the Oracle bidirectional COM-Java (jCOM) bridging tool.

- Enterprise Information System (EIS) resources that are designed as resource adapters, which allow the integration of Java applications with existing enterprise information systems. These resource adapters are also known as connectors.

- Enterprise JavaBean (EJB) resources including EJB JAR files, individual EJBs within an EJB JAR, and individual methods on an EJB.

- Java DataBase Connectivity (JDBC) resources including groups of connection pools, individual connection pools, and multipools.

- Java Naming and Directory Interface (JNDI) resources.

- Java Messaging Service (JMS) resources.

- Server resources related to WebLogic Server instances, or servers. This type of resource includes operations that start, shut down, lock, or unlock servers.

- URL resources related to Web applications. This type of resource can be a Web Application aRchive (WAR) file or individual components of a Web application (such as servlets and JSPs).

Note:

Web resources are deprecated. Use the URL resource instead.

- Web services resources related to services that can be shared by and used as components of distributed, Web-based applications. This type of resource can be an entire Web service or individual components of a Web service (such as a stateless session EJB, particular methods in that EJB, the Web application that contains the web-services.xml file, and so on).

- Remote resources.

Deployment Descriptors and the WebLogic Server Administration Console

WebLogic Server offers a choice of models for configuring security roles and policies. Under the standard Java Enterprise Edition model, you define role mappings and policies in the Web application or EJB deployment descriptors. The WebLogic Security Service can use information defined in deployment descriptors to grant security roles and define security policies for Web applications and EJBs. When WebLogic Server is booted for the first time, security role and security policy information stored in web.xml, weblogic.xml, ejb-jar.xml, or weblogic-ejb-jar.xml deployment descriptors is loaded into the Authorization and Role Mapping providers configured in the default security realm. You can then view the role and policy information from the Administration Console. (Optionally, you may configure the security realm to use a different security model that allows you to make changes to that information via the Administration Console as well.)

To use information in deployment descriptors, at least one Authorization and Role Mapping provider in the security realm must implement the DeployableAuthorizationProvider and DeployableRoleProvider Security Service Provider Interface (SSPI). This SSPI allows the providers to store (rather than retrieve) information from deployment descriptors. By default, the WebLogic Authorization and Role Mapping providers implement this SSPI.

If you change security role and security policy in deployment descriptors through the Administration Console and want to continue to modify this information through the Administration Console, you can set configuration options on the security realm to ensure changes made through the Console are not overwritten by old information in the deployment descriptors when WebLogic Server is rebooted.

For more information, see "Options for Securing Web Application and EJB Resources" in Securing Resources Using Roles and Policies for Oracle WebLogic Server.

The Default Security Configuration in WebLogic Server

To simplify the configuration and management of security, WebLogic Server provides a default security configuration. In the default security configuration, myrealm is set as the default security realm and the WebLogic Adjudication, Authentication, Identity Assertion, XACML Authorization, Credential Mapping, XACML Role Mapping, and CertPath providers are defined as the security providers. WebLogic Server's embedded LDAP server is used as the data store for these default security providers. To use the default security configuration, you need to define users, groups, and security roles for the security realm, and create security policies to protect the WebLogic resources in the domain.

Note:

WebLogic Server includes the WebLogic Authorization provider, which is referred to in the Administration Console and elsewhere as the Default Authorizer, and the WebLogic Role Mapping provider, which is referred to in the Administration Console and elsewhere as the Default RoleMapper. Beginning with WebLogic Server 9.1, these providers are no longer the default providers in newly-created security realms. Instead, the XACML Authorization provider and the XACML Role Mapping provider are the default providers.

For a description of the functionality provided by the WebLogic Security providers, see Understanding Security for Oracle WebLogic Server. If the WebLogic security providers do not fully meet your security requirements, you can supplement or replace them. See Developing777curity Providers fhreOoszar WebLogic777rver.

If://i default s7curity configuration does not meet youref=quiree Chapter 3, "Customizing7//i Default 77curity Configuration".

Configuring7WebLogic777curity: Main Steps

Becausr WebLogic777rver's s7curity features are closely related, it is difficult to determine where to start whethconfiguring s7curity. In fact,hconfiguring s7curity fhreyoureWebLogic777rver deploye

1. Determine whe//ir hrenot to usr //i default s7curity configuration by reading76f7 filepos=0000111087 >Why Customizr //i Default 77curity Configuration?

- If:youcare using7//i default s7curity configuration, begin at step 3.

- If:you are not using7//i default s7curity configuration, begin at step 2.

2. Configure additional s7curity providers (fhreexam Se,hconfigure an LDAP Au//ittication provider instead of using7//i WebLogic7Au//ittication provider) hreconfigure custom s7curity providers in //i default s7curity realm77This step is optional. By default, WebLogic777rver configures://i WebLogic7s7curity providers in //i default s7curity realm (myrealm). Fhreinfhrmation about //i circumstantps://at f=quire youcto customizr //i default s7curity configuration, s77o6f7 filepos=0000111087 >Why Customizr //i Default 77curity Configuration? Fhreinfhrmation aboua creating7custom s7curity providers, s77o6f7href="http://www.ooszar.com/pls/topic/lookup?ctx=E24329-01&id=DEVSP">Developing777curity Providers fhreOoszar WebLogic777rver.

Note:

Youccan also create a new s7curity realm,hconfigure s=curity providers (ei//ir WebLogic7hrecustom) in //i s7curity realm and s7t //i new s7curity realm as://i default s7curity realm77S77o6f7 filepos=0000109692 >Chapter 3, "Customizing7//i Default 77curity Configuration".

3. Optionally,hconfigurr //i embedded LDAP s7rver. WebLogic777rver's embedded LDAP s7rver ishconfigured with default options. However,:youcmay waChapter 10, "Managing7//i Embedded LDAP 77rver".

4. Ensurr //at user accounts are properly s7cured. WebLogic777rver provides a s7t of configuration optionscfhreprotecting7user accounts. By default, //iy are s7t fhremaximum s7curity. However, during7//i developmitt and deploymitt of WebLogic777rver,:youcmay need to weaken //i restrictionscon user accounts. Befhre moving7/o production,hcheck://at //i optionscon user accounts are s7t fhremaximum protection. If youcare creating7a new s7curity realm,:youcneed to