The BanditIdP web application requires that the application server uses SSL. Furthermore, Windows CardSpace requires that the InfoCards it uses are signed by the same certificate that the issuer's web site is using for SSL traffic.
In production, you would be buying a commercial EV SSL certificate signed with a root certificate already trusted by Internet Explorer and Windows CardSpace, from such CAs as Entrust (~$500/year), Thawte (~$900/year), or VeriSign (~$1500/year).
For development purposes, I set up my own CA for signing server certificates. I then signed a server certificate for an Apache Tomcat 5.5 installation, and imported the root certificate on my Windows system (so that Internet Explorer and Windows CardSpace would trust the server certificate I had signed).
The process I used was based on instructions from HOWTO: Creating your own CA with OpenSSL by Pheng Siong Ng and The Apache Tomcat 5.5 Servlet/JSP Container SSL Configuration HOW-TO.
demo.
demo
directory.
CA.pl to create a new certificate which will be
used as the "Trusted Root Certificate" for you new CA.
CA certificate filename (or enter to create) <enter> Making CA certificate ... Generating a 1024 bit RSA private key ..........................++++++ ....................++++++ writing new private key to './demoCA/private/cakey.pem' Enter PEM pass phrase: abracadabra Verifying - Enter PEM pass phrase: abracadabra ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:Virginia Locality Name (eg, city) []:Herndon Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company, Inc. Organizational Unit Name (eg, section) []:Development Division Common Name (eg, YOUR name) []:Development Root Certificate Email Address []:gene.gotimer@commandinformation.com Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []:<enter> An optional company name []:<enter> Using configuration from C:\OpenSSL\bin\openssl.cfg Enter pass phrase for ./demoCA/private/cakey.pem:abracadabra Check that the request matches the signature Signature ok Certificate Details: Serial Number: b4:1e:6b:6d:5f:d5:b5:62 Validity Not Before: Sep 17 19:13:04 2008 GMT Not After : Sep 17 19:13:04 2011 GMT Subject: countryName = US stateOrProvinceName = Virginia organizationName = My Company, Inc. organizationalUnitName = Development Division commonName = Development Root Certificate emailAddress = gene.gotimer@commandinformation.com X509v3 extensions: X509v3 Subject Key Identifier: 1A:CD:47:CE:D9:8A:84:02:50:87:F6:E0:07:6C:2C:12:26:3F:20:A1 X509v3 Authority Key Identifier: keyid:1A:CD:47:CE:D9:8A:84:02:50:87:F6:E0:07:6C:2C:12:26:3F:20:A1 DirName:/C=US/ST=Virginia/O=My Company, Inc./OU=Development Division/CN=Development Root Certificate/emailAddress=gene.gotimer@commandinformation.com serial:B4:1E:6B:6D:5F:D5:B5:62 X509v3 Basic Constraints: CA:TRUE Certificate is to be certified until Sep 17 19:13:04 2011 GMT (1095 days) Write out database with 1 new entries Data Base Updated
demoCA directory, and will create the CA's new
self-signed root certificate at demoCA/cacert.pem.
.cer so that Windows will
recognize it as a certificate file. Edit the copy to remove all the human-readable
text before the -----BEGIN CERTIFICATE----- line, so that
Java's keytool can import it.
-----BEGIN CERTIFICATE----- MIIECjCCA3OgAwIBAgIJALQea21f1bViMA0GCSqGSIb3DQEBBQUAMIG1MQswCQYD VQQGEwJVUzERMA8GA1UECBMIVmlyZ2luaWExGTAXBgNVBAoTEE15IENvbXBhbnks IEluYy4xHTAbBgNVBAsTFERldmVsb3BtZW50IERpdmlzaW9uMSUwIwYDVQQDExxE ZXZlbG9wbWVudCBSb290IENlcnRpZmljYXRlMTIwMAYJKoZIhvcNAQkBFiNnZW5l LmdvdGltZXJAY29tbWFuZGluZm9ybWF0aW9uLmNvbTAeFw0wODA5MTcxOTEzMDRa Fw0xMTA5MTcxOTEzMDRaMIG1MQswCQYDVQQGEwJVUzERMA8GA1UECBMIVmlyZ2lu aWExGTAXBgNVBAoTEE15IENvbXBhbnksIEluYy4xHTAbBgNVBAsTFERldmVsb3Bt ZW50IERpdmlzaW9uMSUwIwYDVQQDExxEZXZlbG9wbWVudCBSb290IENlcnRpZmlj YXRlMTIwMAYJKoZIhvcNAQkBFiNnZW5lLmdvdGltZXJAY29tbWFuZGluZm9ybWF0 aW9uLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1j8p9aLAnia+jAJa 8a3f809Q/vgvszOfDM763NAPhgsEYANBS8/07NI6YAFTzovQ/vWN4Zt3sJ0UA3ht qnmQk8Mc/5cpuqeK6RorirbnmBl2cGSw+GfcTX3pBuJNBcpngFSVkxFQHVx3Kqg5 5EbHWaqAB1G5IYSI2jWfzOqxvPkCAwEAAaOCAR4wggEaMB0GA1UdDgQWBBQazUfO 2YqEAlCH9uAHbCwSJj8goTCB6gYDVR0jBIHiMIHfgBQazUfO2YqEAlCH9uAHbCwS Jj8goaGBu6SBuDCBtTELMAkGA1UEBhMCVVMxETAPBgNVBAgTCFZpcmdpbmlhMRkw FwYDVQQKExBNeSBDb21wYW55LCBJbmMuMR0wGwYDVQQLExREZXZlbG9wbWVudCBE aXZpc2lvbjElMCMGA1UEAxMcRGV2ZWxvcG1lbnQgUm9vdCBDZXJ0aWZpY2F0ZTEy MDAGCSqGSIb3DQEJARYjZ2VuZS5nb3RpbWVyQGNvbW1hbmRpbmZvcm1hdGlvbi5j b22CCQC0HmttX9W1YjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAMEG cSVwOmHgvlq1vhXqsJIofA4Cy6UHFoQIDSQRzJxiy3MGwlajymLNm/bTYY0I0w1j RjQc86qwarduQCxBmqxfX7NwJsAkV5uyysQvZKynOAekC0TAeqezyIAalv/H3XWY cRV9JeyBGWMAsS03G6bLjLpCHnLv5XRU/QMVibC/ -----END CERTIFICATE-----
demo\demoCA\cacert.cer, press
PATH.
conf directory.
Enter keystore password: changeit Re-enter new password: changeit What is your first and last name? [Unknown]: laptop225.corp.cmdinfo.com What is the name of your organizational unit? [Unknown]: Development Division What is the name of your organization? [Unknown]: My Company, Inc. What is the name of your City or Locality? [Unknown]: Herndon What is the name of your State or Province? [Unknown]: Virginia What is the two-letter country code for this unit? [Unknown]: US Is CN=laptop225.corp.cmdinfo.com, OU=Development Division, O="My Company, Inc.", L=Herndon, ST=Virginia, C=US correct? [no]: yes Enter key password for <tomcat> (RETURN if same as keystore password): <enter>
Enter keystore password: changeit
certreq.csr. It could be sent to a commercial Certificate Authority, or
signed by the CA that you created earlier.
CA.pl utility can sign the CSR, but it expects the CSR to be named newreq.pem.
Copy the CSR into place and rename it before using the utility to sign the CSR.
Using configuration from C:\OpenSSL\bin\openssl.cfg Enter pass phrase for ./demoCA/private/cakey.pem: abracadabra Check that the request matches the signature Signature ok Certificate Details: Serial Number: b4:1e:6b:6d:5f:d5:b5:63 Validity Not Before: Sep 19 15:39:59 2008 GMT Not After : Sep 19 15:39:59 2009 GMT Subject: countryName = US stateOrProvinceName = Virginia localityName = Herndon organizationName = My Company, Inc. organizationalUnitName = Development Division commonName = laptop225.corp.cmdinfo.com X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: 9D:60:D6:4D:43:E0:CE:6B:48:5B:F3:2C:E4:25:D1:93:38:C5:B5:0B X509v3 Authority Key Identifier: keyid:1A:CD:47:CE:D9:8A:84:02:50:87:F6:E0:07:6C:2C:12:26:3F:20:A1 Certificate is to be certified until Sep 19 15:39:59 2009 GMT (365 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated Signed certificate is in newcert.pem
-----BEGIN CERTIFICATE----- line, so that
Java's keytool can import it.
-----BEGIN CERTIFICATE----- MIIDQTCCAqqgAwIBAgIJALQea21f1bVjMA0GCSqGSIb3DQEBBQUAMIG1MQswCQYD VQQGEwJVUzERMA8GA1UECBMIVmlyZ2luaWExGTAXBgNVBAoTEE15IENvbXBhbnks IEluYy4xHTAbBgNVBAsTFERldmVsb3BtZW50IERpdmlzaW9uMSUwIwYDVQQDExxE ZXZlbG9wbWVudCBSb290IENlcnRpZmljYXRlMTIwMAYJKoZIhvcNAQkBFiNnZW5l LmdvdGltZXJAY29tbWFuZGluZm9ybWF0aW9uLmNvbTAeFw0wODA5MTkxNTM5NTla Fw0wOTA5MTkxNTM5NTlaMIGRMQswCQYDVQQGEwJVUzERMA8GA1UECBMIVmlyZ2lu aWExEDAOBgNVBAcTB0hlcm5kb24xGTAXBgNVBAoTEE15IENvbXBhbnksIEluYy4x HTAbBgNVBAsTFERldmVsb3BtZW50IERpdmlzaW9uMSMwIQYDVQQDExpsYXB0b3Ay MjUuY29ycC5jbWRpbmZvLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA iXxVWnKZio5r7zZiCYoHDxWElMxCDSWMOiGL4rJYndPkPDekCDxSAZi2Hi9rxWWD mp4j0d7EquYun0H9TyaEAusDxOh4dYyarb9pMprLxdrHSH5GmhCPIlotZwwaldDV SO7kFBCb/PIsWUgiJFBI4iv4zf1kKdBSt9yDZXsAnlMCAwEAAaN7MHkwCQYDVR0T BAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNh dGUwHQYDVR0OBBYEFJ1g1k1D4M5rSFvzLOQl0ZM4xbULMB8GA1UdIwQYMBaAFBrN R87ZioQCUIf24AdsLBImPyChMA0GCSqGSIb3DQEBBQUAA4GBAH43a+NMOFKvlAE9 cLXzne9QzA9wa249g+UvpgRdUM2NsgK2AHHZqu1yV7K2sUGeJbmyZp0xXMH1d+kZ TNAFDppt9yNYa6l3vpmhw1jD5JerTBk14A6+6ig1oQZSHgDE396rYjFUQvg053tc pfDACIDHTrwCk5OefMwArfEkSBo/ -----END CERTIFICATE-----
Enter keystore password: changeit Owner: EMAILADDRESS=gene.gotimer@commandinformation.com, CN=Development Root Certificate, OU=Development Division, O="My Company, Inc.", ST=Virginia, C=US Issuer: EMAILADDRESS=gene.gotimer@commandinformation.com, CN=Development Root Certificate, OU=Development Division, O="My Company, Inc.", ST=Virginia, C=US Serial number: b41e6b6d5fd5b562 Valid from: Wed Sep 17 15:13:04 EDT 2008 until: Sat Sep 17 15:13:04 EDT 2011 Certificate fingerprints: MD5: 66:27:21:B3:E6:DC:88:CC:71:15:E7:AA:2F:D0:38:C2 SHA1: DD:1D:4E:A0:F8:40:14:22:EA:D0:DF:B8:22:E5:82:01:DC:E0:E2:5C Signature algorithm name: SHA1withRSA Version: 3 Extensions: #1: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 1A CD 47 CE D9 8A 84 02 50 87 F6 E0 07 6C 2C 12 ..G.....P....l,. 0010: 26 3F 20 A1 &? . ] ] #2: ObjectId: 2.5.29.19 Criticality=false BasicConstraints:[ CA:true PathLen:2147483647 ] #3: ObjectId: 2.5.29.35 Criticality=false AuthorityKeyIdentifier [ KeyIdentifier [ 0000: 1A CD 47 CE D9 8A 84 02 50 87 F6 E0 07 6C 2C 12 ..G.....P....l,. 0010: 26 3F 20 A1 &? . ] [EMAILADDRESS=gene.gotimer@commandinformation.com, CN=Development Root Certificate, OU=Development Division, O="My Company, Inc.", ST=Virginia, C=US] SerialNumber: [ b41e6b6d 5fd5b562] ] Trust this certificate? [no]: yes Certificate was added to keystore
Enter keystore password: changeit
Certificate reply was installed in keystore
server.xml
is shown below:
<!-- Define a SSL HTTP/1.1 Connector on port 443 -->
<Connector port="443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="conf/tomcat.keystore" keystorePass="changeit" keyAlias="tomcat" />