LDAPサブツリーにオブジェクトを作成するための匿名アクセスを許可する方法は?

LDAPサブツリーにオブジェクトを作成するための匿名アクセスを許可する方法は?

PGP キーで LDAP を入力する際に​​問題があります。 PGPキーサーバー構造にLDAP(重要な場合はOpenLDAP)を設定しました。ここで説明されているようにこれまではうまくいきました。

次に、gpgコマンドを使用していくつかのキーをLDAPに送信したいと思います。

gpg --keyserver ldap://ldap.example.com --send-keys 1234CAFE

しかし、これは失敗しました。

Strong(er) LDAP authentication required

LDAP(ログレベルのデバッグとして実行)出力

fd=12 ACCEPT from IP=n.n.n.n:57480 (IP=0.0.0.0:389)
op=0 SRCH base="" scope=0 deref=0 filter="(objectClass=*)"
op=0 SRCH attr=namingContexts
op=0 SEARCH RESULT tag=101 err=0 nentries=1 text=
op=1 SRCH base="cn=pgpServerInfo,dc=example,dc=com" scope=0 deref=0 filter="(objectClass=*)"
op=1 SRCH attr=pgpBaseKeySpaceDN pgpVersion pgpSoftware
op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
op=2 MOD dn="pgpCertID=9BB4C6C315EA172A,ou=GnuPG Keys,dc=example,dc=com"
op=2 MOD attr=pgpDisabled pgpKeyID pgpKeyType pgpUserID pgpKeyCreateTime pgpSignerID pgpRevoked pgpSubKeyID pgpKeySize pgpKeyExpireTime pgpCertID objectClass pgpKey
op=2 RESULT tag=103 err=8 text=modifications require authentication
op=3 UNBIND
fd=12 closed

「修正するには認証が必要です」というメッセージで、gpgがLDAPサーバーに対して認証されていないため、鍵を送信できないことがわかり、匿名ユーザーとして鍵を追加しようとしましたが、拒否されました.

gpgを認証する方法が見つからなかったので、次のaclを追加して匿名書き込みアクセスを許可してみました。

olcAccess: {0}to dn.subtree="ou=GnuPG Keys,dc=example,dc=com"
  by * write

しかし、あまり差がないようです。匿名ユーザーが以下のオブジェクトを作成できるようにすることはできませんか?GnuPキー

私は何が間違っていましたか?

ベストアンサー1

by * write匿名の更新を許可するには不十分です。これは以下を追加して明示的に許可する必要があります。

# Allow any connection to update the PGP keys 
# (including removing them!) 
# This is only needed if the anonymous
# updates from localhost are desired.
dn: cn=config
add: olcAllows
olcAllows: update_anon

おすすめ記事