1 2 Previous Next 16 Replies Latest reply on Jan 7, 2008 2:32 PM by Adrian Brock

    Security access

    Ales Justin Master

      How is security enforced in our tests?
      Randomly? :-)

      I've introduced the code we were discussing here:
      - http://www.jboss.org/index.html?module=bb&op=viewtopic&t=123834&start=10
      --> wrapping the BeanInfo.set with MetaDataStack push, TCL change, PrivilegedAction execution if AccessControllerContext is present.

      When running ConfigTestSuite, I get all tests passing, except for all 3 ValueFactory(XML|Annotation)TestCase that fail due to security check in AbstractKernelControllerContext.getClassloader.

      What's the catch here, for all those tests that also execute that piece of code easily pass, but those three fail?

      3468 ERROR [AbstractKernelController] Error installing to Configured: name=PropHolder state=Instantiated
      java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
       at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
       at java.security.AccessController.checkPermission(AccessController.java:427)
       at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
       at org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext.getClassLoader(AbstractKernelControllerContext.java:244)
       at org.jboss.kernel.plugins.dispatch.InvokeDispatchHelper.invoke(InvokeDispatchHelper.java:76)
       at org.jboss.beans.metadata.plugins.AbstractValueFactoryMetaData.getValue(AbstractValueFactoryMetaData.java:293)
       at org.jboss.beans.metadata.plugins.AbstractCollectionMetaData.getValue(AbstractCollectionMetaData.java:90)
       at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:82)
       at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper$1.run(PropertyDispatchWrapper.java:96)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:52)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:108)
       at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:108)
       at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:88)
       at org.jboss.kernel.plugins.dependency.ConfigureAction.installActionInternal(ConfigureAction.java:45)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:135)
      


        1 2 Previous Next