Security with Java Scripting (JRuby, Jython, Groovy, BeanShell, etc)

后端 未结 3 2030
野的像风
野的像风 2021-02-01 09:16

I\'m looking to run some un-verified scripts (written in a yet-to-be-determined language, but needs to be Java-based, so JRuby, Groovy, Jython, BeanShell, etc are all candidates

3条回答
  •  孤城傲影
    2021-02-01 09:56

    In Groovy, you can do exactly what you mentioned. Actually very easy. You can easily limit permissions of untrusted scripts running in a trusted environment, allow usage of your own api, which in turn can do untrusted things.

    http://www.chrismoos.com/2010/03/24/groovy-scripts-and-jvm-security/

提交回复
热议问题