使用 Jboss/Tomcat Valve 来加密/解密 url,就像某些 url 重写一样?
我有一个使用 servlet 和 jsp 在 JBoss 上运行的第三方应用程序。 我无权访问源代码。
假设一个 servlet 像这样运行: http://localhost/myApp/view.do?clientId=45&command=34
我想获得这个: http://localhost/myApp/view.do?gf844gf4g8fg4f
经过一番谷歌搜索后,我发现了这个: http://www.avedatech.com/Products/QueryCrypt/index.jsp
但它不符合我的需求,因为我无法篡改代码。
我的想法是在任何以 http://localhost/myApp 开头的查询之前(加密 url)放置一个阀门 和另一个之后(解密)。
不幸的是,我的应用程序写入了清晰的网址,这就是我尝试在服务器级别插入进程的原因。 因此,浏览器中出现的任何 url 都将无法读取(Javascript 无法再读取该 url 不再是问题。)
线索已涵盖:): 我们已经使用 HTTPS 将哈希值放在 url 末尾,并确保计算出的哈希值相等,如果不匹配则拒绝访问。这可以防止篡改,但不能让用户看到变量。
这可行吗?
感谢您的帮助。
I have a third party application running on JBoss using servlets and jsps.
I do not have access to the source code.
Let's say one servlet runs like this :
http://localhost/myApp/view.do?clientId=45&command=34
I want to obtain this :
http://localhost/myApp/view.do?gf844gf4g8fg4f
After some Googling, I found this : http://www.avedatech.com/Products/QueryCrypt/index.jsp
But it does not fit my needs because I cannot tamper with the code.
My idea was to put a valve Before (encrypt the url) any query starting with http://localhost/myApp
and another one After (decrypt).
Unfortunately, my application writes clear urls that is why I try to insert my process at the server level.
As a result, any urls appearing in the browser would be unreadable (Javascript not being able to read the url any longer is not an issue.)
Leads already covered :) :
We are already in HTTPS
Put a hash at the end of the url and make sure that computed hash is equal and deny access if not matching. That prevent tampering but not the user seeing the variables.
Is this feasible ?
Thank you for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论