0
我曾與春天配置的Active Directory用戶名和能夠做到的登錄名和屬性獲取,但問題是我必須從我的瀏覽器提交的原始密碼,服務器AD需要它。的Spring Web應用程序登錄使用Active Directory
我只是檢查,當我從瀏覽器張貼SHA2編碼的密碼,並將其傳遞給AD登錄它給了我認證失敗。由於安全原因,我需要將密碼編碼爲SHA2,然後將其發佈到服務器。有什麼方法可以解決嗎?
AndFilter filter = new AndFilter();
ldapTemplate.setIgnorePartialResultException(true);
filter.and(new EqualsFilter("userPrincipalName", authentication.getName()));
boolean authenticateUser = ldapTemplate.authenticate("", filter.toString(),password);
春LDAP似乎提供了LDAP綁定操作「簡單」的認證選擇(https://tools.ietf.org/html/rfc4511#section-4.2),但不提供「SASL」,這將需要如果在發送到Directory Server進行身份驗證之前,密碼已經被「加密」了。 爲了保密,您需要一直使用傳輸層安全性;客戶端 - >應用程序 - >目錄服務器 –