Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-15360

Ldap group membership not updated without a restart

      steps to reproduce

      1. Integrate bamboo with LDAP
      2. Configure the ldap caching so that the cache got refreshed every 20s for example
      3. Now create a group and associate a user to it
      4. The group will be created and the user associated as expected
      5. Now remove the user from the group and wait for the cache to run

      Expected behaviour
      Bamboo should remove the user from the group as well

      Current behaviour
      The user is still associated to the group and only a restart will remove the group association from the user. This only affects group membership as user details and creation of new groups get updated immediately. It appears this properties " LDAPGroupManagerReadOnly..groups_hasMembership and LDAPGroupManagerReadOnly..groups_getGroupsForUser" are ignored by the cache.

      There is no error in the logs even when the "com.atlassian.user" class is set to DEBUG

            [BAM-15360] Ldap group membership not updated without a restart

            I am using  5.13.0.1 build 51314  but still the same issue. Every time I have to restart the server to add a new member. Anybody has a workaround?

            vishwas gautam added a comment - I am using  5.13.0.1 build 51314  but still the same issue. Every time I have to restart the server to add a new member. Anybody has a workaround?

            We are using Bamboo 5.11.4 and having the same issue (user not able to login). does anybody knows which version of bamboo got this bug fixed? and what is the best solution till then?

            Thanks

            Bhagwan Basnet (Aakash) added a comment - We are using Bamboo 5.11.4 and having the same issue (user not able to login). does anybody knows which version of bamboo got this bug fixed? and what is the best solution till then? Thanks

            By default EhCache uses <defaultCache> configuration at ehcache.xml. TTL is 0 by default, so it never expires

            Alexey Chystoprudov added a comment - By default EhCache uses <defaultCache> configuration at ehcache.xml. TTL is 0 by default, so it never expires

            My fault..

            There was a typo in the repository key.. I tested it now and it seems to work fine.

            What is the defaul TTL timeout if we do not override the settings in the ehcache.xml ?

            Oliver Pereira added a comment - My fault.. There was a typo in the repository key.. I tested it now and it seems to work fine. What is the defaul TTL timeout if we do not override the settings in the ehcache.xml ?

            oliver.pereira2 can you please share part of your LDAP configuration and EhCache configuration?
            Below is my settings which work at 5.8 RC1

            atlassian-bamboo/WEB-INF/classes/echache.xml

            ...
            <cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups"
                     maxElementsInMemory="500"
                     eternal="false"
                     timeToIdleSeconds="10"
                     timeToLiveSeconds="10"
               />
               <cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_hasMembership"
                     maxElementsInMemory="500"
                     eternal="false"
                     timeToIdleSeconds="10"
                     timeToLiveSeconds="10"
               />
            <cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_getGroupsForUser"
                     maxElementsInMemory="500"
                     eternal="false"
                     timeToIdleSeconds="10"
                     timeToLiveSeconds="10"
               />
            ...
            

            $bamboo.home/xml-data/configuration/atlassian-user.xml

            ...   
                <ldap key="ldapRepository" name="LDAP Repository@hecate.atlassian.com" cache="true">
                       <host>localhost</host>
                       <port>10389</port>
            ...
            

            Please note that repository key ldapRepository should be the same at EhCache configuration
            cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_getGroupsForUser"

            Alexey Chystoprudov added a comment - oliver.pereira2 can you please share part of your LDAP configuration and EhCache configuration? Below is my settings which work at 5.8 RC1 atlassian-bamboo/WEB-INF/classes/echache.xml ... <cache name= "com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups" maxElementsInMemory= "500" eternal= " false " timeToIdleSeconds= "10" timeToLiveSeconds= "10" /> <cache name= "com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_hasMembership" maxElementsInMemory= "500" eternal= " false " timeToIdleSeconds= "10" timeToLiveSeconds= "10" /> <cache name= "com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_getGroupsForUser" maxElementsInMemory= "500" eternal= " false " timeToIdleSeconds= "10" timeToLiveSeconds= "10" /> ... $bamboo.home/xml-data/configuration/atlassian-user.xml ... <ldap key= "ldapRepository" name= "LDAP Repository@hecate.atlassian.com" cache= " true " > <host>localhost</host> <port>10389</port> ... Please note that repository key ldapRepository should be the same at EhCache configuration cache name="com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly. ldapRepository .groups_getGroupsForUser"

            I tested this with the latest RC1 build and this issue has still not been fixed.

            Oliver Pereira added a comment - I tested this with the latest RC1 build and this issue has still not been fixed.

            In my case it is happening opposite. Once the user added to group, it will not reflect in bamboo.

            Pareshkumar Gandhi added a comment - In my case it is happening opposite. Once the user added to group, it will not reflect in bamboo.

            This bug was first raised on 24 November 2014 and I have been told this bug will be fixed in Bamboo version 5.8 and the release date is tentatively scheduled for Feb 2015.

            A critical bug is being included a new version of the product, which will no doubt have some more bugs.

            Our company has started to look at other CI solutions as it seems to be the best way forward.

            Oliver Pereira added a comment - This bug was first raised on 24 November 2014 and I have been told this bug will be fixed in Bamboo version 5.8 and the release date is tentatively scheduled for Feb 2015. A critical bug is being included a new version of the product, which will no doubt have some more bugs. Our company has started to look at other CI solutions as it seems to be the best way forward.

            This bug fix is very important for us as currently we have to restart Bamboo everytime we make changes to the LDAP configuration.

            And it is NOT going well with the teams.

            Oliver Pereira added a comment - This bug fix is very important for us as currently we have to restart Bamboo everytime we make changes to the LDAP configuration. And it is NOT going well with the teams.

              Unassigned Unassigned
              smaiyaki Sultan Maiyaki (Inactive)
              Affected customers:
              4 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: