WIP: Add LDAP Server API
WIP: LDAP Server API
This PR introduces initial support for the Synology LDAP Server API.
Context
The naming for the Directory / LDAP Server APIs is very confusing:
-
LDAP Server endpoints are accessed via the
SYNO.DirectoryServerAPI. -
Directory Server endpoints, however, use the
SYNO.ActiveDirectoryAPI.
What’s Included
-
New endpoints:
-
list_users -
create_new_user
-
Missing
Of course, there are other endpoints to be implemented.
Also, proper error handling needs to be added. I wasn't sure how to correctly match SYNO.Entry.Request, because besides Syno.ActiveDirectory (the Directory Server API), Syno.DirectoryServer (the LDAP Server API) seems to use it too. So I left that for later.
Extended parameter validation should also be added as the LDAP API seems to sometimes add invalid/incomplete entries instead of rejecting them (moving the example _assert_expireddate_validity() function to another place in the codebase along with other functions)
I hope to be able add more myself in the near future but as my time is very limited right now, I wanted to publish this draft first.
This is NOT really tested yet. Will do that in the next days.