Configuring JBoss SSL

本文介绍如何使用keytool生成keystore文件并配置Tomcat服务器实现HTTPS访问,包括配置server.xml文件启用SSL连接器及安装SSL证书的过程。

1. 用keytool生成server.keystore文件
keytool -genkey -alias tc-ssl -keyalg RSA -keystore c:\server.keystore -validity 3650

生成完后放入server\default\conf中

 

2. 配置server\default\deploy\jbossweb-tomcat55.sar\server.xml文件
     <!-- SSL/TLS Connector configuration using the admin devl guide keystore -->
      <Connector port="8443" address="${jboss.bind.address}"
           maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
           emptySessionPath="true"
           scheme="https" secure="true" clientAuth="false"
           keystoreFile="${jboss.server.home.dir}/conf/server.keystore"
           keystorePass="als123" sslProtocol = "TLS" />
           
3. 访问https://localhost:8443/jmx-console/index.jsp,可以了。
   同时http://localhost:8080/jmx-console/index.jsp也可以访问,如果将http转向到https: 修改WEB应用的web.xml
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>HtmlAdaptor</web-resource-name>
            <description>An example security config</description>
            <url-pattern>/</url-pattern>
            <!-- <http-method>GET</http-method>
           <http-method>POST</http-method> -->
        </web-resource-collection>
        <!--<auth-constraint>
       <role-name>JBossAdmin</role-name>
       </auth-constraint> -->
        <user-data-constraint>
            <description>Protection should be CONFIDENTIAL</description>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

 

4.Installing an SSL Certificate

    We purchased an SSL Certificate from Verisign.
The company offers excellent documentations and instructions on how to install the certificate on their website. Once you purcahse the certificate Verisign we email the you the certificate only after you go through the process of getting all the information they require to verify the web server and wesite.
Below I included a screenshot of the installation process. It is a simply as using one of the java apache tools to install the certificate in the keystore file.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值