简体   繁体   English

如何在JSP中保护第三方Taglib

[英]How to secure 3rd-party taglib in jsp

i'm thinking to extend my JSP-based WEB site with the option to customize it with dynamically user-loaded 3rd party tag libs. 我正在考虑扩展我的基于JSP的WEB网站,并可以选择使用动态用户加载的第三方标签库对其进行自定义。 The question I have is what is the possible way to secure it within my WEB server, ie do not allow it do something like taking my passwords from local file system and send it somewhere to internet. 我的问题是,有什么可能的方法来保护它在我的WEB服务器中,即,不允许它执行从本地文件系统获取密码并将其发送到Internet的操作。

Is there some more-or-less standard approach for this? 为此有一些或多或少的标准方法吗?

I'm aware this can be done by customer SecurityManager (provided I have implemented my WEB server from scratch :)), but i have no idea what would be the way to plug in security manager into existing WEB server engine - for example Tomcat. 我知道这可以由客户SecurityManager来完成(前提是我已经从头开始实现了我的WEB服务器:)),但是我不知道将安全管理器插入现有WEB服务器引擎(例如Tomcat)的方式是什么。

Tomcat supports use of a security manager. Tomcat支持使用安全管理器。 Just activate it on startup, using the -security command line option, and define your security policy in catalina.policy. 只需在启动时使用-security命令行选项将其激活,然后在catalina.policy中定义您的安全策略即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM