I have a JAVA application that uses UnboundID LDAP SDK to connect and to authenticate to a LDAP local server.
The server is a Windows Server 2008 R2 with Active Directory and It's configured to NOT allow anonymous authentication.
But if i try to perform an anonymous bind using my application, the BindResult is resulting success.
I'm connecting using SimpleBindRequest() method like JAVADOC says. Here is my code:
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);
}
}
I tried to test my server using Google Apps Directory Sync and it's denying any anonymous bind. If i configure my server to allow anonymous connection, the Google application results OK.
Anyone know what can be?