3.11. 참조 무결성을 사용하여 항목 간 관계를 유지 관리
참조 무결성은 Directory Server가 관련 항목 간의 관계를 유지 관리하도록 하는 데이터베이스 메커니즘입니다. 이 기능을 사용하여 디렉터리의 한 항목에 대한 업데이트가 업데이트된 항목을 참조하는 다른 항목에 올바르게 반영되도록 할 수 있습니다.
예를 들어 디렉토리에서 사용자를 제거하고 Referential Integrity 플러그인이 활성화된 경우 서버는 사용자가 멤버인 모든 그룹에서 사용자를 제거합니다. 플러그인이 활성화되어 있지 않으면 관리자가 수동으로 제거할 때까지 사용자는 그룹의 멤버로 유지됩니다.
사용자 및 그룹 관리를 위해 Directory Server를 Directory Server를 사용하는 다른 제품과 통합하면 참조 무결성은 중요한 기능입니다.
3.11.1. Referential Integrity 플러그인이 작동하는 방식 링크 복사링크가 클립보드에 복사되었습니다!
Referential Integrity 플러그인을 활성화하면 멤버
,uniqueMember
,owner
에서 무결성 업데이트를 수행하고 작업 직후 기본적으로 도 특성을 볼
수 있습니다.
예를 들어 관리자가 디렉터리 내에서 그룹 또는 사용자를 삭제, 업데이트, 이름 변경 또는 이동하는 경우 Directory Server는 참조 무결성 로그 파일에 작업을 기록합니다. 그러면 Directory Server는 이 로그 파일의 고유 이름(DN)을 사용하고 플러그인 구성에 지정된 속성과 일치하는 항목을 검색한 다음 일치하는 항목을 업데이트합니다. 예를 들어 cn=demo,dc=example,dc=com
항목을 삭제한 후 플러그인은 member
속성이 cn=demo,dc=example,dc=com
으로 설정된 항목을 검색하고 이러한 멤버
속성을 제거합니다. 이후 플러그인은 uniqueMember
,owner
및 see
also 특성에 대해 동일하게 수행합니다.
기본적으로 Directory Server는 원래 작업과 동일한 트랜잭션에서 검색하고 업데이트합니다. 검색 및 업데이트 작업은 시간이 오래 걸릴 수 있으므로 원래 작업이 완료된 후 이를 지연할 수 있습니다. dsconf 플러그인 referential-integrity set 명령의
업데이트와 분리할 수 있습니다.
--update-delay
옵션을 사용하여 원래 작업을 무결성
수정 및 삭제 작업의 성능이 저하되지 않도록 하려면 참조 무결성 플러그인 구성에 지정한 속성을 인덱싱합니다.
3.11.2. 명령줄을 사용하여 Referential Integrity 플러그인 구성 링크 복사링크가 클립보드에 복사되었습니다!
명령줄을 사용하여 Referential Integrity 플러그인을 구성할 수 있습니다.
복제 토폴로지의 모든 공급자에 대해 이 절차를 수행합니다.
절차
Referential Integrity 플러그인을 활성화합니다.
dsconf <instance_name> plugin referential-integrity enable
# dsconf <instance_name> plugin referential-integrity enable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 플러그인이 사용자 항목의 삭제 또는 이름 변경 작업을 검색하는 하위 트리를 설정합니다.
dsconf <instance_name> plugin referential-integrity set --entry-scope "ou=People,dc=example,dc=com"
# dsconf <instance_name> plugin referential-integrity set --entry-scope "ou=People,dc=example,dc=com"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 선택 사항: 항목 범위 아래에 하위 트리를 제외합니다.
dsconf <instance_name> plugin referential-integrity set --exclude-entry-scope "ou=Special Users,ou=People,dc=example,dc=com"
# dsconf <instance_name> plugin referential-integrity set --exclude-entry-scope "ou=Special Users,ou=People,dc=example,dc=com"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이 명령은
ou=Special Users,ou=People,dc=example,dc=com
하위 트리에서 수행되는 삭제 또는 이름 변경 작업을 무시하도록 플러그인을 구성합니다.플러그인에서 그룹 항목을 업데이트하는 하위 트리를 구성합니다.
dsconf <instance_name> plugin referential-integrity set --container-scope "ou=Groups,dc=example,dc=com"
# dsconf <instance_name> plugin referential-integrity set --container-scope "ou=Groups,dc=example,dc=com"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 기본적으로 플러그인은
멤버
,uniqueMember
,owner
에서 무결성 업데이트를 수행하고도 특성을 참조하십시오
. 다른 속성을 지정하려면 다음을 입력합니다.dsconf <instance_name> plugin referential-integrity set --membership-attr attribute_1 attribute_2
# dsconf <instance_name> plugin referential-integrity set --membership-attr attribute_1 attribute_2
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이 명령은 플러그인 구성의 속성 목록을 덮어씁니다. 속성을 추가하려면 현재 속성 목록과 추가 속성을
--membership-attr
옵션에 전달합니다.선택 사항: 기본적으로 Directory Server는 참조 무결성 검사를 즉시 수행합니다. 지연을 설정하려면 다음을 입력합니다.
dsconf <instance_name> plugin referential-integrity set --update-delay=5
# dsconf <instance_name> plugin referential-integrity set --update-delay=5
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이 명령은 참조 무결성 검사를
5
초로 지연합니다. 여러 공급업체에 대한 참조 무결성을 활성화한 경우 지연을 설정하면 복제 루프 및 디렉터리 불일치가 발생할 수 있습니다. 이러한 문제를 방지하려면 토폴로지의 한 공급자에서만 플러그인을 활성화합니다.인스턴스를 다시 시작합니다.
dsctl <instance_name> restart
# dsctl <instance_name> restart
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
검증
참조 무결성 플러그인 구성을 표시합니다.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 그룹의 멤버 특성을 표시하여 그룹의
멤버
를 나열합니다.ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=demoGroup,ou=Groups,dc=example,dc=com" member
# ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=demoGroup,ou=Groups,dc=example,dc=com" member ... member: uid=demoUser,ou=People,dc=example,dc=com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow uid=demoUser,ou=People,dc=example,dc=com
사용자를 삭제합니다.dsidm <instance_name> -b "dc=example,dc=com" user delete "uid=demoUser,ou=People,dc=example,dc=com"
# dsidm <instance_name> -b "dc=example,dc=com" user delete "uid=demoUser,ou=People,dc=example,dc=com"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 그룹 멤버를 다시 표시합니다.
ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=demoGroup,ou=People,dc=example,dc=com" member
# ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=demoGroup,ou=People,dc=example,dc=com" member
Copy to Clipboard Copied! Toggle word wrap Toggle overflow uid=demoUser,ou=People,dc=example,dc=com
이 더 이상 그룹의 멤버로 나열되지 않으면 Referential Integrity 플러그인이 작동합니다.
3.11.3. 웹 콘솔을 사용하여 참조 무결성 플러그인 구성 링크 복사링크가 클립보드에 복사되었습니다!
Directory Server 웹 콘솔을 사용하여 Referential Integrity 플러그인을 구성할 수 있습니다.
복제 토폴로지의 모든 공급자에 대해 이 절차를 수행합니다.
사전 요구 사항
- 웹 콘솔에서 인스턴스에 로그인되어 있습니다.
절차
-
. - 플러그인을 활성화합니다.
-
(인스턴스 재시작)를 클릭합니다. -
. -
기본적으로 플러그인은
멤버
,uniqueMember
,owner
에서 무결성 업데이트를 수행하고도 특성을 참조하십시오
. 다른 특성을 지정하려면멤버십 속성
필드에서 목록을 업데이트합니다. -
Entry Scope
필드를 플러그인에서 사용자 항목의 삭제 또는 이름 변경 작업을 검색해야 하는 하위 트리의 DN으로 설정합니다. -
선택 사항: 항목 범위 아래에 하위 트리를 제외하려면
제외 항목 범위
필드에 하위 트리의 DN을 입력합니다. -
컨테이너
범위
필드를 플러그인에서 그룹 항목을 업데이트해야 하는 하위 트리의 DN으로 설정합니다. -
선택 사항: 참조 무결성 로그 파일의 경로를 업데이트합니다. Directory Server는 이 파일을 사용하여 디렉터리의 변경 사항을 추적합니다.
dirsrv
사용자에게 이 위치에 대한 쓰기 권한이 있어야 합니다. 선택 사항: 기본적으로 Directory Server는 참조 무결성 검사를 즉시 수행합니다. 지연을 설정하려면
업데이트 지연
필드에 설정합니다.여러 공급업체에 대한 참조 무결성을 활성화한 경우 지연을 설정하면 복제 루프 및 디렉터리 불일치가 발생할 수 있습니다. 이러한 문제를 방지하려면 토폴로지의 한 공급자에서만 플러그인을 활성화합니다.
- 를 클릭합니다.
검증
그룹의 멤버 특성을 표시하여 그룹의
멤버
를 나열합니다.ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=demoGroup,ou=Groups,dc=example,dc=com" member
# ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=demoGroup,ou=Groups,dc=example,dc=com" member ... member: uid=demoUser,ou=People,dc=example,dc=com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow uid=demoUser,ou=People,dc=example,dc=com
사용자를 삭제합니다.dsidm <instance_name> -b "dc=example,dc=com" user delete "uid=demoUser,ou=People,dc=example,dc=com"
# dsidm <instance_name> -b "dc=example,dc=com" user delete "uid=demoUser,ou=People,dc=example,dc=com"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 그룹 멤버를 다시 표시합니다.
ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=demoGroup,ou=People,dc=example,dc=com" member
# ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=demoGroup,ou=People,dc=example,dc=com" member
Copy to Clipboard Copied! Toggle word wrap Toggle overflow uid=demoUser,ou=People,dc=example,dc=com
이 더 이상 그룹의 멤버로 나열되지 않으면 Referential Integrity 플러그인이 작동합니다.