-
Notifications
You must be signed in to change notification settings - Fork 53
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
Help: how to modify ldap filter within handleBeforeForwardRequest #221
Comments
I think I just found the answer myself, using the .asText() method. |
Apparently I'm not yet able to use the asText() method within handleBeforeForwardRequest() The request filter I'm getting is: x = LDAPFilter_equalityMatch(attributeDesc=BEROctetString(value=b'attribute'), assertionValue=BEROctetString(value=b'value')) when I try x.asText() I get: ----> 1 x.asText() /usr/local/lib/python3.6/site-packages/ldaptor/protocols/pureldap.py in asText(self) Any ideas ? |
Any solutions for that? |
Hello,
I'm trying to implement a custom LDAP proxy server that gets a searchRequest from a client, inspect the request and possibly modify the search flter before sending it to the proxied server.
For example, if the client sends a searchRequest with filter '(a=b)', the proxy should modify this filter to '(&(a=b)(c=d))' and send it to the proxied server.
When I override the handleBeforeForwardRequest (of the ProxyBase class), it seems the filter string has already been parsed and the request object contains a pureldap filter object which I don't quite understand how can be modified.
Having a string filter would be much easier.
Any suggestions ?
Thanks
The text was updated successfully, but these errors were encountered: