Skip to content

Conversation

@n1cc00
Copy link

@n1cc00 n1cc00 commented Sep 30, 2025

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.DirectoryServer API.
  • Directory Server endpoints, however, use the SYNO.ActiveDirectory API.

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.

@n1cc00 n1cc00 marked this pull request as draft September 30, 2025 10:02
@FBoissadier
Copy link
Contributor

Just for information you can make request to "SYNO.Entry.Request" API using "batch_request" function from base_api :)
To be honest if the request you see is a "SYNO.Entry.Request" there is a strong possibility that it's use in sequential mode, so you can just implement each request one by one (one request = one function). As I know I've used it for package center API, but I forgot if it was really necessary or we can run request independant.
I didn't have the LDAP server installed on my Synology, but nice to see a new integration :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants