Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13679

Counter Module creation fails with Authorization enabled

XMLWordPrintable

      The Counter module does not use a SecurityAction to retrieve the cache manager configuration so it will fail on startup when Authorization is enabled.

      org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheConfigurationException: ISPN000659: Component org.infinispan.factories.GlobalComponentRegistry$ModuleInitializer failed to start
      
      	at org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:770)
      	at org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:538)
      	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:500)
      	at org.infinispan.test.SingleCacheManagerTest.setup(SingleCacheManagerTest.java:33)
      	at org.infinispan.test.SingleCacheManagerTest.createBeforeMethod(SingleCacheManagerTest.java:62)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
      	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
      	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458)
      	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
      	at org.testng.internal.Invoker.invokeMethod(Invoker.java:523)
      	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
      	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
      	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
      	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      	at org.testng.TestRunner.privateRun(TestRunner.java:648)
      	at org.testng.TestRunner.run(TestRunner.java:505)
      	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
      	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
      	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
      	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
      	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
      	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
      	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
      	at org.testng.TestNG.runSuites(TestNG.java:1049)
      	at org.testng.TestNG.run(TestNG.java:1017)
      	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
      	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
      Caused by: org.infinispan.commons.CacheConfigurationException: ISPN000659: Component org.infinispan.factories.GlobalComponentRegistry$ModuleInitializer failed to start
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:585)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:808)
      	at org.infinispan.factories.GlobalComponentRegistry.preStart(GlobalComponentRegistry.java:263)
      	at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:248)
      	at org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:766)
      	... 31 more
      Caused by: java.lang.SecurityException: ISPN000287: Unauthorized access: subject 'null' lacks 'ADMIN' permission
      	at org.infinispan.security.impl.Authorizer.checkPermission(Authorizer.java:112)
      	at org.infinispan.security.impl.Authorizer.checkPermission(Authorizer.java:67)
      	at org.infinispan.manager.DefaultCacheManager.getCacheManagerConfiguration(DefaultCacheManager.java:938)
      	at org.infinispan.counter.impl.CounterModuleLifecycle.registerCounterManager(CounterModuleLifecycle.java:93)
      	at org.infinispan.counter.impl.CounterModuleLifecycle.cacheManagerStarting(CounterModuleLifecycle.java:143)
      	at org.infinispan.factories.GlobalComponentRegistry.modulesManagerStarting(GlobalComponentRegistry.java:280)
      	at org.infinispan.factories.GlobalComponentRegistry.access$000(GlobalComponentRegistry.java:64)
      	at org.infinispan.factories.GlobalComponentRegistry$ModuleInitializer.start(GlobalComponentRegistry.java:370)
      	at org.infinispan.factories.CorePackageImpl$11.start(CorePackageImpl.java:173)
      	at org.infinispan.factories.CorePackageImpl$11.start(CorePackageImpl.java:171)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeStart(BasicComponentRegistryImpl.java:617)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:608)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:577)
      	... 36 more
      

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: