-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for referral chasing enable and disable #405
Comments
Hi Team, Any update on this? Working on a critical part of our project and want to understand this feature in go-ldap @zerok @samuel @jefferai @johnweldon |
Referrals are defined in the search result: Lines 317 to 325 in 0e43630
Example: conn, err := ldap.DialURL("ldap//XXX")
if err != nil {
//
}
defer conn.Close()
searchResult, err := conn.Search(&ldap.SearchRequest{
BaseDN: baseDN,
Scope: ldap.ScopeWholeSubtree,
DerefAliases: ldap.NeverDerefAliases,
Filter: fmt.Sprintf("(%s=%s)", attribute, ldap.EscapeFilter(value)),
Attributes: []string{"objectClass"},
})
if err != nil {
//
}
fmt.Println(searchResult.Referrals) |
Hi @cpuschma This code will give me the referral list but it won't be searching for the given user in the referrals. Our requirement is that if the user is not found in the given DN then the LDAP server should automatically search in the referrals if there are any on the basis of a flag. Below are the equivalent in ldapsearch commands:
|
Hi @cpuschma did you get a change to look into the above query? |
@tilakbishtAVI would approving PR 376 fix the functionality you are looking for? |
I believe go-ldap doesnt support searching in the referral URLs. It just returns Referrals in the SearchResult and its client responsibility to connect to those referrals (binding, searching, etc). @cpuschma is that right? There is this method python ldap supports - connect.set_option(ldap.OPT_REFERRALS, 0), @cpuschma I am looking for somehting equivalent of python ldap set_option method is there such option in go-ldap ? |
I have a lot to do at the moment, but I will see if I can implement transactions as well as this feature as an optional function this weekend. |
I'd like to disable referral chasing in order to authenticate users using LDAP. @cpuschma, is it safe to assume that referral chasing is disabled by default in this client library & there's no need for explicit disabling, even though this option is currently unavailable in this library |
I also want to know if referral chasing is enabled or disabled by default ? |
It doesn't exist yet, but to preserve backwards compatibility it will be disabled by default. |
Just want to chime in on a compatibility note. OpenLDAP's client referral flag is OBSOLETE, per a few comments here. This is probably why In this case, it might be advisable for the author to rewrite number 2 to avoid use of One way is simply editing
... FWIW, not sure if that comment in the 😃 |
Hi, I am unsure whether the current implementation has any flag to enable or disable referral chasing while searching records in the LDAP server.
Please help me with this.
The text was updated successfully, but these errors were encountered: