Sun Java System Directory Server Enterprise Edition 6.3 管理指南

配置目录代理服务器实例

本部分介绍如何配置目录代理服务器实例。本部分中的过程使用 dpadmdpconf 命令。有关这些命令的信息,请参见 dpadm(1M)dpconf(1M) 手册页。

Procedure显示目录代理服务器实例的配置

  1. 键入 dpconf info


    $ dpconf info
    Instance Path           :  instance path
    Host Name               :  host
    Secure listen address   :  IP address
    Port                    :  port
    Secure port             :  secure port
    SSL server certificate  :  defaultServerCert
    
    Directory Proxy Server needs to be restarted.

    只有将 Secure listen addressNon-secure listen address 设置为非默认值时,dpconf info 才会显示这些属性。上面的输出不显示 Non-secure listen address,因为未将此属性设置为非默认值。

    如果需要重新启动实例,dpconf info 还会提醒用户重新启动。

    也可以使用 dpadm info 来显示目录代理服务器实例配置信息。

Procedure修改目录代理服务器的配置

本部分介绍如何修改目录代理服务器的配置。

可使用 DSCC 执行此任务。有关信息,请参见目录服务控制中心界面和 DSCC 联机帮助。

  1. 查找目录代理服务器的当前配置。


    $ dpconf get-server-prop -h host -p port
    

    allow-cert-based-auth                : allow
    allow-ldapv2-clients                             : true
    allow-persistent-searches                        : false
    allow-sasl-external-authentication               : true
    allow-unauthenticated-operations                 : true
    allowed-ldap-controls                            : -
    cert-data-view-routing-custom-list               : none
    cert-data-view-routing-policy                    : all-routable
    cert-search-attr-mappings                        : none
    cert-search-base-dn                              : none
    cert-search-bind-dn                              : none
    cert-search-bind-pwd                             : none
    cert-search-user-attr                            : userCertificate
    configuration-manager-bind-dn                    : cn=proxy manager
    configuration-manager-bind-pwd                   : {3DES}RPdIFbvoWdvhLR8lU43zCMZyKFGPxfFg
    connection-pool-wait-timeout                     : 3s
    data-source-read-timeout                         : 20s
    data-view-automatic-routing-mode                 : automatic
    email-alerts-enabled                             : false
    email-alerts-message-from-address                : local
    email-alerts-message-subject                     : Proxy Server Administrative Alert
    email-alerts-message-subject-includes-alert-code : false
    email-alerts-message-to-address                  : root@localhost
    email-alerts-smtp-host                           : localhost
    email-alerts-smtp-port                           : smtp
    enable-remote-user-mapping                       : false
    enable-user-mapping                              : false
    enabled-admin-alerts                             : none
    enabled-ssl-cipher-suites                        : JRE
    enabled-ssl-protocols                            : SSLv3
    enabled-ssl-protocols                            : TLSv1
    encrypt-configuration                            : true
    extension-jar-file-url                           : none
    is-restart-required                              : false
    number-of-search-threads                         : 20
    number-of-worker-threads                         : 50
    proxied-auth-check-timeout                       : 30m
    remote-user-mapping-bind-dn-attr                 : none
    scriptable-alerts-command                        : echo
    scriptable-alerts-enabled                        : false
    search-mode                                      : parallel
    search-wait-timeout                              : 10s
    ssl-client-cert-alias                            : none
    ssl-server-cert-alias                            : defaultServerCert
    supported-ssl-cipher-suites                      : SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DHE_DSS_WITH_DES_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DHE_RSA_WITH_DES_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DH_anon_EXPORT_WITH_RC4_40_MD5
    supported-ssl-cipher-suites                      : SSL_DH_anon_WITH_3DES_EDE_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DH_anon_WITH_DES_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_DH_anon_WITH_RC4_128_MD5
    supported-ssl-cipher-suites                      : SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_RSA_EXPORT_WITH_RC4_40_MD5
    supported-ssl-cipher-suites                      : SSL_RSA_WITH_3DES_EDE_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_RSA_WITH_DES_CBC_SHA
    supported-ssl-cipher-suites                      : SSL_RSA_WITH_NULL_MD5
    supported-ssl-cipher-suites                      : SSL_RSA_WITH_NULL_SHA
    supported-ssl-cipher-suites                      : SSL_RSA_WITH_RC4_128_MD5
    supported-ssl-cipher-suites                      : SSL_RSA_WITH_RC4_128_SHA
    supported-ssl-cipher-suites                      : TLS_DHE_DSS_WITH_AES_128_CBC_SHA
    supported-ssl-cipher-suites                      : TLS_DHE_RSA_WITH_AES_128_CBC_SHA
    supported-ssl-cipher-suites                      : TLS_DH_anon_WITH_AES_128_CBC_SHA
    supported-ssl-cipher-suites                      : TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
    supported-ssl-cipher-suites                      : TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA
    supported-ssl-cipher-suites                      : TLS_KRB5_EXPORT_WITH_RC4_40_MD5
    supported-ssl-cipher-suites                      : TLS_KRB5_EXPORT_WITH_RC4_40_SHA
    supported-ssl-cipher-suites                      : TLS_KRB5_WITH_3DES_EDE_CBC_MD5
    supported-ssl-cipher-suites                      : TLS_KRB5_WITH_3DES_EDE_CBC_SHA
    supported-ssl-cipher-suites                      : TLS_KRB5_WITH_DES_CBC_MD5
    supported-ssl-cipher-suites                      : TLS_KRB5_WITH_DES_CBC_SHA
    supported-ssl-cipher-suites                      : TLS_KRB5_WITH_RC4_128_MD5
    supported-ssl-cipher-suites                      : TLS_KRB5_WITH_RC4_128_SHA
    supported-ssl-cipher-suites                      : TLS_RSA_WITH_AES_128_CBC_SHA
    supported-ssl-protocols                          : SSLv2Hello
    supported-ssl-protocols                          : SSLv3
    supported-ssl-protocols                          : TLSv1
    syslog-alerts-enabled                            : false
    syslog-alerts-facility                           : USER
    syslog-alerts-host                               : localhost
    use-cert-subject-as-bind-dn                      : true
    use-external-schema                              : false
    user-mapping-anonymous-bind-dn                   : none
    user-mapping-anonymous-bind-pwd                  : none
    user-mapping-default-bind-dn                     : none
    user-mapping-default-bind-pwd                    : none
    verify-certs                                     : false

    或者,查看一个或多个配置属性的当前设置。


    $ dpconf get-server-prop -h host -p port property-name ...

    例如,通过运行以下命令确定是否允许未经验证的操作:


    $ dpconf get-server-prop -h host -p port allow-unauthenticated-operations
    allow-unauthenticated-operations  :  true
  2. 更改一个或多个配置参数。


    $ dpconf set-server-prop -h host -p port property:value ...

    例如,通过运行以下命令禁止未经验证的操作:


    $ dpconf set-server-prop -h host -p port allow-unauthenticated-operations:false

    如果您尝试执行非法更改,则此更改将不会生效。例如,如果将 allow-unauthenticated-operations 参数设置为 f 而不是 false,则会产生以下错误:


    $ dpconf set-server-prop -h host -p port allow-unauthenticated-operations:f
    The value "f" is not a valid value for the property "allow-unauthenticated-operations".
    Allowed property values: BOOLEAN
    The "set-server-prop" operation failed.
  3. 重新启动目录代理服务器实例以使更改生效(如有必要)。

    有关重新启动目录代理服务器的信息,请参见重新启动目录代理服务器

