alexanoid
alexanoid

Reputation: 25770

jvm sandbox for java application

Is it possible to implement some kind of JVM sandbox for running application ? I'd like to restrict access of this application for example to files IO, network, etc.

Is any way to control these resources access for running app inside of JVM in this sandbox ?

Upvotes: 2

Views: 2588

Answers (3)

Deipss
Deipss

Reputation: 11

Maybe alibaba's jvm-sandbox ,you can try.

Upvotes: 1

the8472
the8472

Reputation: 43042

In addition to the JVM's security manager you can also use OS-specific security mechanisms. The simplest is running the JVM under a separate user.

More advanced isolation techniques exist on various platforms. For example linux has seccomp-bpf, namespaces, selinux, capabilities and various other things. Firejail and systemd-nspawn make use of them.

Upvotes: 2

Kayaman
Kayaman

Reputation: 73528

That's what SecurityManager is for.

They even have a tutorial.

Upvotes: 4

Related Questions