Open marissa999 opened 3 weeks ago
I'm having trouble as well. I'm not sure what the plugin wants the format of the LDAP attribute to be in. Is it a URL to the image or is it a base 64 or is either ok?
I tried to figure out what exactly the plugin wants. It seems that base64 is standard, and that makes the most sense to me too. But I am not confident right now that the plugin expects base64
Looking at the source code I was able to find the following:
https://github.com/jellyfin/jellyfin-plugin-ldapauth/blob/917be3924846b0fa98fa5559d3105bba85911d6d/LDAP-Auth/LdapProfileImageSyncTask.cs#L100 Here it seems like a ByteValue is returned.
https://github.com/jellyfin/jellyfin-plugin-ldapauth/blob/917be3924846b0fa98fa5559d3105bba85911d6d/LDAP-Auth/LDAPAuthenticationProviderPlugin.cs#L539 And GetAttribute seems to be returning a LdapAttribute object.
The whole plugin seems to make use of Novell.Directory.Ldap
https://github.com/dsbenghe/Novell.Directory.Ldap.NETStandard/blob/5ff61fafa2d7b7fd0a9f4458e462bcb4f9970da9/src/Novell.Directory.Ldap.NETStandard/LdapAttribute.cs#L305 So looking at this it seems like ByteValue is an array of bytes.
But I can not figure out what exactly sets _value and how that is determined... That is where I stopped looking.
I'm definitely trying to understand this more. Currently working on getting this to sync through authentik who also treats avatars strangely just trying to get an understanding of how this works so I can implement it.
I'm trying to do the same thing, I asked the question in authentik but no response yet. https://github.com/goauthentik/authentik/discussions/10055
So in authentik I found this. It at least gives another option by allowing us to pass the URL to the image. I still haven't manged to get it to work in jellyfin though but now I have the image url. https://github.com/goauthentik/authentik/discussions/6824
So in plugins/configuration there is the LDAP-Auth.xml file that shows a place for the jpegPhoto details but no matter what I put in my "avatars" field I can't get that file to populate and update with a hash. Has anyone had luck getting the plugin to make changes here?
Ok did some more digging and testing using https://base64.guru/converter/decode/text to see what I can come up with... So since the plugin doesn't (from what I can tell) decode the base64 into the binary before posting it in the profile.jpg file I think the only fix is to actually get the binary for the avatar into the ldap field which I can imagine will throw in some breaking characters. Gonna continue testing.
Hi, I am trying to sync photos via LDAP.
It seems like the photo is stored properly in LDAP. With the ldapsearch command I can see the jpegPhoto attribute with the base64-encoded photo.
ldapsearch -H ldap://LDAP_IP:389 -D "cn=jellyfin-ldap,ou=users,dc=ldap,dc=jellyfin,dc=DOMAIN,dc=TLD" -b "dc=ldap,dc=jellyfin,dc=DOMAIN,dc=TLD" -w "SUPERSECRETPASSWORD" -s sub "(memberOf=cn=jellyfin,ou=groups,dc=ldap,dc=jellyfin,dc=DOMAIN,dc=TLD)" -x
I can also take the whole content of the jpegPhoto attribute, decode it, and I get the original jpeg-photo back.
But the synchronisation task does not seem to find the picture?
If I manually start the task I can see the following in the server logs:
I can login through LDAP and also use the test buttons in the plugin settings to successfully find my user.
System: Jellyfin + Jellyfin-WEB: 10.9.3 OS: Arch Linux Installed through: Package manager (https://archlinux.org/packages/extra/x86_64/jellyfin-server/)
Installed Plugins:
![image](https://github.com/jellyfin/jellyfin-plugin-ldapauth/assets/8284445/38fcbb9e-0c6a-4a97-ac86-280ba571f1aa) (Note: SSO-Auth is configured to change the authentication provider to Jellyfin.Plugin.LDAP_Auth.LdapAuthenticationProviderPlugin, in case that is relevant)Is there something obvious that I am missing?