要在JBoss Application Server上配置SSL,需要SSL身份驗證憑證。 您可以使用Java鍵工具來建立憑證或要求,並從憑證授權機構(CA)匯入憑證。 然後,您必須在JBoss上啟用SSL。
您可以使用單一命令來執行keytool,該命令包含建立keystore所需的所有資訊。
在此過程中:
[appserver root]
是執行AEM表單之應用程式伺服器的首頁目錄。[type]
是根據您執行的安裝類型而有所不同的資料夾名稱。在命令提示符下,導航至[JAVA HOME]/bin ,然後鍵入以下命令以建立憑據和密鑰庫:
keytool -genkey -dname "CN=
主機 , OU=
名稱群 , O=
組名稱公司 ,L=
名稱城市名 , S=
** , C=
稱狀態國 -alias "AEMForms Cert"
-keyalg RSA -keypass
家代碼" key_ -keystore
passwordkeystorename .keystore
將[JAVA_HOME]
替換為安裝JDK的目錄,並將斜體文本替換為與您的環境對應的值。 主機名是應用程式伺服器的完全限定域名。
在提示輸入密碼時輸入keystore_password
。 密鑰庫和密鑰的密碼必須相同。
此步驟中輸入的keystore_password
可能與在步驟1中輸入的密碼(key_password)相同,也可能不同。
鍵入以下命令之一,將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 root] \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
中cacerts檔案的寫訪問(如果需要),請執行以下任務:
chmod 777 cacerts
輸入以下命令以匯入憑證:
keytool -import -alias “AEMForms Cert” -file
AEMForms_ .cer -keystore
certJAVA_HOME \jre\lib\security\cacerts
鍵入changeit
作為口令。 此密碼是Java安裝的預設密碼,系統管理員可能已更改此密碼。
當提示輸入Trust this certificate? [no]
:時,鍵入yes
。 將顯示確認"Certificate was added to keystore"。
如果您要從Workbench透過SSL連線,請在Workbench電腦上安裝憑證。
在文字編輯器中,開啟下列檔案以進行編輯:
單伺服器- [appserver root]
/standalone/configuration/lc_<dbname/tunklypky>.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 root]\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 HOME]/bin ,然後鍵入以下命令以建立密鑰庫和密鑰:
keytool -genkey -dname "CN=
Host , OU=
NameGroup , O=
Company , L=
NameCity , S=
, C=
NameStateCountry Code"- -alias "AEMForms Cert"
-keyalg RSA -keypass
key_ -keystore
passwordkeystorename .keystore
將*[JAVA_HOME]
*替換為安裝JDK的目錄,並將斜體文本替換為與您的環境對應的值。
鍵入以下命令以生成要發送到證書頒發機構的證書請求:
keytool -certreq -alias
"AEMForms Cert" -keystore
** .keystore -file
keystorenameAEMFormscertRequest.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
CACertificateNamekeystorename .crt -keystore
** .keystore
[JAVA_HOME]
替換為安裝JDK的目錄,並將斜體文本替換為與您的環境對應的值。完成「Create an SSL credential(建立SSL憑證)」的步驟13 - 18。