Closed maxswjeon closed 6 months ago
Thanks for the PR, but I believe that ldap3
doesn't need this kind of feature. Before closing the PR, I'd genuinely like to know about your use case -- who is the recipient of the serialized result, and what will that recipient do with serialized data?
(Since about the start of my involvement with this library, I've been thinking about deserializing result entries into structs, but I'm not sure that serde is a good match for the LDAP data model.)
Closing. Feedback is still welcome, of course.
Hi, sorry for late feedback. I am trying to create a http-ldap bridge, which handles ldap queries over http. I was having trouble implementing the serdes features in an external create, so I suggested a serdes feature in this create itself. I am curious of your opition of this usage and implementational details. Thanks for your hard work.
I am trying to create a http-ldap bridge, which handles ldap queries over http.
OK, now I understand more. It seems to me that what you're trying to do would be difficult, starting with the fundamental difference between HTTP and LDAP, that is, state handling: HTTP is stateless, in LDAP everything is defined in relation to a connection/session. (Connectionless LDAP exists, but it's a non-standardized niche protocol which can be practically disregarded.)
Therefore, a bridge would have to run via HTTP/2 or a websocket; in practice, the latter, if you want to use it from the browser. If you're aiming for full generality, probably the simplest way would shuttle raw BER messages between the (web) client and the (LDAP) server. Ldap3
wouldn't help you much on the bridge side since it can't accept and deliver raw packets (and I'm not going to enable raw operation.) So, you'd need your own connection-handling framework. If parts of ldap3
can help you in writing that framework, you can freely use them, of course.
I know that HTTP is stateless, so I would like to group a set of commands in one request.
A payload should consist of
So one request can run multiple commands, resulting one complete response. This would solve the "stateless" part of HTTP, I think.
Nevertheless, I appreciate your hard work. Thanks.
Serde (Serialize) would be a fantastic feature for ldap3.
Implemented Seralize for
Result
types.