The UCAR Web Engineering Group (WEG) provides a number of services related to security certificates:
This document outlines procedures for rendering these services. Please note that there are still a number of unknowns in these procedures, that are followed for historical reasons, without explanation.
It is assumed that proper user notification is made when needed. For example, when the cookie signing certificate is changed, users should be notified that they need to close their browsers and open new ones because their cookie was signed with the old certificate. See the Server Work Policy document.
We store certificates and the associated files in the filesystem /tools/admin (wfs:/global/wfs/weg/tools/sparc.solaris-8/admin) in a directory named with a prefix wegCA and appended with the date with which the directory was created, e..g, /tools/admin/wegCA.030711 (International date format).
certs crl newcerts private
Then add the new hostlist by running the command: ./genhostlist <hostlist >>weg-ca.cnf
export SSLDIR=`pwd`
export OPENSSL_CONF=$SSLDIR/weg-ca.cnf
openssl req -new -days 1850 -extensions v3_weg_ca -keyout private/wegCA.key -out newcerts/wegCA.req
Use the standard WEG CA pass phrase. Here is what the usual settings dialog looks like:
Country Name (2 letter code) [US]:
State or Province Name (full name) [Colorado]:
Locality Name (eg, city) [Boulder]:
Organization Name (eg, company) [University Corporation for Atmospheric Research]:
Organizational Unit Name (eg, section) [UCAR Web Engineering Group]:
Common Name (eg, YOUR name) [(*.).ucar.edu]:UCAR Web Engineering Group Certification Authority
Email Address []:webmaster@ucar.edu
The certificate request is newcerts/wegCA.req.
c_rehash certs
openssl verify -CApath certs certs/wegCA.pem
openssl ca -revoke certs/http.pem -keyfile private/wegCA.key -cert certs/wegCA.pem
Using configuration from /tools/admin/wegCA/weg-ca.cnf
Enter PEM pass phrase:
Revoking Certificate NN.
Data Base Updated
openssl req -nodes -new -out newcerts/http.req -keyout private/http.key -extensions v3_http
Country Name (2 letter code) [US]:
State or Province Name (full name) [Colorado]:
Locality Name (eg, city) [Boulder]:
Organization Name (eg, company) [University Corporation for Atmospheric Research]:
Organizational Unit Name (eg, section) [UCAR Web Engineering Group]:
Common Name (eg, YOUR name) [(*.).ucar.edu]:
Email Address []:webmaster@ucar.edu
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
openssl ca -days 720 -cert certs/wegCA.pem -keyfile private/wegCA.key -extensions v3_http -out certs/http.pem -in newcerts/http.req
Enter PEM pass phrase:
Check that the request matches the signature
Signature ok
The Subjects Distinguished Name is as follows
countryName :PRINTABLE:'US'
stateOrProvinceName :PRINTABLE:'Colorado'
localityName :PRINTABLE:'Boulder'
organizationName :PRINTABLE:'University Corporation for Atmospheric Research'
organizationalUnitName:PRINTABLE:'UCAR Web Engineering Group'
commonName :T61STRING:'(*.).ucar.edu'
emailAddress :IA5STRING:'webmaster@ucar.edu'
Certificate is to be certified until Jul 13 16:21:44 2005 GMT (720 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
The signed server certificate is certs/http.pem.
c_rehash certs
openssl verify -CApath certs certs/http.pem
certs/http.pem: OK
keytool -import -alias ucarCA -trustcacerts -file ucarCA.der
openssl x509 -in wegCA.pem -inform PEM -out wegCA.der -outform DER
keytool -import -alias wegCA -trustcacerts -file wegCA.der
keytool -genkey -alias tomcat -keyalg RSA
Enter keystore password: changeit
What is your first and last name? [Unknown]: *.ucar.edu
What is the name of your organizational unit? [Unknown]: UCAR Web Engineering Group
What is the name of your organization? [Unknown]: University Corporation for Atmospheric Research
What is the name of your City or Locality? [Unknown]: Boulder
What is the name of your State or Province? [Unknown]: Colorado
What is the two-letter country code for this unit? [Unknown]: US
Is CN=*.ucar.edu, OU=UCAR Web Engineering Group, O=University Corporation for Atmospheric Research, L=Boulder, ST=Colorado, C=US correct?
[no]: yes
Enter key password for <tomcat>
(RETURN if same as keystore password):
keytool -certreq -keyalg RSA -alias tomcat -file tomcat.req
openssl ca -days 720 -cert certs/wegCA.pem -keyfile private/wegCA.key -extensions v3_http -out certs/tomcat.crt -in newcerts/tomcat.req
Enter PEM pass phrase:
Check that the request matches the signature
Signature ok
The Subjects Distinguished Name is as follows
countryName :PRINTABLE:'US'
stateOrProvinceName :PRINTABLE:'Colorado'
localityName :PRINTABLE:'Boulder'
organizationName :PRINTABLE:'University Corporation for Atmospheric Research'
organizationalUnitName:PRINTABLE:'UCAR Web Engineering Group'
commonName :ASN.1 12:'(*.).ucar.edu'
Certificate is to be certified until Jul 13 18:11:37 2005 GMT (720 days)
Sign the certificate? [y/n]:y
openssl x509 -in tomcat.crt -inform PEM -out tomcat.der -outform DER
keytool -import -alias tomcat -trustcacerts -file tomcat.der
Enter keystore password: changeit
Certificate reply was installed in keystore
This is much like the section above, except instead of generating our own certificate request, we ask the webmaster of the remote server (another Division or Program, presumably) to send us an official CSR (Certificate Signing Request), which we sign, and return the resulting certificate to them. This is just what the UCAR Security Administrator does for our WEG CA.
Note that when a certificate that is being regenerated, that is, it is of the same characteristics (hostname, etc.) of a certificate that has been generated before, then the signing step will trigger an error message to this effect. The index.txt file must be edited to manually remove the corresponding line, and the serial file must be edited to decrement the counter.
For completeness, this section is included here, although this certificate is not signed with any CAs.
openssl req -nodes -new -x509 -days 720 -keyout private/authsign.key -extensions v3_sign -text -out certs/authsign.pem
Country Name (2 letter code) [US]:
State or Province Name (full name) [Colorado]:
Locality Name (eg, city) [Boulder]:
Organization Name (eg, company) [University Corporation for Atmospheric Research]:
Organizational Unit Name (eg, section) [UCAR Web Engineering Group]:
Common Name (eg, YOUR name) [(*.).ucar.edu]:GatewayAuthenticator
Email Address []:webmaster@ucar.edu
The certificate is certs/authsign.pem.
c_rehash certs
/web/auth/login/ucar/GWlogin.cgi
openssl verify -CApath certs certs/authsign.pem
certs/authsign.pem: OK
# jarsigner -verify stest.jar
jar verified.
# jarsigner -signedjar stest.jar test.jar tomcat
Enter Passphrase for keystore:
Certain tests can be done on the production Apache server using test areas and configurations that have been set up.
Testing of authentication scripts is done in /web/auth, for example /web/auth/login/test for the login script. This is configured in the auth.conf virtual host.
This is done using the test server running on web.ucar.edu. The files are in /usr/local/apache. Configure your workstation to point the hostnames www.scd.ucar.edu to the IP address of web.ucar.edu so that your browser requests will go to web instead of the production server. This can be done in Unix by adding this line to /etc/hosts:
128.117.224.208 www.scd.ucar.edu
The test configuration is in the www.scd.ucar.edu virtual host, so the URL is then http://www.scd.ucar.edu/. This is configured in scd.conf to reference the certificates in /tools/admin/wegCAtest. The entire .conf file could be used for testing, but for certificates only the "internal" section has been modified.
The procedure is to create a new certificate directory (as indicated above). To test, create a symlink from wegCAtest to the new directory. The URL given in the previous paragraph can then be used to hit the "scdinternal" link in order to test the certificates before moving them into production (which is done simply by changing the production symlink of wegCA to point to the new directory).
Leonard Sitongia
2004-02-04