Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide

Creating, Configuring, and Deleting Connection Handlers

For information about how to create, configure, and delete connection handlers, and to configure affinity for data views, see the following procedures.

ProcedureTo Create a Connection Handler

You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.

  1. Create a connection handler.


    $ dpconf create-connection-handler -h host -p port connection-handler-name
    
  2. (Optional) View the list of connection handlers.


    $ dpconf list-connection-handlers -h host -p port
    

ProcedureTo Configure a Connection Handler

Before You Begin

The properties of a connection handler must be defined in relation to the properties of the other connection handlers that are defined for the Directory Proxy Server instance. Consider the properties of all of your connection handlers to ensure that they specify different sets of criteria and are prioritized correctly.

You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.

  1. View a verbose list of connection handlers to see their key properties and relative priorities.


    $ dpconf list-connection-handlers -h host -p port -v
    Name                        is-enabled  priority  description
    --------------------------  ----------  --------  ---------------------------
    anonymous                   false       99        unauthenticated connections
    default connection handler  true        100       default connection handler

    The connection handlers anonymous and default connection handler are created when you create an instance of Directory Proxy Server.

  2. View all of the properties of one connection handler.


    $ dpconf get-connection-handler-prop -h host -p port connection-handler-name
    

    The default properties of a new connection handler are as follows:


    aci-source                     :  -
    allowed-auth-methods           :  anonymous
    allowed-auth-methods           :  sasl
    allowed-auth-methods           :  simple
    allowed-ldap-ports             :  ldap
    allowed-ldap-ports             :  ldaps
    bind-dn-filters                :  any
    data-view-routing-custom-list  :  -
    data-view-routing-policy       :  all-routable
    description                    :  -
    domain-name-filters            :  any
    enable-data-view-affinity      :  false
    ip-address-filters             :  any
    is-enabled                     :  false
    is-ssl-mandatory               :  false
    priority                       :  99
    request-filtering-policy       :  no-filtering
    resource-limits-policy         :  no-limits
    schema-check-enabled           :  false
    user-filter                    :  any
  3. Configure the priority of the connection handler.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name priority:value
    

    The priority can be any number from 1 to 100, where 1 is the highest priority. For an instance of Directory Proxy Server, the connection handlers are evaluated in order of priority.

  4. (Optional) Specify the DN filtering property of the connection handler.

    This property enables you to control access based on part or all of the bind DN. The value of the property is a regular expression.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     bind-dn-filters:regular-expression
    

    The bind DN filter takes the form of a JavaTM regular expression. For information about creating Java regular expressions, see http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html.

    For example, to send all binds from users under ou=people,dc=example,dc=com to a connection handler named secure-handler, set the bind-dn-filters property as follows:


    $ dpconf set-connection-handler-prop -h host1 -p 1389 secure-handler \
     bind-dn-filters:"uid=.*,ou=people,dc=example,dc=com"
  5. (Optional) Specify the name of a request filtering policy to use with this connection handler.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     request-filtering-policy:policy-name
    

    where policy-name is the name of an existing request filtering policy. For information about how to create and configure a request filtering policy, see Creating and Configuring Request Filtering Policies and Search Data Hiding Rules.

  6. (Optional) Specify the name of a resource limits policy to use with this connection handler.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     resource-limits-policy:policy-name
    

    where policy-name is the name of an existing resource limits policy. For information about how to create and configure a resource limits policy, see Creating and Configuring a Resource Limits Policy.

  7. Configure any other properties that are listed in Step 2.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     property:value [property:value ...]

    For example, configure the connection handler to accept SSL connections only.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     is-ssl-mandatory:true

    For a description of a property and a list of its valid values, run this command:


    $ dpconf help-properties connection-handler
  8. Enable the connection handler.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name is-enabled:true
  9. If necessary, restart the instance of Directory Proxy Server for the changes to take effect.

    For information about restarting Directory Proxy Server, see To Restart Directory Proxy Server.

ProcedureTo Delete a Connection Handler

You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.

  1. (Optional) View the list of connection handlers.


    $ dpconf list-connection-handlers -h host -p port
    
  2. Delete one or more connection handlers.


    $ dpconf delete-connection-handler -h host -p port connection-handler-name [connection-handler-name ... ]

ProcedureTo Configure Affinity for Data Views

When a connection is allocated to a connection handler, requests on that connection are exposed to the list of data views that are configured for that connection handler, or to all of the configured data views. Successive requests on that connection are exposed exclusively to the data view that is used for the first request.

You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.

  1. Enable affinity for data views.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     enable-data-view-affinity:true
  2. (Optional) Configure the connection handler to route requests to a custom list of data views.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name data-view-routing-policy:custom
  3. (Optional) Configure the list of data views.


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     data-view-routing-custom-list:view-name [data-view-routing-custom-list:view-name ...]

    To add a data view to an existing list of data views, use this command:


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     data-view-routing-custom-list+:view-name
    

    To remove a data view from an existing list of data views, use this command:


    $ dpconf set-connection-handler-prop -h host -p port connection-handler-name \
     data-view-routing-custom-list-:view-name