How the scala sandbox works

I looked at this:

http://calumleslie.blogspot.com/2008/06/simple-jvm-sandboxing.html

regarding the JVM sandbox. However, it was written three (four?) Years ago and is intended for Java. I could not find anything newer or specific.

I know that maybe I could do the same for Scala, but I was wondering if Scala has built-in sandbox capabilities? In case of using scripts and configuration in Scala (for example, how the elevator does) while maintaining security (i.e. Preventing the opening of network sockets config.scala or reading from the hard drive). Does anyone have experience with this?

+4
source share
1 answer

You use the same mechanism as in Java: install SecurityManager . By default, ClassLoader will provide the loaded "read" FilePermission code for its own class path and the "RuntimePermission" exitVM; other actions require permissions .

0
source

Source: https://habr.com/ru/post/1390946/


All Articles