LDAP ACLは、ユーザーが自分のユーザー属性のみを読み取ることを制限します。

LDAP ACLは、ユーザーが自分のユーザー属性のみを読み取ることを制限します。

ユーザーが自分のデータ以外のデータにアクセスするのを防ぎたい。

私は次のような単純なacl(ldif)を実装しようとしています。

dn: olcDatabase={1}mdb,cn=config
olcAccess: {0}to attrs=userPassword by self write by anonymous auth by * none
olcAccess: {1}to attrs=shadowLastChange by self write by self read by * none
olcAccess: {2}to * by self read by * none

このldifを適用すると、これ以上はクエリされません(objectClass=posixAccount)。最後のaclをに変更すると、to * by * readクエリはすべてのユーザーを返します。

私は何を見逃していますか?

ベストアンサー1

記録にアクセスするには「検索」権限が必要であることがわかりました。 ACLを次のように変更しました。

dn: olcDatabase={1}mdb,cn=config
olcAccess: {0}to attrs=userPassword by self write by anonymous auth by * none
olcAccess: {1}to attrs=shadowLastChange by self write by self read by * none
olcAccess: {2}to * by self read by * search

これにより、(objectClass=posixAccount)他のアカウントを表示せずにクエリを実行できます。

おすすめ記事