当前位置:编程学习 > 网站相关 >>

hessian的http基本安全认证

 

最近项目中用到HESSIAN, 基于HTTP协议的传输协议,很方便, 但是基本没有安全验证.

想给加上最基本的安全认证, HTTP BASIC AUTH是最简单的协议了.

在RESIN中添加的方法:

    resin.conf:

   

<web-app id="/" root-directory="/home/project/leyicai/">

        <authenticator type="com.caucho.server.security.XmlAuthenticator">

                 <init>

                        <user>leyicai:password:user</user>

                        <password-digest>none</password-digest>

                </init>

         </authenticator>

 

        <login-config auth-method='basic'/>

 

        <security-constraint url-pattern='/remoting/*' role-name='user'/>

        </web-app>

直接加在RESIN里,简单明了,不需要改程序配置.

 

还可以配置其它方式, 参见http://www.caucho.com/resin-3.0/security/authentication.xtp#XmlAuthenticator

 

 

作者 邓华

补充:综合编程 , 安全编程 ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,