[jboss-dev-forums] [Design of Security on JBoss] - PrivilegedBlock location

anil.saldhana@jboss.com do-not-reply at jboss.com
Thu Nov 20 00:34:45 EST 2008


Scott,  given the following stack trace, where do you think the privileged block should be placed that appropriate permission ("getClassLoader") should be placed?  I feel that it needs to go in the aop project but I also have the suspicion that users of aop need to arrive with the "getClassLoader" permission.

Thanks for the second opinion.


  | 23:22:07,502 ERROR [STDERR] access: access denied (java.lang.RuntimePermission getClassLoader)
  | 23:22:07,502 ERROR [STDERR] java.lang.Exception: Stack trace
  | 23:22:07,503 ERROR [STDERR]     at java.lang.Thread.dumpStack(Thread.java:1158)
  | 23:22:07,503 ERROR [STDERR]     at java.security.AccessControlContext.checkPermission(AccessControlContext.java:253)
  | 23:22:07,503 ERROR [STDERR]     at java.security.AccessController.checkPermission(AccessController.java:427)
  | 23:22:07,503 ERROR [STDERR]     at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
  | 23:22:07,503 ERROR [STDERR]     at java.lang.Class.getClassLoader(Class.java:588)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.aop.advice.GenericAspectFactory.getClazz(GenericAspectFactory.java:123)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.aop.advice.GenericAspectFactory.createPerInstance(GenericAspectFactory.java:175)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.aop.InstanceAdvisorDelegate.initializeAspects(InstanceAdvisorDelegate.java:109)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.aop.InstanceAdvisorDelegate.initialize(InstanceAdvisorDelegate.java:71)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.aop.ClassInstanceAdvisor.setAdvisorAndInitialise(ClassInstanceAdvisor.java:84)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.aop.ClassInstanceAdvisor.<init>(ClassInstanceAdvisor.java:68)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.jms.client.delegate.ClientSessionDelegate._getInstanceAdvisor(ClientSessionDelegate.java)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.jms.client.delegate.ClientSessionDelegate.createMessage(ClientSessionDelegate.java)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.jms.client.JBossSession.createMessage(JBossSession.java:124)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.test.security.ejb.RunAsWithRolesMDB.sendReply(RunAsWithRolesMDB.java:130)
  | 23:22:07,503 ERROR [STDERR]     at org.jboss.test.security.ejb.RunAsWithRolesMDB.onMessage(RunAsWithRolesMDB.java:105)
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190709#4190709

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190709



More information about the jboss-dev-forums mailing list