1

Suppose I want to ship a Java application that supports plugins. For security reasons, I want the first party code (i.e. my code) to run basically unrestricted, but I want to limit the operations that the plugins would be able to perform. What's the right way of doing this? Is using the SecurityManager appropriate? Secondarily, is there a way to enforce that the application is started with a particular policy file in place, or should I assume if the end user wants to hack another policy file into place, that's their prerogative (or at least, there's nothing I can do to prevent it?).

The reason I have my doubts about the SecurityManager is because the goal of the class seems to be to prevent the entire application from doing things the end user doesn't want, whereas I'd like to use one to manage subsets of the application, completely opaquely to the end user, if possible.

Max
  • 4,882
  • 2
  • 29
  • 43
  • Possible duplicate - http://stackoverflow.com/questions/3947558/java-security-sandboxing-plugins-loaded-via-urlclassloader?rq=1 – Dan W Sep 17 '14 at 19:00
  • @DanW I'll read more into that, but I'm not sure how/if URLClassLoader is related. I'm fine with regular local JARs. – Max Sep 17 '14 at 19:03

0 Answers0