OIM - PasswordMgmtService.validatePasswordAgainstPolicy:绕过策略中的密码历史条件问题

时间:2016-12-12 11:16:25

标签: oim

我正在为客户制定自定义OIG密码管理要求。

我在验证政策定义中的密码历史时遇到问题(例如:不应该使用最后5个密码)。

出于某种原因, PasswordMgmtService API validatePasswordAgainstPolicy 方法绕过历史记录验证,如果用户输入任何旧密码,则返回true。

以下是供参考的代码段。

public ValidationResult validatePasswordRACFPolicy(String loggedinUserKey, char[] userPassword)
{     
PasswordMgmtService pwdMgmtSvc = oimClient.getService(PasswordMgmtService.class); 
User usr = new User(loggedinUserKey); //loggedinUserKey is user key of logged in user
ValidationResult valResult = pwdMgmtSvc.validatePasswordAgainstPolicy(userPassword, usr, <App Instance Name>, Locale.getDefault());
IDMLOGGER.log(ODLLevel.FINEST, "Is Password Valid = " + valResult.isPasswordValid()); //this value is true even if user tries to reset password using any older passwords.
return valResult;   
}

最后,当我尝试更新目标帐户密码时,最终会出现异常。

provSvc.changeAccountPassword(Long.valueOf(accountId), userPassword);
//provSvc is ProvisioningService API object, accountId is oiu_key, userPassword is the password entered by user.

请帮我解决这个问题。

谢谢, 普利文

0 个答案:

没有答案