Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Piwigo vs. OAuth Login

    Discuss
    4
    8
    1805
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      msbt App Dev last edited by

      Hi there!
      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.

      1. 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

      2. 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?

      Best regards,
      Matthias

      1 Reply Last reply Reply Quote 0
      • girish
        girish Staff last edited by

        @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_dn failed 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.

        1 Reply Last reply Reply Quote 0
        • M
          msbt App Dev last edited by

          Hey @girish
          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
          [function]> ldap_search_dn(matthias)
          [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)

          Best regards,
          Matthias

          1 Reply Last reply Reply Quote 0
          • A
            alexy last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • M
              msbt App Dev last edited by

              Hey @alexy,
              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.
              Best regards

              A 1 Reply Last reply Reply Quote 0
              • A
                alexy @msbt last edited by

                @msbt Well, if you could write up a small tutorial - that would be great!

                1 Reply Last reply Reply Quote 0
                • M
                  msbt App Dev last edited by msbt

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • A
                    alexmoco Banned last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote -1
                    • First post
                      Last post
                    Powered by NodeBB