![]() | |
Sun Java System Portal Server Secure Remote Access 6 2005Q1 管理指南 |
第 7 章
證書本章會介紹證書管理並解釋如何安裝自簽的證書與來自認證機構 (CA) 的證書。
本章涵蓋下列主題:
SSL 證書簡介Sun Java System Portal Server Secure Remote Access 軟體提供以證書為基礎的遠端使用者認證。SRA 使用安全套接層 (SSL) 以啟用安全通訊。此 SSL 通訊協定可實現兩部機器之間的安全通訊。
SSL 證書使用公開金鑰與私人金鑰對提供加密與解密功能。
有兩種類型的證書:
依預設,當您安裝閘道時,系統會產生並安裝自簽證書。
安裝之後,您可以隨時產生、獲得或取代證書。
SRA 同時支援使用個人數位證書 (PDC) 的用戶端認證。PDC 是一種機制,可透過 SSL 用戶端認證進行使用者認證。有了 SSL 用戶端認證,SSL 訊號交換模式便會於閘道結束。閘道會擷取使用者的 PDC 並將它傳送到認證伺服器。而此伺服器會使用 PDC 認證使用者。若要配置 PDC 與認證鏈接,請參閱使用認證鏈接。
SRA 提供名為 certadmin 的工具,可讓您用來管理 SSL 證書。請參閱 certadmin 程序檔。
證書檔案與證書相關的檔案位於 /etc/opt/SUNWps/cert/default/gateway-profile-name。此目錄依預設包含 5 個檔案。
表 7-1 列出這些檔案及其說明。
證書信任屬性證書的信任屬性表示以下資訊:
每種證書有三種可能的信任種類,說明順序為:「SSL、電子郵件、物件簽署」。只有第一種類別可用於取得閘道。在每個種類位置,可以使用零或其他信任屬性代碼。
種類的屬性代碼由逗號隔開,而整個屬性集則是由引號環繞。例如,閘道安裝期間產生並安裝的自簽證書標記為 "u,u,u",表示此證書為伺服器證書 (使用者證書),而不是根 CA 證書。
表 7-2 列出可能的屬性值與每個值的意義。
表 7-2 證書信任屬性
屬性
描述
p
有效點
P
可信任點 (暗含 p)
c
有效 CA
T
可信任的 CA 核發用戶端證書 (暗含 c)
C
可信任的 CA 核發伺服器證書 (僅限 SSL) (暗含 c)
u
證書可以用於認證或簽署
w
傳送警告 (在該環境中使用證書時,與其他屬性一起使用以便包含一個警告)
CA 信任屬性證書資料庫中包含眾所皆知的公開 CA。有關修改公開 CA 信任屬性的資訊,請參閱修改證書的信任屬性。
表 7-3 列出眾多共用的認證機構及其信任屬性。
certadmin 程序檔您可以使用 certadmin 程序檔執行下列證書管理工作:
產生自簽證書您需要為每個伺服器和閘道之間的 SSL 通訊產生證書。
安裝之後若要產生自簽證書
- 以 root 身份,在您想要產生證書的閘道機器上執行 certadmin 程序檔:
portal-server-install-root/SUNWps/bin/certadmin -n gateway-profile-name
系統便會顯示證書管理功能表。
- 在證書管理功能表上選擇選項 1。
證書管理程序檔會詢問您是否想要保留現有的資料庫檔案。
- 請輸入機構特定的資訊、記號名稱和證書名稱。
What is the fully-qualified DNS name of this host? [host_name.domain_name]
What is the name of your organization (ex: Company)? []
What is the name of your organizational unit (ex: division)? []
What is the name of your City or Locality? []
What is the name (no abbreviation please) of your State or Province? []
What is the two-letter country code for this unit? []
Token name is needed only if you are not using the default internal (software) cryptographic module, for example, if you want to use a crypto card (Token names could be listed using: modutil -dbdir /etc/opt/SUNWps/cert/gateway-profile-name -list); Otherwise, just hit Return below.
Please enter the token name. []
Enter the name you like for this certificate?
Enter the validity period for the certificate (months) [6]
A self-signed certificate is generated and the prompt returns.
記號名稱 (預設空白) 和證書名稱儲存於 /etc/opt/SUNWps/cert/gateway-profile-name 之下的 .nickname 檔案中。
- 重新啟動證書閘道才會生效:
gateway-install-root/SUNWps/bin/gateway -n new gateway-profile-name start
產生證書簽署要求 (CSR)可以從 CA 訂製證書之前,您需要產生包含 CA 所需要資訊的證書簽署要求。
若要產生 CSR
- 以超級使用者身份執行 certadmin 程序檔:
portal-server-install-root/SUNWps/bin/certadmin -n gateway-profile-name
系統便會顯示證書管理功能表。
1) Generate Self-Signed Certificate
2) Generate Certificate Signing Request (CSR)
3) Add Root CA Certificate
4) Install Certificate From Certificate Authority (CA)
5) Delete Certificate
6) Modify Trust Attributes of Certificate (e.g., for PDC)
7) List Root CA Certificates
8) List All Certificates
9) Print Certificate Content
10) Quit
choice: [10] 2
- 在證書管理功能表上選擇選項 2。
程序檔提示您輸入機構特定的資訊、記號名稱和網路管理員電子郵件及電話號碼。
請指定主機的完整合格 DNS 名稱。
What is the fully-qualified DNS name of this host? [snape.sesta.com]
What is the name of your organization (ex: Company)? []
What is the name of your organizational unit (ex: division)? []
What is the name of your City or Locality? []
What is the name (no abbreviation please) of your State or Province? []
What is the two-letter country code for this unit? []
Token name is needed only if you are not using the default internal (software) cryptographic module, for example, if you want to use a crypto card (Token names could be listed using: modutil -dbdir /etc/opt/SUNWps/cert -list); Otherwise, just hit Return below.
Please enter the token name []
Now input some contact information for the webmaster of the machine that the certificate is to be generated for.
What is the email address of the admin/webmaster for this server [] ?
What is the phone number of the admin/webmaster for this server [] ?
- 輸入所有需要的資訊。
CSR 會產生並儲存於 portal-server-install-root/SUNWps/bin/csr.hostname.datetimestamp 檔案中。CSR 同時會列印於螢幕上。當您從 CA 訂製證書時,可以直接複製並貼上 CSR。
新增根 CA 證書若用戶端站台提交的的證書由閘道證書資料庫中不包含的 CA 所簽署,則 SSL 訊號交換模式將會失敗。
若要避免這種情況,您需要新增根 CA 證書到證書資料庫。這項動作可以確保 CA 變成閘道所知的 CA。
瀏覽至 CA 的網站並獲得此 CA 的根證書。當您使用 certadmin 程序檔時,請指定根 CA 證書的檔案名稱和路徑。
若要新增根 CA 證書
- 以超級使用者身份執行 certadmin 程序檔。
portal-server-install-root/SUNWps/bin/certadmin -n gateway-profile-name
系統便會顯示證書管理功能表。
1) Generate Self-Signed Certificate
2) Generate Certificate Signing Request (CSR)
3) Add Root CA Certificate
4) Install Certificate From Certificate Authority (CA)
5) Delete Certificate
6) Modify Trust Attributes of Certificate (e.g., for PDC)
7) List Root CA Certificates
8) List All Certificates
9) Print Certificate Content
10) Quit
choice: [10] 3
- 在證書管理功能表上選擇選項 3。
- 輸入包含根證書的檔案名稱並輸入證書名稱。
根 CA 證書將會新增至證書資料庫。
安裝來自認證機構的 SSL 證書閘道安裝期間,依預設系統會建立自簽證書並安裝。在安裝之後的任何時間,您都可以安裝由供應商或由您公司的 CA 提供簽署的 SSL 證書,其中這些供應商會提供正式的認證機構 (CA) 服務。
這項工作包含的三個步驟為:
從 CA 訂製證書
產生證書簽署要求 (CSR) 之後,您需要使用 CSR 從 CA 訂製證書。
若要從 CA 訂製證書
安裝來自 CA 的證書
使用 certadmin 程序檔,將您從 CA 獲得的證書安裝在本機資料庫檔案中,路徑是 /etc/opt/SUNWps/cert/gateway-profile-name。
若要安裝來自 CA 的證書
- 以超級使用者身份執行 certadmin 程序檔。
portal-server-install-root/SUNWps/bin/certadmin -n gateway-profile-name
系統便會顯示證書管理功能表。
1) Generate Self-Signed Certificate
2) Generate Certificate Signing Request (CSR)
3) Add Root CA Certificate
4) Install Certificate From Certificate Authority (CA)
5) Delete Certificate
6) Modify Trust Attributes of Certificate (e.g., for PDC)
7) List Root CA Certificates
8) List All Certificates
9) Print Certificate Content
10)Quit
choice: [10] 4
- 在證書管理功能表上選擇選項 4。
程序檔會讓您輸入證書檔案名稱、證書名稱和記號名稱。
What is the name (including path) of file that contains the certificate?
Please enter the token name you used when creating CSR for this certificate. []
- 提供所有需要的資訊。
證書將安裝於 /etc/opt/SUNWps/cert/gateway-profile-name,而且系統會傳回螢幕提示。
- 重新啟動證書閘道才會生效:
gateway-install-root/SUNWps/bin/gateway -n gateway-profile-name start
刪除證書您可以使用證書管理程序檔刪除證書。
若要刪除證書
- 以超級使用者身份執行 certadmin 程序檔。
其中 gateway-profile-name 是閘道實例的名稱。
系統便會顯示證書管理功能表。
1) Generate Self-Signed Certificate
2) Generate Certificate Signing Request (CSR)
3) Add Root CA Certificate
4) Install Certificate From Certificate Authority (CA)
5) Delete Certificate
6) Modify Trust Attributes of Certificate (e.g., for PDC)
7) List Root CA Certificates
8) List All Certificates
9) Print Certificate Content
10)Quit
choice: [10] 5
- 在證書管理功能表上選擇選項 5。
- 輸入要刪除的證書名稱。
修改證書的信任屬性若用戶端認證與閘道一起使用,證書信任屬性則需要修改。其中一個用戶端認證範例為 PDC (個人數位證書)。核發 PDC 的 CA 必須受閘道所信任,其中 CA 證書的 SSL 標記必須為 "T"。
若閘道設為與 HTTPS 站台通訊,HTTPS 站台伺服器證書的 CA 必須受閘道所信任,而且 CA 證書的 SSL 標記 必須為 "C"。
若要修改證書的信任屬性
- 以超級使用者身份執行 certadmin 程序檔。
其中 gateway-profile-name 是閘道實例的名稱。
系統便會顯示證書管理功能表。
1) Generate Self-Signed Certificate
2) Generate Certificate Signing Request (CSR)
3) Add Root CA Certificate
4) Install Certificate From Certificate Authority (CA)
5) Delete Certificate
6) Modify Trust Attributes of Certificate (e.g., for PDC)
7) List Root CA Certificates
8) List All Certificates
9) Print Certificate Content
10)Quit
choice: [10] 6
- 在證書管理功能表上選擇選項 6。
- 輸入證書的名稱。例如:Thawte Personal Freemail C。
- 輸入證書的信任屬性。
系統將會變更證書信任屬性。
列示根 CA 證書您可以使用證書管理程序檔檢視所有根 CA 證書。
若要檢視根 CA 清單
- 以超級使用者身份執行 certadmin 程序檔。
其中 gateway-profile-name 是閘道實例的名稱。
系統便會顯示證書管理功能表。
1) Generate Self-Signed Certificate
2) Generate Certificate Signing Request (CSR)
3) Add Root CA Certificate
4) Install Certificate From Certificate Authority (CA)
5) Delete Certificate
6) Modify Trust Attributes of Certificate (e.g., for PDC)
7) List Root CA Certificates
8) List All Certificates
9) Print Certificate Content
10)Quit
choice: [10] 7
- 在證書管理功能表上選擇選項 7。
系統會顯示所有根 CA 證書。
列示所有證書您可以使用證書管理程序檔檢視所有證書及其對應的信任屬性。
若要列示所有證書
- 以超級使用者身份執行 certadmin 程序檔。
其中 gateway-profile-name 是閘道實例的名稱。
系統便會顯示證書管理功能表。
1) Generate Self-Signed Certificate
2) Generate Certificate Signing Request (CSR)
3) Add Root CA Certificate
4) Install Certificate From Certificate Authority (CA)
5) Delete Certificate
6) Modify Trust Attributes of Certificate (e.g., for PDC)
7) List Root CA Certificates
8) List All Certificates
9) Print Certificate Content
10)Quit
choice: [10] 8
- 在證書管理功能表上選擇選項 8。
系統會顯示所有 CA 證書。
列印證書您可以使用證書管理程序檔列印證書。
若要列印證書
- 以超級使用者身份執行 certadmin 程序檔。
其中 gateway-profile-name 是閘道實例的名稱。
系統便會顯示證書管理功能表。
1) Generate Self-Signed Certificate
2) Generate Certificate Signing Request (CSR)
3) Add Root CA Certificate
4) Install Certificate From Certificate Authority (CA)
5) Delete Certificate
6) Modify Trust Attributes of Certificate (e.g., for PDC)
7) List Root CA Certificates
8) List All Certificates
9) Print Certificate Content
10)Quit
choice: [10] 9
- 在證書管理功能表上選擇選項 9。
- 輸入證書的名稱。