| |
| 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/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/certgateway-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/certgateway-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。
- 輸入憑證的名稱。