当前位置: 首页 > 知识库问答 >
问题:

spring-ldap-password比较如何更新失败的密码尝试

刁文光
2023-03-14

使用ApacheDS2.0.0,配置的相关部分如下:

dn: ads-pwdId=default,ou=passwordPolicies,ads-interceptorId=authenticationInterceptor,ou=interceptors,ads-directoryServiceId=default,ou=config
ads-pwdminlength: 5
ads-pwdinhistory: 5
ads-pwdid: default
ads-pwdcheckquality: 1
ads-pwdlockout: TRUE
ads-pwdlockoutduration: 0
ads-pwdvalidator: org.apache.directory.server.core.api.authn.ppolicy.DefaultPasswordValidator
ads-pwdmaxfailure: 5
ads-pwdattribute: userPassword
ads-pwdfailurecountinterval: 30
entryParentId: 0889249e-fc0d-44ec-9df6-af21e46b3dac
ads-enabled: TRUE
objectclass: ads-passwordPolicy
objectclass: ads-base
objectclass: top
entryuuid: 22d39b05-7219-471f-9ca5-a9b12aff7a9e
ads-pwdgraceauthnlimit: 5
modifytimestamp: 20150409194653.529Z
entrycsn: 20150409194653.530000Z#000000#001#000000
ads-pwdexpirewarning: 600
modifiersname: 0.9.2342.19200300.100.1.1=admin,2.5.4.11=system

然后在Spring-LDAP 3.2.5/Security中,我使用以下身份验证管理器配置:

<authentication-manager alias="authenticationManager">
    <ldap-authentication-provider
        user-context-mapper-ref="detailsMapper"
        user-dn-pattern="uid={0},ou=people" user-search-filter="(uid={0})"
        group-search-base="ou=groups" group-search-filter="member={0}">
        <password-compare />
    </ldap-authentication-provider>
</authentication-manager>

我可能误解了“password-compare”的界限,但当我删除该元素时,LDAP似乎保留了“pwdfailuretime”密码失败。使用丢失的“password-compare”元素,这样帐户就不会因为多次密码失败而被锁定。

对我错过的东西有什么想法吗?

共有1个答案

伯博
2023-03-14

当您使用password-compare时,您并不像应该使用LDAP那样使用用户的密码来绑定LDAP,因此LDAP永远不会看到失败的登录尝试。

相反,Spring从用户条目中提取密码,充当LDAP管理员,并比较密码本身。

您不应该使用此选项。这与LDAP的设计意图背道而驰。

 类似资料:
  • 我需要能够知道身份验证失败时输入的密码。

  • 成功登录cPanel仪表板后,首先要更改cPanel帐户的密码。 这非常重要,因此cPanel的安全性保持不变。 没有人会希望他们的网站被黑客入侵。 要更改cPanel密码,请按照下列步骤操作 - Step 1 - 在cPanel Home中,单击位于仪表板右上角的username 。 Step 2 - 单击“ Password & Security选项。 您将找到更改密码界面。 Step 3 -

  • X2.1.0新增 sp_compare_password($password,$password_in_db) 功能: CMF密码比较方法,所有涉及用户密码比较的地方都用这个方法 参数: $password: 用户输入的密码 $password_in_db:数据库保存的经过加密后的密码串 返回: 类型boolean,密码相同,返回true 使用: $is_right = sp_compare_p

  • 我有一个网页,使用bcrypt加密用户名密码,这些密码然后存储在数据库中。我有一个运行在QT上的C++程序,它需要对用户进行身份验证,为了做到这一点,我必须加密用户输入的密码,并将其与数据库中的密码进行比较。这是正确的做法吗?如果是的话,我该如何做到这一点?用户输入的密码的加密必须与bcrypt的加密相同,我如何做到这一点?提前道谢。

  • 不出所料,我不再能够将本地提交推送到BitBucket上的存储库(的身份验证失败),但我忘记了如何更新iMac上的缓存密码。不知何故,我在谷歌或Stack ;Overflow上找不到它,尽管在我看来它应该相当简单...

  • 本文向大家介绍如何利用pycharm进行代码更新比较,包括了如何利用pycharm进行代码更新比较的使用技巧和注意事项,需要的朋友参考一下 pycharm自带对两个文件比对更新模块,方便查找不同,进行修改替换。方法如下:   1.选择目标文件,右键选择compare with   2.选择对比文件   3.查看对比修改如图: 到此这篇关于如何利用pycharm进行代码更新比较的文章就介绍到这了,更