Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3029

Branch permissions fail for external users who haven't yet logged into Stash

    XMLWordPrintable

Details

    Description

      Branch permissions fail for those external users (user management delegated to JIRA), who have been not yet logged into Stash.
      After synchronization, the users are fetched successfully into Stash, but since they haven't logged in yet, branch permissions for all such users fails with "... is not a valid user" error.
      Does not effect local users.
      Logs:

      2013-01-25 13:50:58,773 ERROR [scheduler_Worker-3]  c.a.e.i.AsynchronousAbleEventDispatcher There was an exception thrown trying to dispatch event 'com.atlassian.crowd.event.user.UserCreatedFromDirectorySynchronisationEvent@327ef53d' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper.handleEvent(com.atlassian.crowd.event.user.UserCreatedEvent), listener=com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper@7407bedc}'.
      java.lang.RuntimeException: Could not find a user <username>.
      	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) ~[atlassian-event-2.2.1.jar:na]
      	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) ~[atlassian-event-2.2.1.jar:na]
      	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) [atlassian-event-2.2.1.jar:na]
      	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) [atlassian-event-2.2.1.jar:na]
      	at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:227) [atlassian-event-2.2.1.jar:na]
      	at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:82) [atlassian-event-2.2.1.jar:na]
      	at com.atlassian.stash.internal.event.EventPublisherImpl.publish(EventPublisherImpl.java:74) [stash-platform-2.0.2.jar:na]
      	at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.publishEvent(DbCachingRemoteChangeOperations.java:945) [crowd-core-2.5.3-m1.jar:na]
      	at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.addUsers(DbCachingRemoteChangeOperations.java:178) [crowd-core-2.5.3-m1.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_33]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_33]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_33]
      	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_33]
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      	at com.atlassian.crowd.directory.$Proxy829.addUsers(Unknown Source) [na:na]
      	at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.addOrUpdateCachedUsers(DirectoryCacheImplUsingChangeOperations.java:56) [crowd-core-2.5.3-m1.jar:na]
      	at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.synchroniseAllUsers(RemoteDirectoryCacheRefresher.java:65) [crowd-ldap-2.5.3-m1.jar:na]
      	at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:83) [crowd-ldap-2.5.3-m1.jar:na]
      	at com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseAll(EventTokenChangedCacheRefresher.java:60) [crowd-ldap-2.5.3-m1.jar:na]
      	at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:620) [crowd-core-2.5.3-m1.jar:na]
      	at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63) [crowd-core-2.5.3-m1.jar:na]
      	at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) [crowd-core-2.5.3-m1.jar:na]
      	at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29) [crowd-core-2.5.3-m1.jar:na]
      	at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113) [spring-context-support-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:223) [quartz-1.8.6.jar:na]
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) [quartz-1.8.6.jar:na]
      Caused by: com.atlassian.stash.exception.NoSuchUserException: Could not find a user <username>.
      	at com.atlassian.stash.internal.crowd.RiotPolice.unknownUser(RiotPolice.java:627) ~[stash-service-impl-2.0.2.jar:na]
      	at com.atlassian.stash.internal.crowd.RiotPolice.execute(RiotPolice.java:590) ~[stash-service-impl-2.0.2.jar:na]
      	at com.atlassian.stash.internal.crowd.RiotPolice.setUserAttribute(RiotPolice.java:485) ~[stash-service-impl-2.0.2.jar:na]
      	at com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper.handleEvent(UserCreatedAttributeBootstrapper.java:26) ~[stash-service-impl-2.0.2.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_33]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_33]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_33]
      	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_33]
      	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ~[atlassian-event-2.2.1.jar:na]
      	... 30 common frames omitted
      

      Attachments

        1. branch permissions.png
          branch permissions.png
          32 kB
        2. local groups.png
          local groups.png
          10 kB
        3. Screen Shot 2013-05-28 at 1.59.54 PM.png
          Screen Shot 2013-05-28 at 1.59.54 PM.png
          46 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ganand Gurleen Anand [Atlassian]
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: