java:ldapconfigfromtheground
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
java:ldapconfigfromtheground [2010/10/20 10:53] – creado rlunaro | java:ldapconfigfromtheground [2022/12/02 21:02] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 16: | Line 16: | ||
- | ===== Step 1: set a security domain ===== | + | ===== Step 0: have a walk on the LDAP side ===== |
+ | |||
+ | Install in your computer, or in the server, or whatever you want, an LDAP browser. You can install JXplorer (free software) or, if the LDAP server is Active Directory, you can install the "Admin Pack" of Microsoft. | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | To connect to the LDAP server you probably will need help from the administrator. | ||
+ | |||
+ | Ok, locate a group in the LDAP server --or create a new one-- where the users belonging to this group are allowed to use the application. In my case I've selected the group " | ||
+ | |||
+ | Using Jxplorer you should know if you need to provide an user and a password to connect to he LDAP server or not (annonymous access). Keep this information to use later. | ||
+ | |||
+ | ===== Step 1: Locate the login-config.xml file ===== | ||
+ | |||
+ | This file is in JBOSS_HOME/ | ||
+ | |||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | com.sun.jndi.ldap.LdapCtxFactory | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ldap:// | ||
+ | ldap:// | ||
+ | </ | ||
+ | |||
+ | <!-- step one: first connect (bind) to the ldap server --> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | <!-- step two: second identify/ | ||
+ | <!-- Subrama del directorio activo desde la que comenzaremos la búsqueda --> | ||
+ | < | ||
+ | < | ||
+ | |||
+ | <!-- step three: role search options --> | ||
+ | <!-- we will locate for MiddleseaUser --> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | |||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | We will explain how to identify every one of the values needed to configure this XML snippet. | ||
+ | |||
+ | **INVENT A NAME FOR THIS:** It's just a name, we will use later. I've chosen for this ldapJMXConsole. | ||
+ | |||
+ | **PUT THE SERVER : AND THE PORT:** If you managed to connect to the LDAP server using Jxplore --I strongly recommend this even if you are using Active Directory in your installation--, | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== Step N: set a security domain ===== | ||
+ | |||
+ | - Open WEB-INF/ | ||
+ | - Put the security-domain as is follows: | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | ===== Step N+1: Thing' | ||
+ | |||
+ | Ok, let's face it: despite following the steps in this guide, thing' | ||
+ | |||
+ | **Use the brute force to diagnose what is happening: | ||
+ | |||
+ | But //alas!!!// with a packet sniffer you can see the traffic behind and the exact error message returnet. | ||
+ | |||
+ | If nobody allows you to install a packet sniffer in the production server (a bad idea), you can try to make a testing deployment in your computer and try to find there the correct configuration of the LDAP. | ||
- | Open WEB-INF/ | ||
java/ldapconfigfromtheground.1287572020.txt.gz · Last modified: 2022/12/02 21:02 (external edit)