Piwigo vs. OAuth Login
I'm trying to install piwigo on my cloudron so people can use their accounts to u/l images. There are currently several plugins for piwigo, but none seem to do the trick out of the box.
Ldap Plugin (http://piwigo.org/ext/extension_view.php?eid=650 Doesn't seem to work properly, maybe someone has an idea? Github issue with error-animation is here https://github.com/VSLCatena/ldap_login/issues/5
OAuth Plugin (http://piwigo.org/ext/extension_view.php?eid=684 Only uses built in providers (facebook, google, instagram, linkedin, tumblr, twitter, windows live, vkontakte, yahoo, 500px, openid, flickr, steam and wordpress), so it would be required to copy one of those providers and populate it with cloudrons data. Which would be the closest one to the cloudron API?
However, there is a 3y old forked version of that plugin (https://github.com/AchilleAsh/Piwigo-oAuth-Custom-Client) which uses a different/custom provider, but after adjusting the urls to the cloudrons, this is giving me an error after callback aswell.
Any pointers on how to approach this?
@msbt The LDAP looks promising!
The error comes from https://github.com/VSLCatena/ldap_login/blob/master/admin/configuration.php#L55. I think that means that
ldap_search_dnfailed in https://github.com/VSLCatena/ldap_login/blob/master/class.ldap.php#L168.
I think the issue is that it harcodes objectClass=person in https://github.com/VSLCatena/ldap_login/blob/master/class.ldap.php#L170 . Can you patch the line to say objectcategory=person and see if it works? Otherwise that log file in /var/log might be good to see.
thanks for getting back to me, changing that didn't do anything as far as I can see. The log files aren't exactly informative. All it says is
[ldap_search_dn]> Connecting to server
[ldap_search_dn]> Cannot connect to server!
I'll wait for a bit, apparently someone else is also having problems with that version aswell, maybe that's related (https://github.com/VSLCatena/ldap_login/issues/1)
@msbt I'd love to hear more about your adventures with Piwigo. I'd love to have it be a part of Cloudron. Have you had success running it (apart from LDAP) on your instance? I've played around with a local docker install but it wasn't stable at all for me.
yes I got it working, even with LDAP (although the automatic group settings doesn't work as intended). I don't have a way to automatically install it, that's why it's not released yet. I'm happy to push a small tutorial for the lamp app and include all the required files if you want.
@msbt Well, if you could write up a small tutorial - that would be great!
@alexy here it goes:
install an empty lamp app
install piwigo (download from http://piwigo.org/download/dlcounter.php?code=latest)
following this tutorial http://www.jouvinio.net/wiki/index.php/LDAP_Plugin_Piwigo and put https://github.com/kvakanet/ldap_login/archive/config2base.zip as ldap_login in your plugins directory and activate it in the backend
add the following info in the "Ldap Login" settings:
LDAP server host: 172.18.0.1
LDAP port: 3002
BASE DN of LDAP server: ou=users,dc=cloudron
Users Branch: ou=users
LDAP attributes: ou=users,dc=cloudron
Attribute corresponding to the user name: username
Groups Branch: ou=groups,dc=cloudron
Attributes corresponding to the group name: cn
Admins group: users (not working)
In the "New users when LDAP auth is successful" tab check
Should new Piwigo users be created when users authenticate succesfully via LDAP?
Automatic group settings don't work, maybe that's my fault, this means after a user is successfully logged in, you have to manually change his/her group to whichever you want. There's also the mentioning of an OpenLDAP bug on the page, but that's where my french stopped working and I didn't use that code.
Let me know how it goes.
This post is deleted!