Sun Java System Portal Server Secure Remote Access 7.2 Administration Guide

The certadmin Script

You can use the certadmin script to do the following certificate administration tasks:

Generating Self-Signed Certificates

You need to generate certificates for SSL communication between each server and Gateway.

ProcedureTo Generate a Self-Signed Certificate After Installation

  1. As root, run the certadmin script on the Gateway machine for which you want to generate a certificate:


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

    The certificate administration menu is displayed.


    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. Choose option 1 on the certificate administration menu.

    The certificate administration script asks you if you want to keep the existing database files.

  3. Enter organization-specific information, token name, and the certificate name.


    Note –

    For a wild card certificate, specify a * in the fully-qualified DNS name of the host. For example, if the fully-qualified DNS name of the host is abc.sesta.com, specify it as *.sesta.com. The certificate that is generated is now valid for all host names in the sesta.com domain.



    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.

    The token name (default being empty) and certificate name are stored in the .nickname file under /etc/opt/SUNWportal/cert/gateway-profile-name.

  4. Restart the Gateway for the certificate to take effect:


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

Generating a Certificate Signing Request (CSR)

Before you can order a certificate from a CA, you need to generate a certificate signing request which contains the information that is required by the CA.

ProcedureTo Generate a CSR

  1. As root, run the certadmin script:


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

    The certificate administration menu is displayed.


    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. Choose option 2 on the certificate administration menu.

    The script prompts you for organization-specific information, token name, and web master’s email and phone number.

    Ensure that you specify the fully-qualified DNS name of the host.


    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. Type all the required information.


    Note –

    Do not leave the web master’s email and phone number blank. The information is necessary for obtaining a valid CSR.


    A CSR is generated and stored in the file portal-server-install-root/SUNWportal/bin/csr.hostname.datetimestamp. The CSR is also printed on the screen. You can directly copy and paste the CSR when you order a certificate from a CA.

Adding a Root CA Certificate

If a client site presents a certificate signed by a CA that is unknown to the Gateway certificate database, the SSL handshake fails.

To prevent this, you need to add a root CA certificate to the certificate database. This ensures that the CA becomes known to the Gateway.

Browse to the CA’s website and obtain the root certificate for that CA. When you use the certadmin script, specify the file name and path of the root CA certificate.

ProcedureTo Add a Root CA Certificate

  1. As root, run the certadmin script.


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

    The certificate administration menu is displayed.


    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. Choose option 3 on the certificate administration menu.

  3. Enter the name of the file that contains the root certificate and enter the name of the certificate.

    The root CA certificate is added to the certificate database.

Installing SSL Certificates From the Certificate Authority

During the installation of the Gateway, a self-signed certificate is created and installed by default. At any point after installation, you can install SSL certificates signed by vendors who provide official certificate authority (CA) services, or by your corporate CA.

The three steps involved in this task are:

Ordering a Certificate from a CA

After generating a certificate signing request (CSR), you need to order the certificate from the CA using a CSR.

ProcedureTo Order a Certificate From a CA

  1. Go to the Certificate Authority’s web site and order your certificate.

  2. Provide the CSR as requested by the CA. Provide other information if requested by the CA.

    You will receive your certificate from the CA. Save it in a file. Include the "BEGIN CERTIFICATE" and "END CERTIFICATE" lines with the certificate in the file.

    The following example omits the actual certificate data.


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

Installing a Certificate from a CA

Using the certadmin script, install the certificate obtained from the CA in your local database files in /etc/opt/SUNWportal/cert/gateway-profile-name.

ProcedureTo Install a Certificate From a CA

  1. As root, run the certadmin script.


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

    The certificate administration menu is displayed.


    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. Choose option 4 on the certificate administration menu.

    The script asks you to enter the certificate file name, certificate name, and the token name.


    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. Supply all the required information.

    The certificate is installed in /etc/opt/SUNWportal/cert/gateway-profile-name, and the screen prompt returns.

  4. Restart the Gateway for the certificate to take effect:


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

Deleting a Certificate

You can delete a certificate by using the certificate administration script.

ProcedureTo Delete a Certificate

  1. As root, run the certadmin script.


    portal-server-install-root/SUNWportal/bin/certadmin -n

    where gateway-profile-name is the name of the Gateway instance.

    The certificate administration menu is displayed.


    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. Choose option 5 on the certificate administration menu.

  3. Enter the name of the certificate to be deleted.

Modifying the Trust Attributes of a Certificate

One case in which the trust attributes of a certificate needs to be modified is if client authentication is used with the Gateway. An example of client authentication is PDC (Personal Digital Certificate). The CA that issues the PDCs must be trusted by the Gateway, and the CA certificate must be marked "T" for SSL.

If the Gateway is set up to communicate with an HTTPS site, the CA of the HTTPS site server certificate must be trusted by the Gateway, and the CA certificate must be marked "C" for SSL.

ProcedureTo Modify the Trust Attributes for a Certificate

  1. As root, run the certadmin script.


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

    where gateway-profile-name is the name of the Gateway instance.

    The certificate administration menu is displayed.


    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. Choose option 6 on the certificate administration menu.

  3. Enter the name of the certificate. For example, Thawte Personal Freemail CA.


    Please enter the name of the certificate?
    Thawte Personal Freemail CA
  4. Enter the trust attribute for the certificate.


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

    The certificate trust attribute will be changed.

Listing Root CA Certificates

You can view all root CA certificates by using the certificate administration script.

ProcedureTo View the List of Root CAs

  1. As root, run the certadmin script.


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

    where gateway-profile-name is the name of the Gateway instance.

    The certificate administration menu is displayed.


    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. Choose option 7 on the certificate administration menu.

    All root CA certificates are displayed.

Listing All Certificates

You can view all certificates and their corresponding trust attributes by using the certificate administration script.

ProcedureTo List All the Certificates

  1. As root, run the certadmin script.


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

    where gateway-profile-name is the name of the Gateway instance.

    The certificate administration menu is displayed.


    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. Choose option 8 on the certificate administration menu.

    All CA certificates are displayed.

Printing a Certificate

You can print a certificate by using the certificate administration script.

ProcedureTo Print a Certificates

  1. As root, run the certadmin script.


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

    where gateway-profile-name is the name of the Gateway instance.

    The certificate administration menu is displayed.


    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. Choose option 9 on the certificate administration menu.

  3. Enter the name of the certificate.