Ant*_*y K 1 ssl https websphere websphere-liberty
我只是在寻找一些信息.我想启用ssl和https重定向(一些基本的安全性,所以我可以公开appCenter和应用程序进行测试):
Websphere application server liberty v. 8.5.5.0
windows server 2008 R2
Java version 1.7.0_71 64bit
Run Code Online (Sandbox Code Playgroud)
我做了什么:安装eclipse + mobilefirst studio然后安装websphere应用服务器自由v.5.5.5.0然后安装MobileFirst Platform Server
这些指南非常有限,我对WebSphere很新,我对如何删除现有证书并成功生成新的自签名有疑问
我想看一个更完整的例子,这里的一些相关帖子是指配置web.xml,但它不在文档中.
有人能指出一个更全面的例子,说明如何设置启用ssl和https重定向?我的最终目标是访问appCenter使用ssl和https重定向.
谢谢
我将尝试部分回答您的问题,因为它非常广泛.
要在Liberty概要文件中启用ssl,最简单的方法是在Eclipse中使用WDT(WebSphere Developer Tools).在Servers视图中右键单击服务器并选择Utilities > Create SSL Certificate.它会:
${server.output.dir}/resources/security/key.jksConsole视图中,它将输出您需要添加到您的代码段server.xml:Run Code Online (Sandbox Code Playgroud)<featureManager> <feature>ssl-1.0</feature> </featureManager> <keyStore id="defaultKeyStore" password="{xor}encodedPassword=" />
您可以通过wlp\bin调用securityUtility命令从命令行执行相同的操作:
securityUtility createSSLCertificate --server=myserver --password=mypassword --validity=365
--subject=CN=mycompany,O=myOrg,C=myCountry
Run Code Online (Sandbox Code Playgroud)
修改后server.xml,9443上的SSL启用了SSL:
https://localhost:9443/
不幸的是,自由本身并没有多少.所以这是你的选择:
securityUtility如上 - 允许覆盖句点和SNRun Code Online (Sandbox Code Playgroud)C:\Java\jdk1.7.0_67\bin>keytool -genkeypair -alias myCert -keystore keystore.jks Enter keystore password: Re-enter new password: What is your first and last name? [Unknown]: liberty What is the name of your organizational unit? [Unknown]: test What is the name of your organization? [Unknown]: gas What is the name of your City or Locality? [Unknown]: What is the name of your State or Province? [Unknown]: What is the two-letter country code for this unit? [Unknown]: Is CN=liberty, OU=test, O=gas, L=Unknown, ST=Unknown, C=Unknown correct? [no]: yes Enter key password for <mykey> (RETURN if same as keystore password): Re-enter new password:
无论您将使用哪种方法来创建新的密钥库和自我认证证书,都可以使用更新keyStore定义server.xml
默认情况下,任何未配置的应用程序都将通过http和https提供.
如果要强制应用程序使用SSL,则需要为该应用程序创建/修改web.xml文件.将以下内容添加到您的:web.xml
<security-constraint>
<display-name>allApp</display-name>
<web-resource-collection>
<web-resource-name>allresources</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Run Code Online (Sandbox Code Playgroud)
您必须启用以下应用程序安全性添加server.xml:
Run Code Online (Sandbox Code Playgroud)<featureManager> <feature>appSecurity-2.0</feature> </featureManager>
你完成了.您为服务器启用了SSL,并为给定的应用程序重定向.
| 归档时间: |
|
| 查看次数: |
8649 次 |
| 最近记录: |