<div dir="ltr">
<div class="gmail-_rp_C5 gmail-rpHighlightAllClass gmail-rpHighlightBodyClass gmail-allowTextSelection">     <div>  <div class="gmail-_rp_D5 gmail-ms-font-weight-regular gmail-ms-font-color-neutralDark" tabindex="-1" id="gmail-Item.MessageNormalizedBody" style="font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,"EmojiFont""><div class="gmail-rps_2647">
<div>
<div dir="ltr">
<div id="gmail-x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,serif,"EmojiFont"">
<p style="margin-top:0px;margin-bottom:0px"></p>
<div>I have installed Shibboleth IDP and its working fine with  SamAccountName for IdP authentication. Now we got the request from management to switch from using samaccountname in authentication to user’s email address.<br>
<br>I made these two changes in ldap.properties:<br>
<br>idp.authn.LDAP.userFilter= (mail ={user})<br>idp.attribute.resolver.LDAP.searchFilter=(mail=$requestContext.principalName)<br>
<br>But getting error "The password is incorrect". The password is correct and working fine with SamAccountName.<br>
<br>
<b>Error in idp-process log:</b><br>2018-07-13 10:16:20,994 - INFO [net.shibboleth.idp.authn.impl.ValidateUsernamePasswordAgainstLDAP:166] - Profile Action ValidateUsernamePasswordAgainstLDAP: Login by '<a href="mailto:testuser@hec.gov.pk">testuser@hec.gov.pk</a>' failed<br>2018-07-13 10:16:30,020 - INFO [net.shibboleth.idp.authn.impl.ValidateUsernamePasswordAgainstLDAP:166] - Profile Action ValidateUsernamePasswordAgainstLDAP: Login by '<a href="mailto:testuser@hec.gov.pk">testuser@hec.gov.pk</a>' failed<br>
</div>
<div><br>
</div>
<div><b>ldap.properties:</b></div>
<div><br>
</div>
<div>
<div># LDAP authentication configuration, see authn/ldap-authn-config.xml<br># Note, this doesn't apply to the use of JAAS<br>
<br>## Authenticator strategy, either anonSearchAuthenticator, bindSearchAuthenticator, directAuthenticator, adAuthenticator<br>idp.authn.LDAP.authenticator= adAuthenticator<br>
<br>## Connection properties ##<br>idp.authn.LDAP.ldapURL= ldap://<a href="http://pern.pk:389">pern.pk:389</a><br>idp.authn.LDAP.useStartTLS                     = false<br>idp.authn.LDAP.useSSL                          = false<br>
<br># Time in milliseconds that connects will block<br>#idp.authn.LDAP.connectTimeout                  = PT3S<br># Time in milliseconds to wait for responses<br>#idp.authn.LDAP.responseTimeout                 = PT3S<br>
<br>## SSL configuration, either jvmTrust, certificateTrust, or keyStoreTrust<br>#idp.authn.LDAP.sslConfig                       = certificateTrust<br>## If using certificateTrust above, set to the trusted certificate's path<br>#idp.authn.LDAP.trustCertificates= %{idp.home}/credentials/ldap-server.crt<br>## If using keyStoreTrust above, set to the truststore path<br>#idp.authn.LDAP.trustStore= %{idp.home}/credentials/ldap-server.truststore<br>
<br>## Return attributes during authentication<br>idp.authn.LDAP.returnAttributes= passwordExpirationTime,loginGraceRemaining<br>
<br>## DN resolution properties ##<br>
<br># Search DN resolution, used by anonSearchAuthenticator, bindSearchAuthenticator<br># for AD: CN=Users,DC=example,DC=org<br>idp.authn.LDAP.baseDN= CN=Users, DC=pern, DC=pk<br>#idp.authn.LDAP.subtreeSearch                   = false<br>
<br>#idp.authn.LDAP.userFilter= (sAMAccountName={user})<br>idp.authn.LDAP.userFilter= (mail={user})<br>
<br># bind search configuration<br># for AD: idp.authn.LDAP.bindDN=<a href="mailto:adminuser@domain.com">adminuser@domain.com</a><br>idp.authn.LDAP.bindDN= <a href="mailto:administrator@pern.pk">administrator@pern.pk</a><br>idp.authn.LDAP.bindDNCredential= *****<br>
<br># Format DN resolution, used by directAuthenticator, adAuthenticator<br># for AD use idp.authn.LDAP.dnFormat=%<a href="mailto:s@domain.com">s@domain.com</a><br>
<br>#idp.authn.LDAP.dnFormat = uid=%s,ou=people,dc=example,dc=org<br>idp.authn.LDAP.dnFormat= %<a href="mailto:s@pern.pk">s@pern.pk</a><br>#idp.authn.LDAP.dnFormat= uid=%s,CN=Users,DC=pern,DC=edu,DC=pk<br>
<br># LDAP attribute configuration, see attribute-resolver.xml<br># Note, this likely won't apply to the use of legacy V2 resolver configurations<br>idp.attribute.resolver.LDAP.ldapURL= %{idp.authn.LDAP.ldapURL}<br>idp.attribute.resolver.LDAP.connectTimeout= %{idp.authn.LDAP.connectTimeout:PT3S}<br>idp.attribute.resolver.LDAP.responseTimeout= %{idp.authn.LDAP.responseTimeout:PT3S}<br>idp.attribute.resolver.LDAP.baseDN= %{idp.authn.LDAP.baseDN:undefined}<br>idp.attribute.resolver.LDAP.bindDN= %{idp.authn.LDAP.bindDN:undefined}<br>idp.attribute.resolver.LDAP.bindDNCredential= %{idp.authn.LDAP.bindDNCredential:undefined}<br>idp.attribute.resolver.LDAP.useStartTLS= %{idp.authn.LDAP.useStartTLS:true}<br>idp.attribute.resolver.LDAP.trustCertificates= %{idp.authn.LDAP.trustCertificates:undefined}<br>
<br>#idp.attribute.resolver.LDAP.searchFilter= (sAMAccountName=$resolutionContext.principal)<br>idp.attribute.resolver.LDAP.searchFilter= (mail=$requestContext.PrincipalName)<br>
<br># LDAP pool configuration, used for both authn and DN resolution<br>#idp.pool.LDAP.minSize                          = 3<br>#idp.pool.LDAP.maxSize                          = 10<br>#idp.pool.LDAP.validateOnCheckout               = false<br>#idp.pool.LDAP.validatePeriodically             = true<br>#idp.pool.LDAP.validatePeriod                   = PT5M<br>#idp.pool.LDAP.prunePeriod                      = PT5M<br>#idp.pool.LDAP.idleTime                         = PT10M<br>#idp.pool.LDAP.blockWaitTime                    = PT3S<br>#idp.pool.LDAP.failFastInitialize               = false<br>
<br>
</div>
<br>
</div>
<div>Thanks,<br>
</div>
<br>
<p></p>
</div>
</div>

</div>
</div></div>  </div> </div>

<br></div>