다중 LDAP 서버에서 보안 장애 복구

WebSphere® Application Server 보안은 다중 LDAP(Lightweight Directory Access Protocol) 호스트에서 장애 복구를 시동하도록 구성 가능합니다.

참고: 이 주제는 하나 이상의 애플리케이션 서버 로그 파일을 참조합니다. 권장되는 대안은 분배 및 IBM® i 시스템에서 SystemOut.log, SystemErr.log, trace.logactivity.log 파일을 사용하는 대신 HPEL(High Performance Extensible Logging) 로그를 사용하고 인프라를 추적하도록 서버를 구성하는 것입니다. 원시 z/OS® 로깅 기능과 연계하여 HPEL을 사용할 수도 있습니다. HPEL을 사용하는 경우 서버 프로파일 바이너리 디렉토리의 LogViewer 명령행 도구를 사용하여 모든 로그에 액세스하고 정보를 추적할 수 있습니다. HPEL 사용에 대한 자세한 정보는 HPEL을 사용한 애플리케이션 문제점 해결 정보를 참조하십시오.

현재 활성 LDAP 서버가 사용 불가능한 경우 WebSphere Application Server 보안은 지정한 호스트 목록에서 사용 가능한 첫 번째 LDAP 호스트로 장애 복구를 시도합니다. 다중 LDAP 서버는 동일한 마스터 LDAP 서버의 복제본이거나 동일한 스키마를 포함하는 모든 LDAP 호스트일 수 있으며 여기에는 동일한 LDIF(LDAP Data Interchange Format)에서 가져온 데이터가 포함됩니다.

장애 복구 발생 시마다 WebSphere Application Server 보안은 항상 지정한 호스트 목록에서 사용 가능한 첫 번째 LDAP 서버를 사용합니다. 예를 들어, L1, L2, L3, L4 순서로 4개의 LDAP 서버가 구성된 경우 L1은 기본 LDAP 서버로 처리됩니다. 연결 선호도는 L1에서 L4까지 입니다. 예를 들어, WebSphere Application Server 보안이 현재 L4에 연결되어 있고 장애 복구 또는 다시 연결이 필요한 경우, WebSphere Application Server 보안은 우선 해당 순서에서 L1, L2, L3 순으로 연결이 성공할 때까지 시도합니다.

현재 LDAP 호스트 이름은 WebSphere Application Server 로그 파일 SystemOut.log에서 메시지 SECJ0419I에 로깅됩니다. 기본 LDAP 호스트를 다시 연결하려면 WebSphere Application Server MBean 메소드 resetLDAPBindInfo에서 null,null을 입력으로 사용하여 실행하십시오.

다중 LDAP 호스트에서 LDAP 장애 복구를 구성하려면 wsadmin 또는 ConfigService를 사용하여 숫자 제한이 없는 백업 LDAP 호스트를 포함해야 합니다. 관리 콘솔에 표시되는 LDAP 호스트는 기본 LDAP 호스트이며 security.xml의 LDAP 호스트 목록에 나열되는 첫 번째 항목입니다.

WebSphere Application Server 보안 영역 이름의 기본값은 관리 콘솔에 표시되는 기본 LDAP 호스트 이름입니다. 여기에는 후미 콜론 및 포트 번호(있는 경우)가 포함됩니다. 그렇지만 사용자 정의 특성 com.ibm.websphere.security.ldap.logicRealm은 기본 보안 영역 이름을 대체하기 위해 추가할 수 있습니다. logicRealm 이름을 사용하여 각 셀이 상호 운용성 및 역호환성을 위해 자체 LDAP 호스트를 포함하고 LDAP 호스트를 동적으로 추가 또는 제거하는 융통성을 제공하도록 각 셀을 구성하십시오. 이전 설치에서 마이그레이션하는 경우 새 logicRealm 이름은 관리 보안가 다시 사용 가능해질 때까지 영향을 주지 않습니다. 논리 영역을 지원하지 않는 이전 릴리스와 호환되도록 logicRealm 이름은 이전 설치에서 사용되는 이름과 동일해야 합니다(후미 콜론 및 포트 번호가 포함된 LDAP 호스트 이름).

LDAP 장애 복구가 WebSphere Application Server에 대해 투명하게 변환하는 로드 밸런서를 사용하여 단일 호스트 이름을 다중 IP 주소에 연관시켜 구성되면 유효하지 않은 비밀번호를 입력하는 경우 다중 LDAP 바인드 항목이 작성됩니다. WebSphere Application Server에서는 재시도하고 로드 밸런서는 요청을 다중 복제본으로 라우팅합니다. 기본 설정으로 LDAP 바인드 재시도 횟수는 연관된 IP 주소 수보다 1만큼 큰 수와 동등합니다. 이는 한 개의 올바르지 않은 로그인 시도로 인해 LDAP 계정이 잠금될 수 있음을 나타냅니다. com.ibm.websphere.security.registry.ldap.singleLDAP 사용자 정의 특성은 false로 설정되고 LDAP 바인드 호출은 재시도되지 않습니다.

