Sun Java System Portal Server Secure Remote Access 6 2005Q1 Administration Guide |
Chapter 7
CertificatesThis chapter describes certificate management and explains how to install self-signed certificates and certificates from a Certificate Authority.
This chapter covers the following topics:
Overview of SSL CertificatesThe Sun Java System Portal Server Secure Remote Access software provides certificate-based authentication for remote users. SRA uses Secure Sockets Layer (SSL) to enable secure communication. The SSL protocol enables secure communication between two machines.
A SSL certificate provides encryption and decryption capabilities using a public and private key pair.
The two types of certificates are:
By default, a self-signed certificate is generated and installed when you install the Gateway.
You can generate, obtain, or replace a certificate anytime after installation.
SRA also supports client authentication with Personal Digital Certificates (PDCs). PDCs are a mechanism to authenticate a user through SSL client authentication. With SSL client authentication, the SSL handshake ends at the Gateway. The Gateway extracts the user’s PDC and passes it to the authenticated server. This server uses the PDC to authenticate the user. To configure PDCs along with Authentication Chaining, see Using Authentication Chaining.
SRA provides a tool named certadmin that you can use to manage the SSL certificates. See The certadmin Script.
Certificate FilesCertificate related files are located in /etc/opt/SUNWps/cert/default/gateway-profile-name. This directory contains 5 files by default.
Table 7-1 lists these files and their descriptions.
Certificate Trust AttributesThe trust attributes of a certificate indicate the following information:
The three available trust categories for each certificate are expressed in this order: “SSL, email, object signing”. Only the first category is useful got the Gateway. In each category position, zero or more trust attribute codes are used.
The attribute codes for the categories are separated by commas, and the entire set of attributes is enclosed by quotation marks. For example, the self-signed certificate generated and installed during the Gateway installation is marked "u,u,u" which means the certificate is a server certificate (user certificate) and not a root CA certificate.
Table 7-2 lists the possible attribute values and the meaning of each value.
CA Trust AttributesMost well-known public CAs are included in the certificate database. See Modifying the Trust Attributes of a Certificate for information on modifying the trust attributes of a public CA.
Table 7-3 lists the most common Certificate Authorities with the trust attributes.
The certadmin ScriptYou can use the certadmin script to do the following certificate administration tasks:
Generating Self-Signed CertificatesYou need to generate certificates for SSL communication between each server and Gateway.
To Generate a Self-Signed Certificate After Installation
- As root, run the certadmin script on the Gateway machine for which you want to generate a certificate:
portal-server-install-root/SUNWps/bin/certadmin -n gateway-profile-name
The certificate administration menu is displayed.
- Choose option 1 on the certificate administration menu.
The certificate administration script asks you if you want to keep the existing database files.
- Enter organization-specific information, token name, and the certificate name.
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.
The token name (default being empty) and certificate name are stored in the .nickname file under /etc/opt/SUNWps/cert/gateway-profile-name.
- Restart the Gateway for the certificate to take effect:
gateway-install-root/SUNWps/bin/gateway -n new gateway-profile-name start
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.
To Generate a CSR
- As root, run the certadmin script:
portal-server-install-root/SUNWps/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
- 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/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 [] ?
- Type all the required information.
A CSR is generated and stored in the file portal-server-install-root/SUNWps/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 CertificateIf 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.
To Add a Root CA Certificate
- As root, run the certadmin script.
portal-server-install-root/SUNWps/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
- Choose option 3 on the certificate administration menu.
- 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 AuthorityDuring 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.
To Order a Certificate From a CA
- Go to the Certificate Authority’s web site and order your certificate.
- 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.
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/SUNWps/cert/gateway-profile-name.
To Install a Certificate From a CA
- As root, run the certadmin script.
portal-server-install-root/SUNWps/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
- 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. []
- Supply all the required information.
The certificate is installed in /etc/opt/SUNWps/cert/gateway-profile-name, and the screen prompt returns.
- Restart the Gateway for the certificate to take effect:
gateway-install-root/SUNWps/bin/gateway -n gateway-profile-name start
Deleting a CertificateYou can delete a certificate by using the certificate administration script.
To Delete a Certificate
- As root, run the certadmin script.
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
- Choose option 5 on the certificate administration menu.
- Enter the name of the certificate to be deleted.
Modifying the Trust Attributes of a CertificateOne 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.
To Modify the Trust Attributes for a Certificate
- As root, run the certadmin script.
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
- Choose option 6 on the certificate administration menu.
- Enter the name of the certificate. For example, Thawte Personal Freemail C.
- Enter the trust attribute for the certificate.
The certificate trust attribute will be changed.
Listing Root CA CertificatesYou can view all root CA certificates by using the certificate administration script.
To View the List of Root CAs
- As root, run the certadmin script.
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
- Choose option 7 on the certificate administration menu.
All root CA certificates are displayed.
Listing All CertificatesYou can view all certificates and their corresponding trust attributes by using the certificate administration script.
To List All the Certificates
- As root, run the certadmin script.
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
- Choose option 8 on the certificate administration menu.
All CA certificates are displayed.
Printing a CertificateYou can print a certificate by using the certificate administration script.
To Print a Certificates
- As root, run the certadmin script.
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
- Choose option 9 on the certificate administration menu.
- Enter the name of the certificate.