若要在JBoss Application Server上設定SSL,您需要用於驗證的SSL認證。 您可以使用Java keytool來建立認證,或是從憑證授權單位(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
在此步驟輸入的密碼(key_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
提供對cacerts檔案的寫入許可權 [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憑證」 -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。