0

I'd like to know if there is a way to use multiple security managers in java, and if so, how to specify them a particular .policy file?

I've been looking at the java se 6 doc about Security, but couldn't find any answer there...

Thanks everyone for help!

Yoann Chambonnet
  • 1,313
  • 16
  • 22
  • How do you envisage using multiple security managers? for example, how do you want to switch and what is your security requirements that you require multiple? – Michael Wiles Oct 18 '10 at 10:24

1 Answers1

2

The design of Java is such that only one SecurityManager can be installed at a time (but I suppose you could write your own composite that requires all its atomic managers to agree… but why?)

However, it is possible to have many different policies applied by the security manager so that code that is from one location or which is published by a particular individual has access to one set of capabilities, and code from elsewhere can do something else.

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215