`
dengyin2000
  • 浏览: 1219270 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

在jboss中设置ssl

阅读更多

Set up CAS for SSO

1. Create Server Certificate for JBoss

CAS largely depends on secure transfer layer (STL), so having SSL enabled on JBoss server is critical to this application.

Firstly we will create the server certificate:

keytool -genkey -alias jboss -keyalg RSA -keystore server.keystore
or
keytool -genkey -alias devdap1 -keyalg RSA -keystore devdap1.keystore

Caution:

1: Give the keystore a password (hereinafter referred as keystore password). There is another password in the end, which will be referred to as alias password.

2: Use the full domain name of the server machine as the first and last name, as well as the organization unit. Don’t use the IP address here, or you will fail the SSL verification later. And try to avoid using “localhost” also since you may need to deploy CAS on some dedicated server and there are applications that are trying to access it from some remote JVM.

3: We may have multiple machines that need their own certificates and do the cross-certified (we will cover this later), so a wise way to arrange the them is to name it based on the hostname. In the above example, say we have a machine whose hostname is devdap1, we can name the keystore file as devdap1.keystore and give it an alias as devdap1.

Then we will export a server certificate for installation on the client machines, we actually can skip these steps since in a Browser client, the browser will download the server cert automatically.

keytool -export -file devdap1.crt -alias devdap1 -keystore devdap1.keystore

keytool -import -keystore "%JAVA_HOME%\jre\lib\security\cacerts” -file devdap1.crt -alias devdap1

(On Linux: keytool -import -keystore $JAVA_HOME/jre/lib/security/cacerts -file devdap1.crt -alias devdap1)

2. Cross-Certified

We may have a group of servers to host all the applications. Let’s say we have a CAS server deployed on a JBoss server running on a box with the hostname devdap1 (the full domain name is devdap1.monitor110.com). And we have another box named “reader” hosting the reader application. When “reader” wants to access CAS server, it needs to install devdap1’s certificate installed in the JVM that runs the reader application.

Firstly, we copy the devdap1.crt file that generated in the above step to the reader machine.

Then we run the following command to install the certificate:

keytool -import -keystore "%JAVA_HOME%\jre\lib\security\cacerts” -file devdap1.crt -alias devdap1

(On Linux: keytool -import -keystore $JAVA_HOME/jre/lib/security/cacerts -file devdap1.crt -alias devdap1)

The default password of keystore cacerts is “changeit”.

You may also want to delete the alias first if that alias has been installed before.

keytool -delete -keystore $JAVA_HOME/jre/lib/security/cacerts -alias devdap1

If you want to enable SSL on “reader” machine and use proxyTicket over SSL, you need to generate the certificate of “reader” machine, and install it on CAS (devdap1) machine as well. Let’s say you will generate files “reader1.keystore” and “reader1.crt”, and use an alias “reader1” for this certificate when doing import/export and installation. This way you won’t mess up all those certificates.

3. Enable SSL for JBoss

We take JBoss App Server 4.0.3 as example. We use $JBOSS_HOME to refer to the location where JBoss is installed.

Firstly copy the server.keystore file that generated in the above step to the location of $JBOSS_HOME/server/default/conf.

Then modify this file: $JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/server.xml. Uncomment this configuration directive:

<!-- 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="123456" sslProtocol = "TLS" />

The keystorePass used here is the key store password we mentioned in the above step 1.

Restart the JBoss server and verify the SSL installation by entering this URL in the browser: https://localhost:8443/

分享到:
评论

相关推荐

    jboss安装ssl

    本文将详细介绍如何为jBoss应用服务器配置SSL证书,以便在实际部署中更好地保护用户数据。 #### 二、准备工作 在正式配置之前,我们需要做一些准备工作: 1. **确保jBoss已正确安装**:确保jBoss应用服务器已安装...

    jboss-native-2.0.8-windows-ssl

    3. **更新JBoss配置**:在JBoss的配置文件中,你需要指定使用JBoss Native的NIO或APR connector,并配置相应的SSL参数。 4. **测试和调试**:启动JBoss服务器并尝试通过HTTPS连接来验证配置是否成功。可能需要处理...

    JBOSS 7 基于HTTPS双向SSL认证

    在本文中,我们将详细介绍 JBOSS 7 如何配置 HTTPS 双向 SSL 认证。 一、生成服务器证书 首先,我们需要使用 keytool 工具生成服务器证书。该工具是 JDK 中的一部分,用于生成和管理证书。使用以下命令生成服务器...

    Jboss与Tomcat服务器的SSL配置

    在IT领域,尤其是服务器管理中,配置SSL对于保护敏感信息至关重要,如用户登录凭证、信用卡信息等。Jboss和Tomcat都是流行的Java应用服务器,它们都支持SSL配置以启用HTTPS协议。 在Jboss和Tomcat服务器上配置SSL的...

    jboss-native-2.0.1-windows-i686-ssl

    在部署和配置时,用户需要确保正确配置了SSL证书,设置了正确的端口(通常为443),并根据需求调整SSL相关的配置参数,如信任的CA证书、加密算法等。同时,理解并遵循JBossORG-EULA.txt中的许可条款,以避免任何潜在...

    jboss-native-2.0.8-windows-x64-ssl

    用jboss native方式代替javaservice.exe来实现jboss在window中的服务自动启动 最近由于客户的主机使用64位win2008系统的机率越来越多,导致出现javaservice.exe注册的jboss服务无法启动的机率也变多。 所以只好改变...

    JBOSS,JBoss安装部署

    本篇文章将详细讲解JBoss的安装和部署过程,帮助你深入了解如何在本地环境中设置并运行JBoss应用服务器。 1. **系统要求**: 在开始安装前,确保你的操作系统满足JBoss的最低需求。通常,JBoss支持Windows、Linux...

    JBOSS启动顺序、JBOSS占用的端口

    在实际运维中,我们可以通过JBoss提供的管理控制台或命令行工具来查看和调整这些设置。例如,可以修改`standalone.xml`或`domain.xml`中的端口配置,或者使用`jboss-cli.sh`或`jconsole`等工具进行实时监控。正确...

    teradata DB connection在Jboss中的配置

    Teradata DB Connection在JBoss中的配置涉及到数据库连接和中间件集成的关键步骤,这对于开发和部署企业级Java应用程序至关重要。在JBoss(一个流行的开源应用服务器)中配置Teradata数据库连接,主要是为了使得Java...

    jboss-as-web-7.0.1.Final 配置 SSL

    本文将详细介绍如何在JBoss AS Web 7.0.1.Final版本中配置SSL。 #### 二、环境准备 - **JBoss AS Web 7.0.1.Final**: 本文档假设您已经安装了此版本的JBoss。 - **Java环境**: 请确保已经正确配置了`JAVA_HOME`环境...

    JBoss安全优化

    在JBoss中,可以通过多种方式来强化系统安全,包括数据源配置加密、使用HTTPS协议、设置定时登出机制以及调整错误页面重定向等措施。 首先,关于数据源配置密码加密,这是为了保护数据库连接信息不被窃取。在JBoss...

    windows下JBOSS5.1.0部署web应用

    在Windows环境下部署JBOSS 5.1.0作为Web应用服务器,涉及到一系列配置步骤,包括集成Spring框架、设置环境变量、修改默认配置以及配置SSL安全连接。以下是对这些步骤的详细说明: 1. **下载JBOSS-5.1.0.GA-jdk6.zip...

    JBoss4.0中文版.pdf

    2. **安装与配置**:书中可能会详细讲解如何在各种操作系统环境下安装JBoss,包括下载、解压、配置环境变量,以及启动和停止服务器的步骤。此外,还会介绍如何配置服务器以满足不同应用需求。 3. **J2EE组件**:...

    中间件jboss环境搭建01

    在探讨JBoss环境搭建之前,我们首先需要了解中间件的基本概念及其重要性。中间件是一种位于操作系统之上、应用软件之下的软件层,主要用于解决不同应用系统间的通信问题。它能够提供一系列标准的服务接口,使得应用...

    JBoss启动 JBoss启动

    在本文中,我们将深入探讨JBoss的启动过程及其相关知识点。 1. **JBoss目录结构**: JBoss的安装目录包含多个子目录,如`bin`、`server`、`deploy`等。`bin`目录下有启动和停止服务器的脚本,`server`目录则包含了...

    jboss学习资料/JBOSS使用指南

    1.1 Java EE:Java企业版是一套标准,定义了在分布式环境中构建和部署企业级应用的框架和服务。 1.2 应用服务器:JBoss作为应用服务器,负责管理、运行和部署Java EE应用程序,包括Web服务、EJB(Enterprise ...

    JBoss中文文档

    安装步骤、系统需求、环境变量设置、服务器配置等都是文档的重要部分,帮助用户在不同平台上部署JBoss。 3. **管理工具**: JBoss提供了一套管理工具,如jboss-cli和Web管理控制台,文档会详细解释如何使用这些...

    jboss-native-2.0.6-windows-x86-ssl.zip

    jboss的web container使用的 apache tomcat。apache tomcat 有一个扩展包,使tomcat可以通过 java native interface 使用 apache portable runtime (APR),而APR则是大名顶顶的apache httpd 网络服务器的运行时环境...

    jboss-as-web-7.0.1.Final_SSL.zip_JBOSS 7_jboss

    jboss-7 部署说明,详细介绍了webLogic程序创建过程和配置优化

Global site tag (gtag.js) - Google Analytics