配置代理管理员

代理管理员是具有特权的管理员,与 UNIX® 系统上的超级用户类似。代理管理员条目是在创建目录代理服务器实例时定义的。代理管理员的默认 DN 为 cn=Proxy Manager

可以查看和更改代理管理员的 DN 和密码,如以下过程所示。

Procedure配置代理管理员

可使用 DSCC 执行此任务。有关信息,请参见目录服务控制中心界面和 DSCC 联机帮助。

  1. 查找代理管理员的配置。


    $ dpconf get-server-prop -h host -p port configuration-manager-bind-dn configuration-manager-bind-pwd
    configuration-manager-bind-dn   :  cn=proxy manager
    configuration-manager-bind-pwd  :  {3DES}U77v39WX8MDpcWVrueetB0lfJlBc6/5n

    代理管理员的默认值为 cn=proxy manager。将为配置管理员密码返回一个散列值。

  2. 更改代理管理员的 DN。


    $ dpconf set-server-prop -h host -p port configuration-manager-bind-dn:bindDN
    
  3. 创建包含代理管理员密码的文件,并设置指向该文件的属性。


    $ dpconf set-server-prop -h host -p port configuration-manager-bind-pwd-file:filename
    

需要重新启动服务器的配置更改

对目录代理服务器及其实体的大多数配置更改都可以联机进行。某些更改需要重新启动服务器后才能生效。如果对下表中的任何属性进行配置更改,都必须重新启动服务器:

aci-data-view
bind-dn
client-cred-mode
custom-distribution-algorithm
db-name
db-pwd
db-url
db-user
distribution-algorithm
ldap-address
ldap-port
ldaps-port
listen-address
listen-port
load-balancing-algorithm
num-bind-init
num-read-init
num-write-init
number-of-search-threads
number-of-threads
number-of-worker-threads
ssl-policy
use-external-schema

属性的 rwsrwd 关键字指示属性更改是否要求重新启动服务器。

要确定对某个属性的更改是否需要重新启动服务器,请运行以下命令:

$ dpconf help-properties | grep property-name

例如,要确定更改 LDAP 数据源的绑定 DN 是否需要重新启动服务器,请运行以下命令:

$ dpconf help-properties | grep bind-dn
connection-handler   	bind-dn-filters        rwd  STRING | any
This property specifies a set of regular expressions. The bind DN 
of a client must match at least one regular expression in order for 
the connection to be accepted by the connection handler. (Default: any)
ldap-data-source      bind-dn               rws  DN | ""
This property specifies the DN to use when binding to the LDAP data 
source. (Default: undefined)

要确定进行配置更改后是否必须重新启动服务器,请运行以下命令:

$ dpconf get-server-prop -h host -p port is-restart-required