WIP: Add LDAP Server API #290
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
SYNO.DirectoryServerAPI.SYNO.ActiveDirectoryAPI.What’s Included
list_userscreate_new_userMissing
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 besidesSyno.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.