Sun Java System Portal Server Secure Remote Access 7.2 管理指南

certadmin 程序檔

您可以使用 certadmin 程序檔執行下列憑證管理作業:

產生自簽憑證

您需要為每個伺服器和閘道之間的 SSL 通訊產生憑證。

Procedure安裝之後產生自簽憑證

  1. 以超級使用者身份,在您想要產生憑證的閘道機器上執行 certadmin 程序檔:


    portal-server-install-root/SUNWportal/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]
    1
    
  2. 在憑證管理功能表上選擇選項 1

    憑證管理程序檔會詢問您是否想要保留現有的資料庫檔案。

  3. 請輸入組織特定的資訊、記號名稱和憑證名稱。


    備註 –

    如需萬用字元憑證,請在主機的完全合格的 DNS 名稱中指定一個 * 號。例如,如果主機的完全合格 DNS 名稱為 abc.sesta.com,請指定為 *.sesta.com。產生的憑證現在對於 sesta.com 網域中的所有主機名稱都有效。



    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/SUNWportal/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/SUNWportal/cert/ gateway-profile-name 之下的 .nickname 檔案中。

  4. 重新啟動憑證以使閘道生效:


    ./psadmin start-sra-instance -u amadmin -f passwordfile -N profilename -t gateway

產生憑證簽署請求 (CSR)

可以從 CA 訂製憑證之前,您需要產生包含 CA 所需要資訊的憑證簽署要求。

Procedure產生 CSR

  1. 以超級使用者身份執行 certadmin 程序檔:


    portal-server-install-root/SUNWportal/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. 在憑證管理功能表上選擇選項 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/SUNWportal/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 [] ?
  3. 輸入所有需要的資訊。


    備註 –

    請務必填寫網路管理員電子郵件和電話號碼。為了獲得有效的 CSR,必須填寫這兩項資訊。


    CSR 會產生並儲存於 portal-server-install-root /SUNWportal/bin/csr.hostname.datetimestamp 檔案中。CSR 同時會列印於螢幕上。當您從 CA 訂製憑證時,可以直接複製並貼上 CSR。

新增根 CA 憑證

若用戶端網站提交的憑證由閘道憑證資料庫中不包含的 CA 所簽署,則 SSL 訊號交換模式將會失敗。

要避免這種情況,您需要新增根 CA 憑證到憑證資料庫。這項動作可以確保 CA 變成閘道所知的 CA。

瀏覽至 CA 的網站並獲得此 CA 的根憑證。當您使用 certadmin 程序檔時,請指定根 CA 憑證的檔案名稱和路徑。

Procedure新增根 CA 憑證

  1. 以超級使用者身份執行 certadmin 程序檔。


    portal-server-install-root/SUNWportal/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
    
  2. 在憑證管理功能表上選擇選項 3

  3. 輸入包含根憑證的檔案名稱並輸入憑證名稱。

    根 CA 憑證將會新增至憑證資料庫。

安裝來自憑證授權單位的 SSL 憑證

閘道安裝期間,依預設系統會建立自簽憑證並安裝。在安裝之後的任何時間,您都可以安裝由供應商或由您公司的 CA 提供簽署的 SSL 憑證,其中這些供應商會提供正式的憑證授權單位 (CA) 服務。

這項工作包含的三個步驟為:

從 CA 訂製憑證

產生憑證簽署要求 (CSR) 之後,您需要使用 CSR 從 CA 訂製憑證。

Procedure從 CA 訂製憑證

  1. 請至憑證授權單位的網站並訂製您的憑證。

  2. 提供 CA 所要求的 CSR。若 CA 要求請提供其他資訊。

    您將會收到 CA 簽署的憑證。請將它儲存在檔案中。檔案中憑證內容前後請包含 "BEGIN CERTIFICATE" 和 "END CERTIFICATE" 兩行。

    下面的範例省略了實際的憑證資料。


    -----BEGIN CERTIFICATE-----
    The certificate contents...
    ----END CERTIFICATE-----

安裝來自 CA 的憑證

使用 certadmin 程序檔,將您從 CA 獲得的憑證安裝在本機資料庫檔案中,路徑是 /etc/opt/SUNWportal/cert/ gateway-profile-name

Procedure安裝來自 CA 的憑證

  1. 以超級使用者身份執行 certadmin 程序檔。


    portal-server-install-root/SUNWportal/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
    
  2. 在憑證管理功能表上選擇選項 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. []
  3. 提供所有需要的資訊。

    憑證安裝於 /etc/opt/SUNWportal/cert/gateway-profile-name ,而且系統會傳回螢幕提示。

  4. 重新啟動憑證以使閘道生效:


    ./psadmin start-sra-instance -u amadmin -f passwordfile -N profilename -t gateway

刪除憑證

您可以使用憑證管理程序檔刪除憑證。

Procedure刪除憑證

  1. 以超級使用者身份執行 certadmin 程序檔。


    portal-server-install-root/SUNWportal/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]
    5
    
  2. 在憑證管理功能表上選擇選項 5

  3. 輸入要刪除的憑證名稱。

修改憑證的信任屬性

若用戶端認證與閘道一起使用,憑證信任屬性則需要修改。其中一個用戶端認證範例為 PDC (個人數位憑證)。核發 PDC 的 CA 必須受閘道所信任,其中 CA 憑證的 SSL 標記必須為 "T"。

若閘道設為與 HTTPS 網站通訊,HTTPS 網站伺服器憑證的 CA 必須受閘道所信任,而且 CA 憑證的 SSL 標記必須為 "C"。

Procedure修改憑證的信任屬性

  1. 以超級使用者身份執行 certadmin 程序檔。


    gateway-install-root/SUNWportal/bin/certadmin -n
    gateway-profile-name
    

    其中 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
    
  2. 在憑證管理功能表上選擇選項 6

  3. 輸入憑證名稱。例如:Thawte Personal Freemail CA。


    Please enter the name of the certificate?
    Thawte Personal Freemail CA
  4. 輸入憑證的信任屬性。


    Please enter the trust attribute you want the 
    certificate to have [CT,CT,CT]

    系統將會變更憑證信任屬性。

列示根 CA 憑證

您可以使用憑證管理程序檔檢視所有根 CA 憑證。

Procedure檢視根 CA 清單

  1. 以超級使用者身份執行 certadmin 程序檔。


    portal-server-install-root/SUNWportal/bin/certadmin -n
    gateway-profile-name
    

    其中 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
    
  2. 在憑證管理功能表上選擇選項 7

    系統會顯示所有根 CA 憑證。

列示所有憑證

您可以使用憑證管理程序檔檢視所有憑證及其對應的信任屬性。

Procedure列示所有憑證

  1. 以超級使用者身份執行 certadmin 程序檔。


    portal-server-install-root
    /SUNWportal/bin/certadmin -n
    gateway-profile-name
    

    其中 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
    
  2. 在憑證管理功能表上選擇選項 8

    系統會顯示所有 CA 憑證。

列印憑證

您可以使用憑證管理程序檔列印憑證。

Procedure列印憑證

  1. 以超級使用者身份執行 certadmin 程序檔。


    portal-server-install-root/SUNWportal/bin/certadmin -n
     gateway-profile-name
    

    其中 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
    
  2. 在憑證管理功能表上選擇選項 9

  3. 輸入憑證名稱。