若要在JBoss Application Server上設定SSL,您需要SSL憑證才能進行驗證。 您可以使用Java鍵工具建立憑據或請求,並從證書頒發機構(CA)導入憑據。 然後,您必須在JBoss上啟用SSL。
您可以使用包含建立金鑰存放區所需所有資訊的單一命令來執行keytool。
在此過程中:
[appserver root]
是執行AEM表單之應用程式伺服器的主目錄。[type]
資料夾名稱會因您執行的安裝類型而異。在命令提示字元中,導覽至 [JAVA首頁]/bin並鍵入以下命令以建立憑據和密鑰庫:
keytool -genkey -dname "CN=
主機名稱 , OU=
群組名稱 , O=
公司名稱 ,L=
城市名稱 , S=
狀態 , C=
國家/地區代碼」 -alias "AEMForms Cert"
-keyalg RSA -keypass
key_password -keystore
keystorename .keystore
取代 [JAVA_HOME]
使用安裝JDK的目錄,並將斜體文字取代為與您的環境相對應的值。 主機名是應用程式伺服器的完全限定域名。
輸入 keystore_password
提示輸入密碼時。 金鑰存放區和金鑰的密碼必須相同。
此 keystore_password
在此步驟中輸入的密碼可能與在步驟1中輸入的密碼相同,或者可能不同。
複製 keystorename.keystore到 [appserver root]/server/[type]/conf
目錄,方法是鍵入以下命令之一:
copy
keystorename.keystore[appserver root]\standalone\configuration
keystorename.keystore[appserver root]\domain\configuration
cp keystorename.keystore [appserver root]/standalone/configuration
cp <em>keystorename</em>.keystore<em>[appserver root]</em>/domain/configuration
輸入以下命令以導出證書檔案:
keytool -export -alias "AEMForms Cert" -file AEMForms_cert.cer -keystore [appserver root]/standalone/configuration/keystorename.keystore
keytool -export -alias "AEMForms Cert" -file AEMForms_cert.cer -keystore [appserver root]/domain/configuration/keystorename.keystore
輸入 keystore_password 提示輸入密碼時。
將AEMForms_cert.cer檔案複製到 [appserver根] \conf 目錄,方法是鍵入以下命令:
copy AEMForms_cert.cer [appserver root]\standalone\configuration
copy AEMForms_cert.cer [appserver root]\domain\configuration
cp AEMForms _cert.cer [appserver root]\standalone\configuration
cp AEMForms _cert.cer [appserver root]\domain\configuration
鍵入以下命令查看證書的內容:
keytool -printcert -v -file [appserver root]\standalone\configuration\AEMForms_cert.cer
keytool -printcert -v -file [appserver root]\domain\configuration\AEMForms_cert.cer
提供快取檔案的寫入訪問,位於 [JAVA_HOME]\jre\lib\security
,視需要執行下列工作:
chmod 777 cacerts
輸入以下命令以匯入憑證:
keytool -import -alias "AEMForms Cert" -file
AEMForms_cert .cer -keystore
JAVA_HOME \jre\lib\security\cacerts
類型 changeit
作為密碼。 此密碼是Java安裝的預設密碼,可能已由系統管理員更改。
提示輸入時 Trust this certificate? [no]
:,類型 yes
. 將顯示確認「已將憑證新增至金鑰存放區」。
如果您從Workbench透過SSL連線,請在Workbench電腦上安裝憑證。
在文字編輯器中,開啟下列檔案以進行編輯:
單伺服器 — [appserver root]
/standalone/configuration/lc_<dbname turnkey="">.xml
伺服器群集 — [appserver root]
/domain/configuration/host.xml
伺服器群集 — [appserver root]
/domain/configuration/domain_<dbname>.xml
<security-realm name="SSLRealm">
<server-identities>
<ssl>
<keystore path="C:/Adobe/Adobe_Experience_Manager_Forms/jboss/standalone/configuration/aemformses.keystore" keystore-password="changeit" alias="AEMformsCert" key-password="changeit"/>
</ssl>
</server-identities>
</security-realm>
找出 <server>
下列程式碼後顯示的章節:
<http-listener name="default" socket-binding="http" redirect-socket="https" max-post-size="104857600"/>
將下列項目新增至 <server> 上述程式碼後出現的章節:
<https-listener name="default-secure" socket-binding="https" security-realm="SSLRealm"/>
<security-realm name="SSLRealm">
<server-identities>
<ssl>
<keystore path="C:/Adobe/Adobe_Experience_Manager_Forms/jboss/standalone/configuration/aemformses.keystore" keystore-password="changeit" alias="AEMForms Cert" key-password="changeit"/>
</ssl>
</server-identities>
</security-realm>
在伺服器群集的主節點上, [appserver根]\domain\configuration\domain_<dbname>.xml,找到 <server> 下列程式碼後顯示的章節:
<http-listener name="default" socket-binding="http" redirect-socket="https" max-post-size="104857600"/>
將下列項目新增至 <server> 上述程式碼後出現的章節:
<https-listener name="default-secure" socket-binding="https" security-realm="SSLRealm"/>
變更 keystoreFile
屬性和 keystorePass
屬性至您建立金鑰存放區時指定的金鑰存放區密碼。
重新啟動應用程式伺服器:
對於統包安裝:
對於Adobe預配置或手動配置的JBoss安裝:
從命令提示字元導覽至 [appserver root]
/bin。
輸入以下命令以停止伺服器:
shutdown.bat -S
./shutdown.sh -S
等到JBoss進程完全關閉(當JBoss進程將控制返回到其啟動的終端時)。
輸入以下命令以啟動伺服器:
run.bat -c <profile>
./run.sh -c <profile>
若要使用SSL存取管理控制台,請輸入 https://[host name]:'port'/adminui
在網頁瀏覽器中:
JBoss的預設SSL埠為8443。 從這裡,在存取AEM表單時指定此連接埠。
在命令提示字元中,導覽至 [JAVA首頁]/bin ,並鍵入以下命令以建立密鑰庫和密鑰:
keytool -genkey -dname "CN=
主機名稱 , OU=
群組名稱 , O=
公司名稱 , L=
城市名稱 , S=
狀態 , C=
國家/地區代碼" -alias "AEMForms Cert"
-keyalg RSA -keypass
-key_password -keystore
keystorename .keystore
取代 [JAVA_HOME]
使用安裝JDK的目錄,並將斜體文字取代為與您的環境相對應的值。
鍵入以下命令生成要發送到證書頒發機構的證書請求:
keytool -certreq -alias
"AEMForms Cert" -keystore
keystorename .keystore -file
AEMFormscertRequest.csr
當您的憑證檔案請求完成時,請完成下一個程式。
在命令提示字元中,導覽至 [JAVA HOME]
/bin並鍵入以下命令以導入已簽名CSR的CA的根證書:
keytool -import -trustcacerts -file
rootcert.pem -keystore keystorename.keystore -alias root
如果根憑證不在瀏覽器中,也請將其匯入該處。
取代 [JAVA_HOME]
使用安裝JDK的目錄,並將斜體文字取代為與您的環境相對應的值。
在命令提示字元中,導覽至 [JAVA HOME]
/bin並鍵入以下命令將憑據導入密鑰庫中:
keytool -import -trustcacerts -file
CACertificateName .crt -keystore
keystorename .keystore
[JAVA_HOME]
使用安裝JDK的目錄,並將斜體文字取代為與您的環境相對應的值。完成建立SSL憑證的步驟13 - 18。