LDAP 장애 복구가 wsadmin 명령을 사용하여 백엔드 LDAP 서버 호스트 이름으로 등록되어 구성된 경우, com.ibm.websphere.security.ldap.retryBind 특성을 false로 설정하십시오.

다음 Jacl 예는 wsadmin을 사용하여 백업 LDAP 호스트를 장애 복구용으로 추가하는 방법을 보여줍니다.
#---------------------------------------------------------------
# Main
#  This is a bi-modal script: it can be included in the wsadmin
#  command invocation like this:
#     wsadmin -f LDAPAdd.jacl ldaphost 800
#
#  or the script can be sourced from the wsadmin command line:
#     wsadmin> source LDAPAdd.jacl
#     wsadmin> LDAPAdd ldaphost 800
#
#  The script expects some parameters:
#      arg1 - LDAP Server host name
#      arg2 - LDAP Server port number
#---------------------------------------------------------------
if { !($argc == 2)} {
   puts ""
   puts "LDAPAdd: This script requires 2 parameters: LDAP server host name and LDAP server port number"
   puts "For example: LDAPAdd ldaphost 389"
   puts ""
   return;
}
else {
   set ldapServer        [lindex $argv 0]
   set ldapPort          [lindex $argv 1]
   LDAPAdd $ldapServer $ldapPort
   return;
}
proc LDAPAdd {ldapServer ldapPort args} {
   global AdminConfig AdminControl ldapServer ldapPort
   set ldapServer  lindex $args 0
   set ldapPort  lindex $args 1
   global ldapUserRegistryId
   # Get the LDAP user registry object from the security configuration
   if { catch {$AdminConfig list LDAPUserRegistry} result } {
      puts stdout "\$AdminConfig list LDAPUserRegistry caught an exception $result\n"
      return
   } 
   else {
      if {$result != {}} {
         set ldapUserRegistryId  lindex $result 0
      } 
      else {
         puts stdout "\$AdminConfig list LDAPUserRegistry caught an exception $result\n"
         return;
      }
   }
   # Set the host and port values in Attrs2 
   set Attrs2  list  list hosts  list  list  list host
   $ldapServer
   list port $ldapPort
   
   # Modify the LDAP configuration host object
   $AdminConfig modify $ldapUserRegistryId $Attrs2
   $AdminConfig save
}
다음 Jython 예는 wsadmin을 사용하여 백업 LDAP 호스트를 장애 복구용으로 추가하는 방법을 보여줍니다.
#---------------------------------------------------------------
# Add ldap hostname and port
#     wsadmin -f LDAPAdd.py arg1 arg2
#
#  The script expects some parameters:
#      arg1 - LDAP Server hostname
#      arg2 - LDAP Server portnumber
#---------------------------------------------------------------
import java

#-------------------------------------------------------
# get the line separator and use to do the parsing 
# since the line separator on different platform are different
lineSeparator = java.lang.System.getProperty('line.separator')

#-------------------------------------------------------------------------------
# add LDAP host
#-------------------------------------------------------------------------------
def LDAPAdd (ldapServer, ldapPort):
    global AdminConfig, lineSeparator, ldapUserRegistryId
    try:
        ldapObject = AdminConfig.list("LDAPUserRegistry")
        if len(ldapObject) == 0:
            print "LDAPUserRegistry ConfigId was not found\n"
            return

        ldapUserRegistryId = ldapObject.split(lineSeparator)[0]
        print "Got LDAPUserRegistry ConfigId is " + ldapUserRegistryId + "\n"
    except:
        print "AdminConfig.list('LDAPUserRegistry') caught an exception\n"

    try:
        secMbeans = AdminControl.queryNames('WebSphere:type=SecurityAdmin,*') 
        if len(secMbeans) == 0:
            print "Security Mbean was not found\n"
            return

        secMbean = secMbeans.split(lineSeparator)[0]
        print "Got Security Mbean is " + secMbean + "\n"
    except:
        print "AdminControl.queryNames('WebSphere:type=SecurityAdmin,*') caught an exception\n"


    attrs2 = [["hosts", [[["host", ldapServer], ["port", ldapPort]]]]]
    try:
        AdminConfig.modify(ldapUserRegistryId, attrs2)
        try:
            AdminConfig.save()
            print "Done setting up attributes values for LDAP User Registry"
            print "Updated was saved successfully\n"
        except:
            print "AdminConfig.save() caught an exception\n"
    except:
        print "AdminConfig.modify(" + ldapUserRegistryId + ", " + attrs2 + ") caught an exception\n"
    return

#-------------------------------------------------------------------------------
# Main entry point
#-------------------------------------------------------------------------------
if len(sys.argv) < 2 or len(sys.argv) > 3:
        print("LDAPAdd: this script requires 2 parameters: LDAP server hostname and LDAP server port number\n")
        print("e.g.: LDAPAdd ldaphost 389\n")
        sys.exit(1)
else:
        ldapServer = sys.argv[0]
        ldapPort = sys.argv[1]
        LDAPAdd(ldapServer, ldapPort)
        sys.exit(0)

주제 유형을 표시하는 아이콘 개념 주제



시간소인 아이콘 마지막 업데이트 날짜: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=csec_secfailover_ldap
파일 이름:csec_secfailover_ldap.html