JRuby - Monkeypatching 作为穷人的安全经理?
选择性对所有 Ruby 核心类(文件、内核、IO 等)进行猴子修补以创建某种访问控制有什么问题吗?
我的 JVM 将运行不受信任的用户代码,并且由于某些原因我不想使用 Java 的安全管理器。因此,我转向 Ruby 公开课来实现我自己的沙箱。我对几乎所有核心类进行了猴子修补,但由于某种原因,我觉得这不够安全。我是偏执了,还是这真的是一个糟糕的解决方案?
在一个相关问题中,有没有办法有选择地从我的 Ruby 运行时中排除 Java。我的库需要 Java,但我不希望用户能够访问它。我已将 Java 包含在我的库中,而这些库又被“要求”到用户脚本中。
任何帮助将不胜感激。谢谢你! :)
Is there any thing wrong with selectively monkey-patching all Ruby core classes (File, Kernel, IO etc) to create a sort of access control?
My JVM will be running untrusted user code, and for some reasons I don't want to use Java's security manager. So, I turned to Ruby open classes for implementing my own sandbox. I had monkey-patched almost all the core classes, but for some reason I feel this is not secure enough. Am I being paranoid, or is this really a bad solution?
In a related question, Is there a way to selectively exclude Java from my Ruby runtime. My libraries need Java, but I don't want the user's to be able to access it. I've included Java in my libraries which in turn have been "required" into the user scripts.
Any help would be appreciated. Thank you! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论