Reputation: 1235
When using Java Security Manager for Jruby scripts, Is it possible give a particular script alone full permissions?
Upvotes: 1
Views: 498
Reputation: 1426
There is potentially another answer: if you have separate security managers you want to apply to separate scripts, then you can always spin up separate JRuby instances in separate classloaders. They won't share anything and should remain pretty isolated. But Nick is right, there's nothing built into JRuby to sandbox individual scripts at the moment, and we don't have any plans to do so...
Upvotes: 1
Reputation: 3315
If you mean using the same security manager for different scripts that applies different permissions, then the answer is no, unless you write the security manager yourself to somehow be script-aware. There's no way to specify a script in a security policy file (like you would for classes). I see two options at the moment:
For help with 2, I suggest taking a look at Charlie's recent post.
Upvotes: 1