建立並設定 WebGate
簡介
本教學課程示範如何設定 Oracle HTTP Server 和 Oracle Access Management 12c 的 WebGate 12c。
這是 Oracle Access Management 12c 入門系列中的第九個教學課程。依序讀取。
- Oracle Access Management 12c 系列入門 - 簡介
- 安裝 Oracle Database for Oracle Access Management 12c
- 建立適用於 Oracle Access Management 12c 的 Oracle Database
- 安裝 Oracle Access Management 12c
- 設定 Oracle Access Management 12c
- 設定 Oracle Access Management 12c 的 SSL
- 設定 Oracle Access Management 12c 的 Oracle Unified Directory
- 安裝並設定 Oracle HTTP Server for Oracle Access Management 12c
- 建立並設定 WebGate
- 使用 Oracle Access Management 12c 保護 WebLogic 伺服器中部署的應用程式
目標
Oracle WebGate 是一個 Web 伺服器 Plug-in,可攔截 HTTP 要求,並將它們轉送至 Oracle Access Management 執行處理以進行認證與授權。
必要條件
之後 [安裝並設定 Oracle HTTP Server for Oracle Access Management 12c]。
設定 Oracle WebGate
-
以
oracle形式啟動終端機視窗,並輸入下列命令:cd /u01/app/oracle/product/middleware/webgate/ohs/tools/deployWebGate ./deployWebGateInstance.sh -w \ /u01/app/oracle/admin/domains/oam_domain/config/fmwconfig/components/OHS/ohs1 \ -oh /u01/app/oracle/product/middleware/輸出看起來應該與下列類似:
Copying files from WebGate Oracle Home to WebGate Instancedir -
檢查是否已建立 webgate 目錄與子目錄:
ls -lart /u01/app/oracle/admin/domains/oam_domain/config/fmwconfig/components/OHS/ohs1/webgate輸出看起來應該與下列類似:
total 16 drwxr-x--- 7 oracle oinstall 4096 <DATE> .. drwxr-xr-x 4 oracle oinstall 33 <DATE> . drwxr-xr-x 3 oracle oinstall 21 <DATE> tools drwxr-xr-x 3 oracle oinstall 47 <DATE> config -
執行下列指令:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u01/app/oracle/product/middleware/lib cd /u01/app/oracle/product/middleware/webgate/ohs/tools/setup/InstallTools ./EditHttpConf -w /u01/app/oracle/admin/domains/oam_domain/config/fmwconfig/components/OHS/ohs1 \ -oh /u01/app/oracle/product/middleware/輸出看起來應該與下列類似:
The web server configuration file was successfully updated /u01/app/oracle/admin/domains/oam_domain/config/fmwconfig/components/OHS/ohs1/httpd.conf has been backed up as /u01/app/oracle/admin/domains/oam_domain/config/fmwconfig/components/OHS/ohs1/httpd.conf.
在 OAM 註冊 WebGate
-
啟動瀏覽器並存取位於
https://oam.example.com:7002/oamconsole的「OAM 主控台」。使用weblogic/<password>登入。 -
按一下快速入門精靈窗格中的 SSO 代理程式註冊。
-
選取代理程式類型:
Webgate,然後按一下下一步。 -
在設定 WebGate 頁面輸入如下的詳細資訊,然後按一下完成:
特性名稱 值 名稱 webgate_7777主機 ID webgate_7777安全 開啟 自動建立原則 已選取 -
按一下下載,並將
webgate_7777.zip儲存至/stage。 -
以
oracle方式啟動終端機視窗,並執行下列指令,將 WebGate 檔案和ca.crt複製到 OHS:cd /u01/app/oracle/admin/domains/oam_domain/config/fmwconfig/components/OHS/ohs1/webgate/config unzip /stage/webgate_7777.zip cp /stage/ssl/ca.crt cacert.pem注意:
ca.crt會以cacert.pem的形式複製到目錄,因為當驗證 OAM 受管理伺服器 (oam_server1) 傳送的憑證時,WebGate 會尋找cacert.pem。
重新啟動伺服器
-
以
oracle方式啟動終端機視窗,並執行下列命令以停止所有伺服器。如果出現提示,請輸入weblogic和<password>以取得使用者名稱和密碼:cd /u01/app/oracle/admin/domains/oam_domain/bin ./stopComponent.sh ohs1 ./stopNodeManager.sh ./stopWebLogic.sh -
以
oracle啟動新的終端機視窗,執行下列指令以啟動伺服器。輸入 weblogic 和代表 `username` 和 password (若有提示): cd /u01/app/oracle/admin/domains/oam_domain/bin ./startWebLogic.sh ./startNodeManager.sh ./startComponent.sh ohs1
測試 WebGate
-
啟動 Incognito 或私密瀏覽器。存取 OHS URL:
http://oam.example.com:7777。您應重新導向至 OAM SSO 登入頁面。請注意,重新導向 URL 現在指向 OAM 機器上代管的 OAM 伺服器 https
14101連接埠。 -
若使用內嵌 LDAP 伺服器,或者設定 OUD,則以
weblogic/<password>身分登入ahall/welcome1。應顯示 OHS 歡迎頁面。 -
啟動其他 Incognito 或私密瀏覽器,並透過
https://oam.example.com:4443進行測試,成功登入。
下一個教學課程
使用 Oracle Access Management 12c 保護 WebLogic 伺服器中部署的應用程式
意見
若要對此教學課程提供意見,請聯絡 idm_user_assistance_ww_grp@oracle.com。
致謝
- 作者 - 俄羅斯霍德孫