0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OpenLDAP refintモジュールの利用

0
Posted at

OpenLDAPのrefintモジュール

OpenLDAPのrefintモジュールは、LDAPのユーザーエントリの削除・DN変更に合わせて、グループメンバーのエントリを自動的に更新してくれる機能です。

例えば、LDAPのユーザーエントリとグループエントリとして次のエントリが存在する時を考えてみます。

dn: cn=user1,ou=Users,dc=example,dc=com
objectClass: person
cn: user1
sn: user1

dn: cn=group1,ou=Groups,dc=example,dc=com
objectClass: groupOfNames
cn: group1
description: group1
member: cn=master,dc=example,dc=com
member: cn=user1,ou=Users,dc=example,dc=com

通常の設定では、user1エントリを削除やDNの変更をするときに、合わせて group1エントリから 「member:cn=user1,ou=Users,dc=example,dc=com」のエントリの削除やDN変更も実行する必要があります。

refintモジュールを利用すると、ユーザー削除やDN変更操作のときに group1エントリの 「member:cn=user1,ou=Users,dc=example,dc=com」属性の更新処理を自動化することができます。

slapd.conf形式で必要な設定は次のようになります。

moduleload refint
...
overlay refint
refint_attributes member
refint_nothing "cn=master,dc=example,dc=com"

refintの処理は各LDAPサーバーごとのoverlayにより実施されるため、レプリケーション設定で繋がっているプロバイダー(マスター)、コンシューマー(スレーブ)の全てのサーバーに同じ内容で設定が必要です。

また、refint_nothingパラメーターには、refint処理を行わないDNを指定します。
上記の例では、グループエントリが groupOfNamesオブジェクトクラスで構成されており、必ず1つのmember属性が必要なため、cn=masterのエントリが自動的に削除されないように、refint_nothingパラメーターで指定しています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?