Browse Source

ActiveDirectory PASSWORD FIX

MaxKey 3 years ago
parent
commit
291ca6e965

+ 7 - 2
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/realm/activedirectory/ActiveDirectoryServer.java

@@ -41,8 +41,13 @@ public final class ActiveDirectoryServer implements IAuthenticationServer {
 	 */
 	@Override
 	public boolean authenticate(String username, String password) {
-		ActiveDirectoryUtils ldapPassWordValid = new ActiveDirectoryUtils(activeDirectoryUtils.getProviderUrl(),
-				activeDirectoryUtils.getDomain()+"\\" + username, password,activeDirectoryUtils.getDomain());
+		ActiveDirectoryUtils ldapPassWordValid = 
+    		        new ActiveDirectoryUtils(
+    		                activeDirectoryUtils.getProviderUrl(),
+    		                username, 
+    		                password,
+    		                activeDirectoryUtils.getDomain()
+    		         );
 		ldapPassWordValid.openConnection();
 		if(ldapPassWordValid.getCtx()!=null){
 			_logger.debug("Active Directory user " + username + "  is validate .");

+ 1 - 1
maxkey-web-manage/src/main/resources/application.properties

@@ -17,7 +17,7 @@
 ############################################################################
 application.title=MaxKey
 application.name=MaxKey-Mgt
-application.formatted-version=v2.8.1 GA
+application.formatted-version=v2.8.2 GA
 
 ############################################################################
 #MaxKey Server  configuration                                              #

+ 8 - 0
maxkey-web-maxkey/src/main/resources/application-http.properties

@@ -274,15 +274,23 @@ maxkey.support.ldap.jit=false
 maxkey.support.ldap.product=openldap
 maxkey.support.ldap.ssl=false
 maxkey.support.ldap.providerurl=ldap://localhost:389
+#openldap  normal
 maxkey.support.ldap.principal=cn=Manager,dc=maxcrc,dc=com
+#activedirectory
+#maxkey.support.ldap.principal=administrator
 maxkey.support.ldap.credentials=secret
 maxkey.support.ldap.basedn=dc=maxcrc,dc=com
+#openldap  normal
+#maxkey.support.ldap.filter=(uid=%s)
 maxkey.support.ldap.filter=(uid=%s)
+#activedirectory
+#maxkey.support.ldap.filter=(sAMAccountname=%s)
 maxkey.support.ldap.truststore=maxkey
 maxkey.support.ldap.truststorepassword=maxkey
 #activedirectory effective
 maxkey.support.ldap.activedirectory.domain=MAXKEY.ORG
 
+
 #############################################################################
 #WsFederation Login support configuration
 #identifier: the identifer for the ADFS server

+ 1 - 1
maxkey-web-maxkey/src/main/resources/application.properties

@@ -17,7 +17,7 @@
 ############################################################################
 application.title=MaxKey
 application.name=MaxKey
-application.formatted-version=v2.8.1 GA
+application.formatted-version=v2.8.2 GA
 
 ############################################################################
 #spring.profiles.active https/http; default https                          #