Java, LDAP: Make it not ignore blank passwords?

前端 未结 4 732
忘了有多久
忘了有多久 2020-12-14 18:37

I\'m maintaining some legacy Java LDAP code. I know next to nothing about LDAP.

The program below basically just sends the userid and password to the LDAP server,

4条回答
  •  不思量自难忘°
    2020-12-14 19:04

    There are two types of BIND operations, simple and SASL. In the case of the simple BIND, there are four possibilities:

    • empty DN and empty password: anonymous, no authentication takes place. This is the initial state, and also the state when a BIND request is received by the server
    • non-empty DN, empty password: unauthenticated, no authentication takes place
    • non-empty DN, non-emptypassword: the normal case, authentication is attempted
    • empty DN, non-empty password: server behavior is not defined in the LDAP standards. No authentication takes place.

    When a connection is initially established, the connection is anonymous. Each BIND request resets the connection state to anonymous. Each successful BIND request changes the authorization state of the connection to that of the distinguished name. Each unsuccessful BIND request leaves the connection unauthenticated.

    The semantics of BIND are defined in LDAP: Authentication

提交回复
热议问题