CWPKI0022E - Попытка использовать проверку подлинности пользователя LDAP в MFP, но возникла ошибка SSL Handshake
public static String Authentication(String userName, String password) throws Exception {
String isAuthenticated = "false";
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
props.put(Context.PROVIDER_URL, "ldaps://SERVER URL:636");
props.put(Context.SECURITY_PRINCIPAL, "USER NAME");
props.put(Context.SECURITY_CREDENTIALS, "PASSWORD");
InitialDirContext context = new InitialDirContext(props);
String user = getUid(context, userName);
if(user==null){
System.out.println("User Not Exist!");
return "NOEXSITE";
}
Использовал приведенный выше код для подключения LDAP в простой java и добавил файл сертификата в jre cacerts и получил соединения и все идет хорошо, но при развертывании одного и того же кода в MFP возникает другая ошибка,
CWPKI0022E: SSL HANDSHAKE FAILURE: A signer with SubjectDN CN=targetDomain, O=Organisation was sent from the target host.
The signer might need to be added to local trust store /mfp-server/usr/servers/mfp/resources/security/key.jks, located in SSL configuration alias defaultSSLConfig.
The extended error message from the SSL handshake exception is: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target