我已經完成了向glassfish v4添加SSL證書的步驟。我已經驗證它通過瀏覽器和我的java swing客戶端(我在客戶端使用apache的http客戶端庫)工作Glassfish v4&SSL - 管理員不再有效
什麼不行的是管理控制檯!由於成功導入SSL,我無法再連接到管理控制檯,http://www.myhost.com:4848,我仍然得到登錄屏幕,始終有效的管理員用戶名/密碼組合已停止工作。當我嘗試從netbeans部署一個web應用時,我也注意到了一些問題,但是我還沒有研究足夠的東西來知道它是否是同一個問題。
以下是我添加ssl證書的步驟。這些將直接從glassfish v4安全指南,p1-26到p1-29中解除。我確實添加了一個步驟來更改主密碼,但我應該早一點完成,但我在此包含它。爲了保護我的隱私,我還在以下步驟中省略或更改了某些文件夾名稱,但除此之外,我已將所有這些複製出終端應用程序。
有誰知道管理員出了什麼問題?有一點需要注意 - 遵循glassfish的管理員和安全指南表示,我可以覆寫s1的別名。你會注意到我在使用下面的步驟中的證書時使用了別名
在此先感謝您的幫助!
步驟1 - 停止服務器
/usr/home/myhost
110 % glassfish4/bin/asadmin stop-domain domain1
Waiting for the domain to stop .
Command stop-domain executed successfully.
步驟2 - 更新主密碼
/usr/home/myhost
110 % glassfish4/bin/asadmin
Use "exit" to exit and "help" for online help.
asadmin> change-master-password domain1
Enter the current master password>
Enter the new master password>
Enter the new master password again>
Command change-master-password executed successfully.
asadmin> exit
Command multimode executed successfully.
步驟3 - 變化的密鑰文件
/usr/home/myhost
111 % cd glassfish4/glassfish/domains/domain1/config/
目錄
步驟4 - 從密鑰庫中刪除爲s1as
/usr/home/myhost/glassfish4/glassfish/domains/domain1/config
113 % keytool -delete -alias s1as -keystore keystore.jks
Enter keystore password:
步驟5 - 生成一個新的密鑰對
/usr/home/myhost/glassfish4/glassfish/domains/domain1/config
114 % keytool -genkey -alias s1as -keyalg RSA -keystore keystore.jks -keysize 2048
Enter keystore password:
What is your first and last name?
[Unknown]: www.myhost-dev.com
What is the name of your organizational unit?
[Unknown]: development
What is the name of your organization?
[Unknown]: myhost, inc
What is the name of your City or Locality?
[Unknown]: mycity
What is the name of your State or Province?
[Unknown]: mystate
What is the two-letter country code for this unit?
[Unknown]: us
Is CN=www.myhost-dev.com, OU=development, O="myhost, inc", L=mycity, ST=mystate, C=us correct?
Enter key password for <s1as>
(RETURN if same as keystore password):
步驟6 - 生成證書籤名請求文件(CSR)
/usr/home/myhost/glassfish4/glassfish/domains/domain1/config
115 % keytool -certreq -alias s1as -file toSymantec02.csr -keystore keystore.jks
Enter keystore password:
第7步 - 提交CSR到Symantec
步驟8 - 複製從賽門鐵克中間和SSL證書到config目錄
步驟9 - 進口中間證書
/usr/home/myhost/glassfish4/glassfish/domains/domain1/config
115 % keytool -import -trustcacerts -alias Intermediate -keystore keystore.jks -file IntermediateCA.crt
Enter keystore password:
Certificate was added to keystore
步驟10 - 進口ssl證書
/usr/home/myhost/glassfish4/glassfish/domains/domain1/config
116 % keytool -import -trustcacerts -alias s1as -keystore keystore.jks -file ssl_certificate.crt
Enter keystore password:
Certificate reply was installed in keystore
步11 - 重新啓動服務器
/usr/home/myhost
118 % glassfish4/bin/asadmin start-domain domain1
Enter master password (3) attempt(s) remain)>
Waiting for domain1 to start ...............................
Successfully started the domain : domain1
domain Location: /usr/home/myhost/glassfish4/glassfish/domains/domain1
Log File:/usr/home/myhost/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.
邁克!非常感謝先生!你的建議做了訣竅 - 並感謝背景信息 – cotfessi