UnboundID LDAP SDK を使用して LDAP ローカル サーバーに接続し、認証する Java アプリケーションがあります。
サーバーは Active Directory を備えた Windows Server 2008 R2 であり、匿名認証を許可しないように構成されています。
しかし、アプリケーションを使用して匿名バインドを実行しようとすると、BindResult が成功します。JAVADOCが言うように、SimpleBindRequest()メソッドを使用して接続しています。これが私のコードです:
public boolean autenticarAnonimamente() throws AutenticacaoExcecao
{
GerenciadorConexaoLdap gerenciadorLdap = new GerenciadorConexaoLdap();
LDAPConnection connection;
try {
connection = gerenciadorLdap.conectarServidorLdap(ldap);
SimpleBindRequest request = new SimpleBindRequest();
BindResult result = connection.bind(request);
boolean retorno = result.getResultCode().equals(ResultCode.SUCCESS);
connection.close();
return retorno;
} catch (LDAPException | GeneralSecurityException ex) {
throw new AutenticacaoExcecao(ex);
}
}
Google Apps Directory Sync を使用してサーバーをテストしようとしましたが、匿名バインドが拒否されました。匿名接続を許可するようにサーバーを構成すると、Google アプリケーションは問題なく動作します。
誰が何ができるか知っていますか?