Setting upLDAP in weblogic server and accessing through your JSF application


Hello Guys!

Today a tutorial teaching you, how to set up an LDAP connection in your weblogic server and accessing it through your JAVA application.

1) Setting up Weblogic:

Enter on myrealm.
Click in providers.
Create a new provider, name it “Ldap” and select type as “LDAPAuthenticator”.
After creating the new provider, you must reorder the authentication providers. Click Reorder.
Put Ldap first in ordering.
After the server is created, click on it and go to setup / common and select “SUFFICIENT”.
Make the settings below in Configuration / Provider Specific.
– Host: ip from your host
– Porta: 389
– Main: loginAD
– Credencial: passAD
– DN de Base do Usuário: DC=grupo,DC=grupoA
– DN de Base do Grupo: DC=grupo,DC=grupo
– Usuário do Filtro de Nome: (&(sAMAccountName=%u)(objectclass=person))
– Atributo de Nome de Usuário: sAMAccountName

Restart the server. After the reboot, go to Home tab> Providers> Ldap> Providers> Users and Groups. Ldap users should be displayed if all was done correctly.

2) Enter in the realm created in the weblogic through the code below.

So that’s it folks!

Any questions, post a message below.