使用 Java 进行安全的 Web 应用程序开发
我要求使用java(使用开源框架)制作一个Web应用程序,这应该是一个高度安全的应用程序。
我的印象是,使用 https 可以解决与浏览器和服务器之间通信相关的所有问题。这是正确的吗?
如果我想将登录详细信息存储到会话对象中。如果我这样做假设连接是 https 真的安全吗?
请给我一些关于如何使用 java 开发安全(以维持会话 ID 欺骗等)
应用程序的想法。一直以来,我只是在执行正常的用户名和密码登录应用程序,其中系统将用户信息(如用户名和角色)存储到会话对象中。
谢谢&问候,
文基
i have asked to do a web application using java (using open source frameworks) which should be a high secured application.
I have an impression that using https will solve all the issues related to communication between browser and server. is it correct ?
if i want to store the login details in to the session object. is it really safe if i do that assuming the connection is https.
please give me some thoughts about how to develop secured(to sustain session ID spoofing etc..)
applications using java. all the while i was just doing normal username and password login applications where the system stores user info(like username and role) into session object.
Thanks & Regards,
Venky
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在开始开发安全的 Web 应用程序之前,请阅读 OWASP 指南。
Kindly read OWASP Guide before start developing secured web application.
您可以使用 Spring Security 来保护您的应用程序,从而轻松处理登录和注销基于分配给用户的角色,使用注释、请求映射等对应用程序进行例程和访问控制。它处理存储登录信息。如果您发现某些事情应该以不同的方式完成,您可以实现自己的机制来满足您的需求 - Spring Security 可以通过接口进行高度定制。可能性是巨大的,据我所知,Spring Security 现在几乎是保护基于 Java 的 Web 应用程序的标准。
就我个人而言,我在 grails 应用程序中使用 Spring Security,我对它的工作方式和可能性非常满意。
You can use Spring Security to secure your application which makes it easy to handle login and logout routines and access control over your application using annotations, request maps and so on based on roles assigned to user. It handles storing login information. And if you find, that something should be done differently, you can implement your own mechanism to satisfy your needs - Spring Security is highly customizable with interfaces. Possibilities are enormous and for what I know, Spring Security is pretty much standard now for securing web application based on Java.
Personally I'm using Spring Security in grails application, and I'm very satisfied by the way it works and it's possibilities.
是,因为它不会以明文形式发送请求,而是会加密发送。
它与https无关,它将存储在服务器上。
要在您的网络服务器中启用
HTTPS
,您需要使用您的服务器配置 SSL网络/应用程序服务器Yes, because it won't send request in plain form, it will encrypt and send.
It has nothing to do with https, it will be stored on server.
and to enable
HTTPS
in your webserver you need to configure SSL with your web/app server