JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Fusion Middleware Administration Guide for Oracle Unified Directory 11g Release 1 (11.1.1)
search filter icon
search icon

Document Information

Preface

1.  Starting and Stopping the Server

2.  Configuring the Server Instance

3.  Configuring the Proxy Components

4.  Configuring Security Between Clients and Servers

Getting SSL Up and Running Quickly

To Accept SSL-Based Connections Using a Self-Signed Certificate

Configuring Key Manager Providers

Key Manager Provider Overview

Using the JKS Key Manager Provider

To Self-Sign the Certificate

To Sign the Certificate by Using an External Certificate Authority

To Configure the JKS Key Manager Provider

Using the PKCS #12 Key Manager Provider

Using the PKCS #11 Key Manager Provider

Developing Custom Key Manager Providers

Configuring Trust Manager Providers

Overview of Certificate Trust Mechanisms

Using the Blind Trust Manager Provider

Using the JKS Trust Manager Provider

Using the PKCS #12 Trust Manager Provider

Configuring Certificate Mappers

Using the Subject Equals DN Certificate Mapper

Using the Subject Attribute to User Attribute Certificate Mapper

Using the Subject DN to User Attribute Certificate Mapper

Using the Fingerprint Certificate Mapper

Configuring SSL and StartTLS for LDAP and JMX

Configuring the LDAP and LDAPS Connection Handlers

To Enable a Connection Handler

To Specify a Connection Handler's Listening Port

To Specify a Connection Handler's Authorization Policy

To Specify a Nickname for a Connection Handler's Certificate

To Specify a Connection Handler's Key Manager Provider

To Specify a Connection Handler's Trust Manager Provider

To Enable StartTLS Support

To Enable SSL-Based Communication

Enabling SSL in the JMX Connection Handler

Using SASL Authentication

Supported SASL Mechanisms

Authorization IDs

SASL Options for the ANONYMOUS Mechanism

SASL Options for the CRAM-MD5 Mechanism

SASL Options for the DIGEST-MD5 Mechanism

SASL Options for the EXTERNAL Mechanism

SASL Options for the GSSAPI Mechanism

SASL Options for the PLAIN Mechanism

Configuring SASL Authentication

Configuring SASL External Authentication

Configuring the LDAP Connection Handler to Allow SASL EXTERNAL Authentication

Configuring the EXTERNAL SASL Mechanism Handler

Configuring SASL DIGEST-MD5 Authentication

Configuring SASL GSSAPI Authentication

Configuring Kerberos and the Oracle Unified Directory Directory Server for GSSAPI SASL Authentication

To Configure Kerberos V5 on a Host

To Specify SASL Options for Kerberos Authentication

Example Configuration of Kerberos Authentication Using GSSAPI With SASL

Assumptions for This Example

All Machines: Edit the Kerberos Client Configuration File

All Machines: Edit the Administration Server ACL Configuration File

KDC Machine: Edit the KDC Server Configuration File

KDC Machine: Create the KDC Database

KDC Machine: Create an Administration Principal and Keytab

KDC Machine: Start the Kerberos Daemons

KDC Machine: Add Host Principals for the KDC and Oracle Unified Directory Machines

KDC Machine: Add an LDAP Principal for the Directory Server

KDC Machine: Add a Test User to the KDC

Directory Server Machine: Install the Directory Server

Directory Server Machine: Create and Configure the Directory Server LDAP

Directory Server Machine: Configure the Directory Server to Enable GSSAPI

Directory Server Machine: Add a Test User to the Directory Server

Directory Server Machine: Obtain a Kerberos Ticket as the Test User

Client Machine: Authenticate to the Directory Server Through GSSAPI

Troubleshooting Kerberos Configuration

Testing SSL, StartTLS, and SASL Authentication With ldapsearch

ldapsearch Command Line Arguments Applicable To Security

Testing SSL

Testing StartTLS

Testing SASL External Authentication

Controlling Connection Access Using Allowed and Denied Rules

Property Syntax of Allowed and Denied Client Rules

Configuring Allowed and Denied Client Rules

5.  Configuring Security Between the Proxy and the Data Source

6.  Managing Oracle Unified Directory With Oracle Directory Services Manager

7.  Managing Directory Data

8.  Replicating Directory Data

9.  Controlling Access To Data

10.  Managing Users and Groups With dsconfig

11.  Managing Password Policies

12.  Managing Directory Schema

13.  Monitoring Oracle Unified Directory

14.  Tuning Performance

15.  Advanced Administration

Configuring SASL Authentication

This section describes the requirements for configuring directory server to use the various SASL authentication mechanisms.


Note - SASL is not supported for use with Oracle Unified Directory proxy.


Configuring SASL External Authentication

The SASL EXTERNAL mechanism is used to allow a client to authenticate itself to the directory server using information provided outside of what is strictly considered LDAP communication. The directory server currently supports authentication using a client certificate presented to the server during SSL or StartTLS negotiation, for LDAP communication only.

Configuring the LDAP Connection Handler to Allow SASL EXTERNAL Authentication

