I am currently using WebSphere Portal, and the WebSphere LDAP interfaces (PUMA). However, I have had very little success using their interfaces. Before I invest a bunch of time trying to integrate Spring, I wanted to know if anyone has come across the following in Spring:
Scenario: We manage authentication via LDAP. When a new employee is hired, we add them to the LDAP, and set a flag for them to reset their password. When the user completes this process, a "Leaf Node" (aka terminal node, or sub-node) is created, which states that they have reset their password.
- ActiveDirectory Hierarchy
->OU=MIS
--->OU=AppDev
----->CN=bobsmith
--------->...
--------->CN=pwdReset
--------->...
----->CN=janedoe
--------->...
Notice that bobsmith has "CN=pwdReset" because he has already reset his password. But, janedoe has not reset her password, and so there is no "Leaf Node". They each have all sorts of other attributes (hence the "..."), and I am able to pull all of those attributes back, but I cannot pull back this pwdReset attribute.
When I look at the ActiveDirectory through an LDAP Browser, the "CN=pwdReset" is of type "entry", while all of the other attributes are of the type "text attribute".
**************** code to pull back Attributes (specifically: user.getAttributeNames();)
Quote:
PortletServiceHome psh;
try {
// get the puma user object
javax.naming.Context ctx = new javax.naming.InitialContext();
psh = (PortletServiceHome) ctx.lookup("portletservice/com.ibm.portal.um.portletservice.PumaHome");
if (psh != null) {
PumaHome service = (PumaHome) psh
.getPortletService(PumaHome.class);
PumaProfile pp = service.getProfile(request);
User user = (User) pp.getCurrentUser();
if(logger.isDebugEnabled()){
logger.debug("===== Begin attributes for user: " + currentUsername);
Enumeration attributeNamesEnum = user.getAttributeNames();
while (attributeNamesEnum.hasMoreElements()) {
String attributeName = (String) attributeNamesEnum
.nextElement();
logger.debug(attributeName + " = " + user.get(attributeName));
}
List attrs = pp.getDefinedUserAttributeDefinitions();
com.ibm.portal.puma.User usr = (com.ibm.portal.puma.User) pp.getCurrentUser();
logger.debug("\t user = " + usr); // "CN=pwdReset" is not displayed here either
}
}
} catch (Exception e) {
e.printStackTrace();
}
This code allows me to pull back all of the other attributes, but it does not bring back "CN=pwdReset".
Any thoughts or suggestions would be appreciated on how to pull back this pwdReset "Leaf Node"
