How to enable LDAP in JBoss Portal
There are two ways to achive this goal
1) In jboss-porta.sar/META-INF/jboss-service.xml in section:
<mbean code="org.jboss.portal.identity.IdentityServiceControllerImpl" name="portal:service=Module,type=IdentityServiceController" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean></xmbean> <depends>portal:service=Hibernate</depends> <!--<depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>--> <attribute name="JndiName">java:/portal/IdentityServiceController</attribute> <attribute name="RegisterMBeans">true</attribute> <attribute name="ConfigFile">conf/identity/identity-config.xml</attribute> <attribute name="DefaultConfigFile">conf/identity/standardidentity-config.xml</attribute> </mbean>
change identity-config.xml to ldap_identity-config.xml
2) swap the names or content of files In jboss-porta.sar/conf/identity/identity-config.xml and jboss-porta.sar/conf/identity/ldap_identity-config.xml
Then you need to edit configuration file that you choose to use (identity-config.xml or ldap_identity-config.xml) and configure LDAP connection options in section:
<datasource> <name>LDAP</name> <config> <option> <name>host</name> <value>jboss.com</value> </option> <option> <name>port</name> <value>10389</value> </option> <option> <name>adminDN</name> <value>cn=Directory Manager</value> </option> <option> <name>adminPassword</name> <value>qpq123qpq</value> </option> </config> </datasource>
You also need to specify options for your LDAP tree (described in configuration documentation) like those:
<option-group> <group-name>common</group-name> <option> <name>userContainerDN</name> <value>ou=People,dc=portal26,dc=jboss,dc=com</value> </option> <option> <name>roleContainerDN</name> <value>ou=Roles,dc=portal26,dc=jboss,dc=com</value> </option> </option-group>
Comments