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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. External Directory synchronisation

External Directory synchronisation

Scheduled Pinned Locked Moved Solved Support
directory
9 Posts 5 Posters 1.7k Views 5 Watching
  • 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.
  • vladimir.dV Offline
    vladimir.dV Offline
    vladimir.d
    wrote on last edited by vladimir.d
    #1

    We are trying to link Univention LDAP as External Directory and I noticed that it doesn't import group memberships properly.

    It looks like it's case sensitive issue, when I import test.test user, it puts the user into a group properly.

    Mar 30 12:50:12 box:externalldap syncUsers: [adding user] username=test.test email=test.test@dev.mynet displayName=test test
    Mar 30 12:50:12 box:externalldap syncUsers: done
    ...
    
    Mar 30 12:50:12 box:tasks update 4074: {"percent":68,"message":"Syncing... uni-all-cloudron-users"}
    Mar 30 12:50:12 box:externalldap syncGroups: [up-to-date group] groupname=uni-all-cloudron-users
    Mar 30 12:50:12 box:externalldap syncGroups: sync done
    ...
    Mar 30 12:50:12 box:externalldap syncGroupUsers: Sync users for group uni-all-cloudron-users
    Mar 30 12:50:12 box:externalldap syncGroupUsers: Group uni-all-cloudron-users has 2 members.
    Mar 30 12:50:12 box:externalldap ldapGetByDN: Get object at uid=test.test,ou=Users,dc=dev,dc=mynet
    Mar 30 12:50:12 box:externalldap syncGroupUsers: Found member object at uid=test.test,ou=Users,dc=dev,dc=mynet adding to group uni-all-cloudron-users
    

    If I rename it to Test.Test it fails to import.

    Mar 30 12:12:37 box:tasks update 4068: {"percent":30,"message":"Syncing... Test.Test"}
    Mar 30 12:12:37 box:externalldap syncUsers: [adding user] username=Test.Test email=test.test@dev.mynet displayName=test test
    Mar 30 12:12:37 box:externalldap syncUsers: done
    ...
    Mar 30 12:12:37 box:externalldap syncGroupUsers: Group uni-all-cloudron-users has 2 members.
    Mar 30 12:12:37 box:externalldap ldapGetByDN: Get object at uid=Test.Test,ou=Users,dc=dev,dc=mynet
    Mar 30 12:12:37 box:externalldap syncGroupUsers: Found member object at uid=Test.Test,ou=Users,dc=dev,dc=mynet adding to group uni-all-cloudron-users
    Mar 30 12:12:37 box:externalldap syncGroupUsers: Failed to get user by username Test.Test User not found
    

    I can get the same data using ldapsearch using both test.test and Test.Test from Univention LDAP.

    We need to make External Directory synchronisation working with usernames in Test.Test format.

    luckowL 1 Reply Last reply
    0
    • nebulonN nebulon marked this topic as a question on
    • vladimir.dV vladimir.d

      We are trying to link Univention LDAP as External Directory and I noticed that it doesn't import group memberships properly.

      It looks like it's case sensitive issue, when I import test.test user, it puts the user into a group properly.

      Mar 30 12:50:12 box:externalldap syncUsers: [adding user] username=test.test email=test.test@dev.mynet displayName=test test
      Mar 30 12:50:12 box:externalldap syncUsers: done
      ...
      
      Mar 30 12:50:12 box:tasks update 4074: {"percent":68,"message":"Syncing... uni-all-cloudron-users"}
      Mar 30 12:50:12 box:externalldap syncGroups: [up-to-date group] groupname=uni-all-cloudron-users
      Mar 30 12:50:12 box:externalldap syncGroups: sync done
      ...
      Mar 30 12:50:12 box:externalldap syncGroupUsers: Sync users for group uni-all-cloudron-users
      Mar 30 12:50:12 box:externalldap syncGroupUsers: Group uni-all-cloudron-users has 2 members.
      Mar 30 12:50:12 box:externalldap ldapGetByDN: Get object at uid=test.test,ou=Users,dc=dev,dc=mynet
      Mar 30 12:50:12 box:externalldap syncGroupUsers: Found member object at uid=test.test,ou=Users,dc=dev,dc=mynet adding to group uni-all-cloudron-users
      

      If I rename it to Test.Test it fails to import.

      Mar 30 12:12:37 box:tasks update 4068: {"percent":30,"message":"Syncing... Test.Test"}
      Mar 30 12:12:37 box:externalldap syncUsers: [adding user] username=Test.Test email=test.test@dev.mynet displayName=test test
      Mar 30 12:12:37 box:externalldap syncUsers: done
      ...
      Mar 30 12:12:37 box:externalldap syncGroupUsers: Group uni-all-cloudron-users has 2 members.
      Mar 30 12:12:37 box:externalldap ldapGetByDN: Get object at uid=Test.Test,ou=Users,dc=dev,dc=mynet
      Mar 30 12:12:37 box:externalldap syncGroupUsers: Found member object at uid=Test.Test,ou=Users,dc=dev,dc=mynet adding to group uni-all-cloudron-users
      Mar 30 12:12:37 box:externalldap syncGroupUsers: Failed to get user by username Test.Test User not found
      

      I can get the same data using ldapsearch using both test.test and Test.Test from Univention LDAP.

      We need to make External Directory synchronisation working with usernames in Test.Test format.

      luckowL Offline
      luckowL Offline
      luckow
      translator
      wrote on last edited by
      #2

      @vladimir-d to be fair: I never used groups in UCS. Do you mean this admin screen where you put users into groups?

      a0038cdc-ed7c-4c6b-8e51-83a6fd792ff1-image.png

      Pronouns: he/him | Primary language: German

      vladimir.dV 1 Reply Last reply
      0
      • luckowL luckow

        @vladimir-d to be fair: I never used groups in UCS. Do you mean this admin screen where you put users into groups?

        a0038cdc-ed7c-4c6b-8e51-83a6fd792ff1-image.png

        vladimir.dV Offline
        vladimir.dV Offline
        vladimir.d
        wrote on last edited by
        #3

        @luckow we have created Cloudron users group in UCS and put some users to the group.
        Screenshot 2022-04-01 at 09.35.54.png

        On the Connect an External Directory section on Cloudron we have configured to import users and groups from UCS.

        Screenshot 2022-04-01 at 09.41.46.png

        Users and Groups are imported in Cloudron.

        Screenshot 2022-04-01 at 09.46.15.png

        Screenshot 2022-04-01 at 09.52.02.png

        But it fails to assign Test.Test1 user to groups. If we rename Test.Test1 username to lowercase as test.test1, it starts working properly - see test.test user on the screenshots.
        I suspect there is a bug or misconfiguration somewhere in Cloudron.

        We cannot rename real usernames to lower case due to our company policy.

        nebulonN girishG 2 Replies Last reply
        0
        • vladimir.dV vladimir.d

          @luckow we have created Cloudron users group in UCS and put some users to the group.
          Screenshot 2022-04-01 at 09.35.54.png

          On the Connect an External Directory section on Cloudron we have configured to import users and groups from UCS.

          Screenshot 2022-04-01 at 09.41.46.png

          Users and Groups are imported in Cloudron.

          Screenshot 2022-04-01 at 09.46.15.png

          Screenshot 2022-04-01 at 09.52.02.png

          But it fails to assign Test.Test1 user to groups. If we rename Test.Test1 username to lowercase as test.test1, it starts working properly - see test.test user on the screenshots.
          I suspect there is a bug or misconfiguration somewhere in Cloudron.

          We cannot rename real usernames to lower case due to our company policy.

          nebulonN Away
          nebulonN Away
          nebulon
          Staff
          wrote on last edited by
          #4

          @vladimir-d so Cloudron will always lowercase the username, this is required also to be compatible with apps and how they handle usernames. The question here is, why the syncer manages to create a Cloudron user record with uppercase usernames. I have to debug this further. Once this is solved, the group assignment will work as expected.

          1 Reply Last reply
          0
          • vladimir.dV vladimir.d

            @luckow we have created Cloudron users group in UCS and put some users to the group.
            Screenshot 2022-04-01 at 09.35.54.png

            On the Connect an External Directory section on Cloudron we have configured to import users and groups from UCS.

            Screenshot 2022-04-01 at 09.41.46.png

            Users and Groups are imported in Cloudron.

            Screenshot 2022-04-01 at 09.46.15.png

            Screenshot 2022-04-01 at 09.52.02.png

            But it fails to assign Test.Test1 user to groups. If we rename Test.Test1 username to lowercase as test.test1, it starts working properly - see test.test user on the screenshots.
            I suspect there is a bug or misconfiguration somewhere in Cloudron.

            We cannot rename real usernames to lower case due to our company policy.

            girishG Do not disturb
            girishG Do not disturb
            girish
            Staff
            wrote on last edited by
            #5

            @vladimir-d Did you happen to add users to the database directly? Atleast in code, usernames are always lower cased. I am unable to see how usernames can have non-lower case.

            vladimir.dV 1 Reply Last reply
            0
            • girishG girish

              @vladimir-d Did you happen to add users to the database directly? Atleast in code, usernames are always lower cased. I am unable to see how usernames can have non-lower case.

              vladimir.dV Offline
              vladimir.dV Offline
              vladimir.d
              wrote on last edited by
              #6

              @girish I used 'Syncronize' button nothing else.
              Did you have a chance to reproduce the group assignment issue on our server?

              nebulonN 1 Reply Last reply
              0
              • vladimir.dV vladimir.d

                @girish I used 'Syncronize' button nothing else.
                Did you have a chance to reproduce the group assignment issue on our server?

                nebulonN Away
                nebulonN Away
                nebulon
                Staff
                wrote on last edited by
                #7

                @vladimir-d the group assignment fails, since for some reason in your Cloudron the username is not lowercased. This seems to be the root cause we need to track down and fix.

                1 Reply Last reply
                1
                • fbartelsF Offline
                  fbartelsF Offline
                  fbartels
                  App Dev
                  wrote on last edited by fbartels
                  #8

                  Maybe the following this is old news, but ldap is in general not case sensitive, so while users may create entries even in camel case a case insensitive search (and Cloudron sided conversion to lowercase) should always give the same results.

                  1 Reply Last reply
                  0
                  • nebulonN Away
                    nebulonN Away
                    nebulon
                    Staff
                    wrote on last edited by
                    #9

                    I finally managed to get around reproducing and debugging this and it is fixed for next release: https://git.cloudron.io/cloudron/box/-/commit/0cd48bd239b13a6edec04974031ffdfed4688e08

                    1 Reply Last reply
                    5
                    • nebulonN nebulon has marked this topic as solved on
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search