开发者

solr security for web apps

开发者 https://www.devze.com 2023-04-01 08:53 出处:网络
I have a web app which gets its data from a Solr instance (Tomcat) Additional queries are done client side with AJAX, the data is directly pulled from Solr. Now this gives users the option to perform

I have a web app which gets its data from a Solr instance (Tomcat) Additional queries are done client side with AJAX, the data is directly pulled from Solr. Now this gives users the option to perform any query they like, and is of course a huge security hole. It's not a particular big issue for this particular app, but I'm curious at how to fix this. How to secure Solr, when client side A开发者_如何学GoJAX calls are required? (Preferably I would solve this with PHP.)


Instead of querying solr directly, you could create a simple PHP wrapper that limits the types of queries that are possible. Then, the client queries this PHP script which then queries solr. Once you've done that, you can limit access to the solr server to localhost either through the firewall or with your Java applications server.

0

精彩评论

暂无评论...
验证码 换一张
取 消