For the directory server to be able to map the client certificate to a user entry, ensure that the connection handler is configured to handle client certificates. Use the dsconfig to set the following LDAP connection handler properties:


Note - The dsconfig command accesses the server configuration over SSL via the administration connector. As such, the relevant connection options must be specified, including how the SSL certificate is trusted. These examples use the -X option to trust all certificates.


The following example uses dsconfig to set LDAP connection handler properties:

$ dsconfig -h localhost -p 4444 -D "cn=directory manager"-w password -X -n \
  set-connection-handler-prop --handler-name "LDAP Connection Handler"
Configuring the EXTERNAL SASL Mechanism Handler

SASL EXTERNAL bind requests are processed by the SASL mechanism handler. Use the dsconfig command to set the following SASL mechanism handler properties:

The following example uses dsconfig to set EXTERNAL SASL mechanism handler properties:

$ dsconfig -h localhost -p 4444 -D "cn=directory manager"-w password -X -n \
  set-sasl-mechanism-handler-prop --handler-name "EXTERNAL" --advanced 

Configuring SASL DIGEST-MD5 Authentication

This section explains the access control and privilege restrictions on a user using the authorization ID keyword (authzid). If the user is not using the authzid keyword, these restrictions do not apply. Any user that binds using DIGEST-MD5 and the authzid keyword must fulfill the following requirements:

The following example creates a test environment and then demonstrates the requirements for a user authentication using the DIGEST-MD5 SASL mechanism.

  1. Import the following entries into the directory. These entries define an ACI and three users:

    • The entry uid=user.0,ou=People,dc=example,dc=com does not have the proxied-auth privilege but is granted proxy access by the ACI.

    • The entry uid=user.1,ou=People,dc=example,dc=com has the proxied-auth privilege but is not granted proxy access by the ACI.

    • The entry uid=user.2,ou=People,dc=example,dc=com has the proxied-auth privilege and is granted proxy access by the ACI.

    dn: ou=People,dc=example,dc=com
    objectClass: top
    objectClass: organizationalunit
    objectClass: posixGroup
    ou: People
    aci: (target="ldap:///uid=proxy user,ou=People,dc=example,dc=com") \
     (targetattr="*") (version 3.0; acl "allow SASL Example"; \
     allow (proxy) userdn="ldap:///uid=user.0,ou=People,dc=example,dc=com || 
     ldap:///uid=user.2,ou=People,dc=example,dc=com";)
    
    dn: uid=user.0,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalperson
    objectClass: inetorgperson
    ...
    description: This is the description for user.0
    
    dn: uid=user.1,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalperson
    objectClass: inetorgperson
    ...
    description: This is the description for user.1
    ds-privilege-name: proxied-auth
    
    dn: uid=proxy user,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalperson
    objectClass: inetorgperson
    ...
    description: This is the description for proxy user
    
    dn: uid=user.2,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalperson
    objectClass: inetorgperson
    ...
    description: This is the description for user.2
    ds-privilege-name: proxied-auth
  2. Bind using DIGEST-MD5 as uid=user.1,ou=People,dc=example,dc=com:

    $ ldapsearch --port 1389 -w password --saslOption mech=DIGEST-MD5 \
      --saslOption authid=dn:uid=user.1,ou=People,dc=example,dc=com --saslOption \
      authzid=dn:uid=proxy user,ou=People,dc=example,dc=com --baseDN "" \
      --searchScope base "(objectClass=*)"
     The SASL DIGEST-MD5 bind attempt failed Result Code: 49 (Invalid Credentials)

    The search fails because uid=user.1,ou=People,dc=example,dc=com is not granted the proxy right by the ACI.

  3. Bind using DIGEST-MD5 as uid=user.0,ou=People,dc=example,dc=com:

    $ ldapsearch --port 1389 -w password --saslOption mech=DIGEST-MD5 \
      --saslOption authid=dn:uid=user.0,ou=People,dc=example,dc=com --saslOption \
      authzid=dn:uid=proxy user,ou=People,dc=example,dc=com --baseDN "" \
      --searchScope base "(objectClass=*)"
    The SASL DIGEST-MD5 bind attempt failed Result Code: 49 (Invalid Credentials)

    The search fails because uid=user.0,ou=People,dc=example,dc=com does not have the proxied-authproperty.

  4. Bind using DIGEST-MD5 as uid=user.2,ou=People,dc=example,dc=com authid with both access control access and the proxied-auth privilege:

    $ ldapsearch --port 1389 -w password --saslOption mech=DIGEST-MD5 \
      --saslOption authid=dn:uid=user.2,ou=People,dc=example,dc=com --saslOption \
      authzid=dn:uid=proxy user,ou=People,dc=example,dc=com --baseDN "" \
      --searchScope base "(objectClass=*)"
    dn: 
    objectClass: ds-root-dse 
    objectClass: top

    The search succeeds because uid=user.2,ou=People,dc=example,dc=com has access allowed by the ACI and the proxied-auth privilege.

Configuring SASL GSSAPI Authentication

This section explains the access control and privilege restrictions on a user using the authorization ID keyword (authzid). If the user is not using the authzid keyword, the restrictions do not apply.

Any user that binds using GSSAPI must fulfill the following requirements:

The following example creates a test environment with three example entries and demonstrates the requirements for user authentication using the GSSAPI SASL mechanism. These examples require a fully configured Kerberos environment, including a valid keytab file.

  1. Create three Kerberos principals in the realm TESTLOCAL.NET:

    • user.0@TESTLOCAL.NET

    • user.1@TESTLOCAL.NET

    • user.2@TESTLOCAL.NET

  2. Configure the GSSAPI SASL handler to be enabled, to use the regular expression identity mapper, and to use a valid TESTLOCAL.NET keytab file.

    $ dsconfig -h localhost -p 4444 -D "cn=directory manager" -w password -X \
      set-sasl-mechanism-handler-prop --handler-name "GSSAPI" \
      --set enabled:true --set identity-mapper:"Regular Expression" \
      --set keytab:keytabPath

    The default value of the GSSAPI enabled property is false, so it must be set to true. The default value of identity-mapper is Regular Expression. The default value of the keytab property is /etc/krb5/krb5.keytab.

  3. Import the following entries into the directory. These entries define an ACI and three users:

    • The entry uid=user.0,ou=People,dc=example,dc=com does not have the proxied-auth privilege but is granted proxy access by the ACI.

    • The entry uid=user.1,ou=People,dc=example,dc=com has the proxied-auth privilege but is not granted proxy access by the ACI.

    • The entry uid=user.2,ou=People,dc=example,dc=com has the proxied-auth privilege and is granted proxy access by the ACI.

    dn: ou=People,dc=example,dc=com
    objectClass: top
    objectClass: organizationalunit
    objectClass: posixGroup
    ou: People
    aci: (target="ldap:///uid=proxy user,ou=People,dc=example,dc=com") \
     (targetattr="*") (version 3.0; acl "allow SASL Example"; \
     allow (proxy) userdn="ldap:///uid=user.0,ou=People,dc=example,dc=com"
     || "ldap:///uid=user.2,ou=People,dc=example,dc=com";)
    
    
    dn: uid=user.0,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalperson
    objectClass: inetorgperson
    uid=user.0
    ...
    description: This is the description for user.0
    
    dn: uid=user.1,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalperson
    objectClass: inetorgperson
    uid=user.1
    ...
    description: This is the description for user.1
    ds-privilege-name: proxied-auth
    
    dn: uid=user.2,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalperson
    objectClass: inetorgperson
    uid=user.2
    ...
    description: This is the description for user.2
    ds-privilege-name: proxied-auth
    
    dn: uid=proxy user,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalperson
    objectClass: inetorgperson
    uid=proxy user
    ...
    description: This is the description for proxy user
  4. Run this command to demonstrate a failing GSSAPI SASL bind using the Kerberos principal, user.0@TESTLOCAL.NET:

    $ ldapsearch --port 1389 \
      --saslOption mech=GSSAPI \
      --saslOption authid=user.1@TESTLOCAL.NET \
      --saslOption authzid=dn:uid=proxy user,ou=People,dc=example,dc=com \
      --baseDN "" --searchScope base "(objectClass=*)"
    The SASL DIGEST-MD5 bind attempt failed
    Result Code:  49 (Invalid Credentials)

    This search fails because user.0@TESTLOCAL.NET maps to uid=user.0,ou=People,dc=example,dc=com, which has the proxied-auth privilege but does not have access control permissions to uid=proxy user,ou=People,dc=example,dc=com.

  5. Run this command to demonstrate a failing GSSAPI SASL bind using the Kerberos principal, user.1@TESTLOCAL.NET.

    $ ldapsearch --port 1389 \
      --saslOption mech=GSSAPI \
      --saslOption authid=user.2@TESTLOCAL.NET \
      --saslOption authzid=dn:uid=proxy user,ou=People,dc=example,dc=com \
      --baseDN "" --searchScope base "(objectClass=*)"
    The SASL DIGEST-MD5 bind attempt failed
    Result Code:  49 (Invalid Credentials)

    This search fails because user.1@TESTLOCAL.NET maps to uid=user.1,ou=People,dc=example,dc=com, which has access control permissions to uid=proxy user,ou=People,dc=example,dc=com but does not have the proxied-auth privilege.

  6. Run this command to demonstrate a successful GSSAPI SASL bind using the Kerberos principal user.2@TESTLOCAL.NET:

    $ ldapsearch --port 1389 \
      --saslOption mech=GSSAPI \
      --saslOption authid=user.0@TESTLOCAL.NET \
      --saslOption authzid=dn:uid=proxy user,ou=People,dc=example,dc=com \
      --baseDN "" --searchScope base "(objectClass=*)"
    dn:
    objectClass: ds-root-dse
    objectClass: top }}} \\ \\ 

    This search succeeds because user.2@TESTLOCAL.NET maps to uid=user.2,ou=People,dc=example,dc=com, which has both the proxied-auth privilege and access control permission to id=proxy user,ou=People,dc=example,dc=com.