Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Changing password in external AD from ADF application

Jason.GWJan 31 2013 — edited Feb 1 2013
Hi,
we have a requirement to change a users password from within an ADF application.

We were able to get this to work using the following code against the JDeveloper integrated LDAP just fine by using the following code:

JpsContextFactory fact = JpsContextFactory.getContextFactory();
JpsContext con = fact.getContext();
IdentityStoreService storeService = con.getServiceInstance(IdentityStoreService.class);
IdentityStore is = storeService.getIdmStore();
UserManager manager = is.getUserManager();
System.out.println("updatable? = "manager.isModifyUserSupported()); //THIS RETURNS TRUE+
User user = is.searchUser("jasonr");
System.out.println("users display name = "user.getDisplayName());+
user.getUserProfile().setPassword("old".toCharArray(), "new".toCharArray());

When I snap in an Authentication Provider for Active Directory, this code falls over on searching for a user within AD.
To fix this, I set the virtualize = true parameter within the jps-config.xml.

Now I get a strange error when attempting to change the users password:

javax.faces.el.EvaluationException: oracle.security.idm.OperationFailureException: oracle.ods.virtualization.service.VirtualizationException: Virtualization Session closed
at oracle.security.idm.providers.libovd.util.LibOVDRealm.throwException(LibOVDRealm.java:675)
at oracle.security.idm.providers.libovd.util.LDAPUser.setProperties(LDAPUser.java:142)
at oracle.security.idm.providers.libovd.LibOVDUser.setProperties(LibOVDUser.java:224)
at oracle.security.idm.providers.libovd.LibOVDUser.setPassword(LibOVDUser.java:575)
at oracle.security.idm.providers.libovd.LibOVDUser.setPassword(LibOVDUser.java:531)


Is there a solution to this problem?

Regards
Jason
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2013
Added on Jan 31 2013
2 comments
298 views