diff -urN ../ejbca_4_0_6/build.xml ./build.xml
--- ../ejbca_4_0_6/build.xml 2011-11-18 12:33:42.000000000 +0100
+++ ./build.xml 2011-12-25 12:00:48.000000000 +0100
@@ -25,6 +25,9 @@
+
+
+
@@ -170,23 +173,138 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
-
-
-
+
+
@@ -414,6 +533,7 @@
+
diff -urN ../ejbca_4_0_6/Changelog.txt ./Changelog.txt
--- ../ejbca_4_0_6/Changelog.txt 2011-11-18 12:33:42.000000000 +0100
+++ ./Changelog.txt 2011-12-25 12:00:48.000000000 +0100
@@ -1,10 +1,23 @@
-Ejbca 4.0.6, 2011-11-17
+EJBCA 4.0.7, 2011-12-25
---
+New Feature
+ [ECA-2410] - Document EJBCA Djigzo intregration
+ [ECA-2430] - Plugin build system
+ [ECA-2434] - Add CMP KeyUpdate stress test in clientToolBox
+
+Bug
+ [ECA-2197] - VA build fails sometimes
+ [ECA-2396] - More XSS issues
+ [ECA-2429] - Inconsistency in VA health-check properties comment and used URL
+ [ECA-2435] - Chinese charaters doesn't work in "Edit End Entity Profles" for DN attributes
+ [ECA-2436] - Reading OCSP messages over http1.1 with chunked encoding can fail
+ [ECA-2444] - CMP Revoke Response Message is unprotected sometimes
+EJBCA 4.0.6, 2011-11-17
+---
New Feature
[ECA-2368] - CMP, Implement message type KeyUpdateRequest
-
Bug
[ECA-2369] - NestedMessageContentTest does not clean up the test certificates it creates
[ECA-2380] - Minor XSS issue
@@ -12,7 +25,6 @@
EJBCA 4.0.5, 2011-11-02
---
-
New Feature
[ECA-2332] - Admin GUI ServletFilter for client certificate emulation
diff -urN ../ejbca_4_0_6/conf/plugin.properties.sample ./conf/plugin.properties.sample
--- ../ejbca_4_0_6/conf/plugin.properties.sample 2011-11-18 12:33:10.000000000 +0100
+++ ./conf/plugin.properties.sample 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-# plugin.properties
-#
-# if defined the EJBCA build will invoke the plugin ANT file with the following
-# properties defined:
-#
-# ejbca.total.plugin.classpath Holds a path to all .jar files
-
-# Mandatory: where the ANT file is
-plugin.ejbca.ant.file /home/demo/waterfall-publisher/waterfall-publisher/build.xml
-
-# Optional: where plugin's LIB (jar) distribution is
-plugin.ejbca.lib.dir /home/demo/waterfall-publisher/waterfall-publisher/dist
-
diff -urN ../ejbca_4_0_6/conf/plugins/plugin.properties.sample ./conf/plugins/plugin.properties.sample
--- ../ejbca_4_0_6/conf/plugins/plugin.properties.sample 1970-01-01 01:00:00.000000000 +0100
+++ ./conf/plugins/plugin.properties.sample 2011-12-25 11:59:46.000000000 +0100
@@ -0,0 +1,72 @@
+# plugin.properties
+#
+# In the EJBCA sub-directory "conf/plugins" you may place any number of files
+# ending with ".properties". Each of these files will be processed by the
+# standard EJBCA build ANT script and the result will be merged in the
+# "ejbca.ear" file.
+#
+# The purpose of this is to enable simple extensions of EJBCA which
+# typically would be RA web applications that hooks into the EJBCA "bean"
+# and utility libraries as well as in the AppServer. The plugin mechanism
+# also makes it easy to extend the EJBCA database schema without bothering
+# about JDBC drivers, login IDs etc.
+#
+# To get this to work there is a "contract" between the plugin and EJBCA
+# which must be honored by the plugin.
+#
+##############################################################################################
+#
+# EJBCA provides the following properties to the plugin's build script:
+#
+#
+# ejbca.classpath Holds a path to all EJBCA & AppServer .jar files
+#
+# ejbca.app.xml Holds the path to the EJBCA "application.xml" file
+#
+# ejbca.dbtype Holds the type of the EJBCA database (e.g. "mysql")
+# which can be used to create DB-specific ORM files
+# or exploiting DB-specific SQL extensions
+#
+# ejbca.hibernate Holds the hibernate dialect class matching dbtype
+# which can be used for creating "persistence.xml"
+#
+# ejbca.datasource Holds the JNDI datasource of the EJBCA database
+# (e.g. "java:/EjbcaDS") which can be used for creating
+# "persistence.xml"
+#
+# ejbca.gen.path Holds the path to a directory to which plugin binaries
+# must be written according to the following:
+# Module level .war and ejb .jar: $[ejbca.gen.path}
+# Library (utility) .jar : $[ejbca.gen.path}/lib
+#
+# ejbca.tmp.path Holds the path to a freshly created ("clean") temporary
+# directory which a plugin may use during its build process
+#
+# ejbca.home Holds the path to the EJBCA install directory which may be
+# used to access resources that are not available through the
+# other properties
+#
+##############################################################################################
+#
+# A plugin must through its property file in "conf/plugins" provide the following data:
+
+# Mandatory: Path to the ANT build file
+plugin.ejbca.ant.file /home/demo/myplugin/build.xml
+
+# Optional: ANT build "target"
+plugin.ejbca.ant.target every-feature-you-can-imagine
+
+# Optional: Custom properties starting with the prefix "plugin.ejbca.ant.custom."
+# which will be supplied "as is" to the ANT build
+plugin.ejbca.ant.custom.home.sweet.home http://127.0.0.1
+plugin.ejbca.ant.custom.want-warp-speed yes
+
+# Note: In case you want to configure plugins somewhere outside of the EJBCA source
+# tree you can do that by suppling the following definition to the ANT command-line:
+#
+# -Dejbca.plugin.conf.path=my_config_path
+
+#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#
+# Note: Improperly designed plugins can introduce security holes in EJBCA!!! #
+# Always review the existing code-base when you need access to internal CA resources. #
+#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#
diff -urN ../ejbca_4_0_6/conf/va.properties.sample ./conf/va.properties.sample
--- ../ejbca_4_0_6/conf/va.properties.sample 2011-11-18 12:33:10.000000000 +0100
+++ ./conf/va.properties.sample 2011-12-25 11:59:46.000000000 +0100
@@ -1,7 +1,7 @@
#------------------- Validation Authority (VA) Healthcheck settings -------------
# Specifies the basic settings of the VA healthcheck
# (i.e. health check servlet that is running on the VA).
-# for more detailed configuration edit the file src/publicweb/healthcheck/WEB-INF/web.xml
+# for more detailed configuration edit the file modules/healthcheck-war/resources/WEB-INF/web-ocsp.xml
#
# The url for the external OCSP healthcheck is:
# http://127.0.0.1:8080/ejbca/publicweb/vahealthcheck/vahealth
diff -urN ../ejbca_4_0_6/doc/RELEASE_NOTES ./doc/RELEASE_NOTES
--- ../ejbca_4_0_6/doc/RELEASE_NOTES 2011-11-18 12:33:18.000000000 +0100
+++ ./doc/RELEASE_NOTES 2011-12-25 12:00:02.000000000 +0100
@@ -1,3 +1,19 @@
+EJBCA 4.0.7
+-----------
+This is a maintenance release with a few bug fixes and a new feature. In all X issues have been resolved.
+
+* Noteworthy changes:
+- Fixed a bug reading large OCSP requests over HTTP 1.1 using chunked encoding.
+- Fixed a few minor XSS issues.
+- Fixed an issue where building the Validation Authority (VA) failed on specific platforms.
+- The VA health-check URL is now what it is claimed to be in the property file. You will need to reconfigure devices monitoring this URL.
+- Documented EJBCA integration with Djigzo
+- Added a plug-in build system.
+- Improved support for Chinese in the admin GUI.
+
+Read the full Changelog for details.
+For upgrade instructions, please see UPGRADE
+
EJBCA 4.0.6
-----------
This is a maintenance release with a few bug fixes and a new feature. In all 4 issues have been resolved.
diff -urN ../ejbca_4_0_6/doc/UPGRADE ./doc/UPGRADE
--- ../ejbca_4_0_6/doc/UPGRADE 2011-11-18 12:33:18.000000000 +0100
+++ ./doc/UPGRADE 2011-12-25 12:00:02.000000000 +0100
@@ -1,4 +1,4 @@
-$Id: UPGRADE 12033 2011-05-19 09:25:31Z anatom $
+$Id: UPGRADE 13473 2011-12-22 11:46:21Z anatom $
UPGRADE
=======
@@ -40,6 +40,9 @@
If you get a "java.lang.NoSuchMethodError" in the admin GUI it is because JBoss does not clean temporary files very good.
Delete the directories JBOSS_HOME/server/default/tmp and JBOSS_HOME/server/default/work and restart JBoss to get it working.
+NOTE: In 4.0.7 the healthcheck URL for the VA, was changed. See conf/va.properties.sample for details how to reconfigure
+your healthcheck URL.
+
EJBCA 4.0alpha1 NOTE
--------------------
There is no guarantee that there will be an upgrade path between the alpha release and EJBCA 4.0.0.
diff -urN ../ejbca_4_0_6/doc/xdocs/adminguide.xml ./doc/xdocs/adminguide.xml
--- ../ejbca_4_0_6/doc/xdocs/adminguide.xml 2011-11-18 12:33:18.000000000 +0100
+++ ./doc/xdocs/adminguide.xml 2011-12-25 11:59:54.000000000 +0100
@@ -945,7 +945,7 @@
This requests a certificate, defining the subject DN that will be used. The CA used to sign the certificate is specified in the EJBCA cmp configuration, and can be taken from the keyid.
EJBCA authenticated the request using the HMAC protection with the password, and accepts any request upon correct authentication. See the CMP documentation above for more advanced configuration.
@@ -965,7 +965,7 @@
This requests a certificate, and the requested subject DN must match the registered subject DN.
EJBCA authenticates the request using the HMAC protection with the password of the registered user. See the CMP documentation above for more advanced configuration.
@@ -4632,6 +4632,49 @@
+
+
In EJBCA there exists a health check service that can be used for health monitoring.
+It is also useful for cluster, as it can be checked by load balancers to determine if a node should be active in the cluster (healthy)
+or taken out of the cluster (unhealthy).
+
+The servlet is located in the URL: http://localhost:8080/ejbca/publicweb/healthcheck/ejbcahealth
+and is configured using conf/ejbca.properties.
+
+The following configuration parameters may be set to configure authorization and what the service checks:
+
+
+
healthcheck.amountfreemem, default: '1' - The number of Mb of memory that must be free.
+
healthcheck.dbquery, default: 'select 1' - Parameter indicating the string that should be used to do a minimal check that the database is working.
+
healthcheck.authorizedips, default: '127.0.0.1' - Specifies which remote IPs that may call this healthcheck servlet. Use ';' between multiple IPs.
+
healthcheck.catokensigntest; default: 'false' - if the check of CA tokens should actually perform a signature test on the CA token, or it should only see if the token status is active.
+
healthcheck.publisherconnections, default: 'false' - Defines if test connections agains all configured publisers should be performed.
+
+
By editing a maintenance file on the server, you can make the service return an error message stating that the server is down for mainenance.
+This is very useful in a cluster when you can take cluster nodes in and out of rotation by editing a simple text file.
+
+
+
healthcheck.maintenancefile, default: not set - location of file containing information about maintenance.
+
healthcheck.maintenancepropertyname, default: DOWN_FOR_MAINTENANCE - the healthcheck.maintenancefile should contain a single line like this 'DOWN_FOR_MAINTENANCE=true'.
+
+
The following parameters confiugure what message or HTTP error code the health service returns.
+
+
+
healthcheck.okmessage, default: 'ALLOK' - Text string used to say that every thing is ok with this node.
+
healthcheck.sendservererror, default: 'true' - if a HTTP errorcode 500 should be sent in case of error.
+
healthcheck.customerrormessage, default: null - Set this parameter if you want a static error message instead of one generated by the HealthChecker.
+
+
+If an error is detected one or several of the following error messages is reported.
+
+
+
"MEM: Error Virtual Memory is about to run out, currently free memory : number" - The JVM is about to run out of memory.
+
"DB: Error creating connection to database" - JDBC Connection to the database failed, this might occur if DB craches or network is down.
+
"CA: Error CA Token is disconnected: CAName" - This is a sign of hardware problems with one or several of the hard ca tokens in the node.
+
"MAINT: DOWN_FOR_MAINTENANCE" - This is reported when the healthcheck.maintenancefile is used and the node is set to be off line.
+
"Error when testing the connection with publisher: PublisherName" - This is reported when a test connection to one of the publishers failed.
+
+
+
All configuration options, JNDI names etc is configured through the use of properties files in conf/*.properties file.
@@ -4830,6 +4873,17 @@
+
+
+In case you (for example) want to extend the RA functionality considerably, possibly including additional
+database tables as well, you may consider using the EJBCA plugin scheme which provides custom
+applications with the core EJBCA environment data. In the directory src/samples/plugins you will find
+a couple of complete demo plugins that can be added to an existing EJBCA installation
+without any configuration. See the src/samples/plugins/README file for details.
+
+
Plugins are built and packaged together with the rest of the EJBCA components into the "ejbca.ear" file.
+
+
It is a demo servlet that will accept any incoming post, create a user with a unique username, and instantly
diff -urN ../ejbca_4_0_6/doc/xdocs/download.xml ./doc/xdocs/download.xml
--- ../ejbca_4_0_6/doc/xdocs/download.xml 2011-11-18 12:33:18.000000000 +0100
+++ ./doc/xdocs/download.xml 2011-12-25 12:00:02.000000000 +0100
@@ -10,10 +10,10 @@
If you have problems with any of the download links below, try to download through the Sourceforge download page.
- EJBCA 4.0.5 is now available for download.
+ EJBCA 4.0.7 is now available for download.
- SHA1 checksum: 92afce3655fec2c845f223a8c22ab07cf9ba2336
+ SHA1 checksum: 3ea3e5b71ef4ffe43f4977d761180a90c170a6fa
Cert-cvc library 1.2.13 with full RSA and ECC support is now available for download.
diff -urN ../ejbca_4_0_6/doc/xdocs/guides.xml ./doc/xdocs/guides.xml
--- ../ejbca_4_0_6/doc/xdocs/guides.xml 1970-01-01 01:00:00.000000000 +0100
+++ ./doc/xdocs/guides.xml 2011-12-25 12:00:02.000000000 +0100
@@ -0,0 +1,1537 @@
+
+
+
+
+ Howto
+
+
+
+
+
+ A number of other, mostly outdated, HOWTO documents are available in the doc/howto directory in the source distribution.
+
+
+
+
+
+ Usage of EJBCA for a complete PKI for CVC CAs are explained in this document.
+
+
+
+
+
+ This guide explains how to configure a Djigzo gateway to make the gateway request certificates from an external EJBCA server.
+ Djigzo Email Encryption Gateway is a standards based centrally managed email server (MTA) that encrypts and decrypts your incoming and outgoing email at the gateway level.
+
+
+ This is an extract from the complete guide, Djigzo EJBCA Setup Guide.
+
+
+ By using the Djigzo-EJBCA integration Djigzo can automatically request certificates from EJBCA for a transparent email encryption experience.
+
+ Setting up Djigzo to work with EJBCA contains of a few simple steps:
+
+
+
Djigzo communicates with EJBCA using the WebService interface. This means that Djigzo needs an administrator
+ certificate from EJBCA before is can connect to EJBCA.
+
+
+ Create a new administrator keystore for Djigzo in EJBCA.
+
+
+
Create a P12 keystore for administrator.
+
Add the administrator certificate to an administrator group in EJBCA with RA provileges, i.e. privileges to add/edit end entities.
+
+
+
+
+
Configure the EJBCA certificate request handler in conf/spring/certificate-request-handlers.xml.
Key Usage: Digital Signature and Key encipherment.
+
Extended Key Usage: Any Extended Key Usage or Email Protection (but not both).
+
+
Create an End Entity Profile with.
+
+
RFC 822 Name as Subject Alternative Name.
+
+
+
+
+
+ When the setup is done you can select the EJBCA Certificate Request Handler in the CA configuration of Djigzo.
+
+
+
+
+
+ PrimeKey has made a detailed guide how you set up and configure Windows and EJBCA for Windows SmartCard Logon.
+ The guide is divided in three section, introduction, Windows configuration and PKI configuration.
+ The reason for this division is that you can give the Windows guide to the windows administrator, who can easily
+ follow this guide on the Windows servers, while the PKI can be a hosted service or operated by another department.
+
This article is written for an older version of EJBCA. Now there is a command to import a PKCS#12 file, also in the Admin-GUI under "Edit Certificate Authorities->Import CA keystore".
+
The cli command to import a PKCS#12 file is now called bin/ejbca.sh ca importca ....
+ The cli command to import user certificates is now called bin/ejbca.sh ca importcert ....
+
This document describes how to migrate an RSA Keon CA using nCipher HSM to EJBCA.
+ The migration guide goes through migrating the CA signing keys, importing the CAs to EJBCA and importing
+ issued certificates to EJBCA. The result is a setup in EJBCA that can continue operation transparently.
+
+ Download EJBCA migration guide (pdf).
+
+
+
+
+
+
+
+You can enroll certificates for the iOS directly with EJBCA using SCEP. There is a SCEP profile in the iPhone that you can use for this.
+PrimeKey has created a detailed howto if you need this type of support. It works according to the same principals as the examples below.
+
The enrollment line tell how (the method, here an http url) to contact the PKI software. Note: you must omit the pkiclient.exe filename at the end which is automagically add by IOS.
+
The serial-number tells IOS to include the serial number in the request.
+
The name of the trustpoint you use MUST MATCH exactly the shortname of your CA in EJBCA (here FMSCA).
+
+ Once you have that, use the command:
+
+
+# crypto ca authenticate FMSCA
+
+
+ to fetch the CA certificate.
+
+
+ Then, login to EJBCA, and create a new entity profile that looks like:
+
+
+
+
+
+ Then, do the password enrollment with the command:
+
+
+# crypto ca enroll FMSCA
+
+
+ Check your ejbca logs, you shoud see something like:
+
+
+ERROR [PKCS10RequestMessage] No CN in DN: SN=12013150+unstructuredName=your.ciscobox.hosts.name
+ERROR [Log4jLogDevice] October 19, 2005 9:48:33 AM CEST, CAId : 0, CA, EVENT_ERROR_USERAUTHENTICATION, Administrator : \
+PUBLICWEBUSER, IP Address : 192.168.134.1, User : 12013150, Certificate : No Certificate Involved, Comment : \
+Got request for nonexisting user: 12013150
+
+
+ So, you know you must add an entity using the serial number as username, the password you define in IOS, and serialNumber/unstructuredNamed as subject DN fields.
+
+
+ After adding the end entity, do the password enrollment again. If you see this you have enrolled succesfully:
+
+
+saroumane#sh crypto ca cert
+Certificate
+ Status: Available
+ Certificate Serial Number: 426FA96340F5D2CA
+ Certificate Usage: General Purpose
+ Issuer:
+ c=FR
+ o=Fimasys
+ cn=Fimasys Security CA
+ Subject:
+ Name: your.ciscobox.hosts.name
+ Serial Number: 12013150
+ serialNumber=12013150
+ hostname=your.ciscobox.hosts.name
+ Validity Date:
+ start date: 08:58:28 CET Oct 19 2005
+ end date: 09:08:28 CET Oct 19 2007
+ Associated Trustpoints: FMSCA
+
+CA Certificate
+ Status: Available
+ Certificate Serial Number: 7AA2B9942CD0D362
+ Certificate Usage: Signature
+ Issuer:
+ c=FR
+ o=Fimasys
+ cn=Fimasys Security CA
+ Subject:
+ c=FR
+ o=Fimasys
+ cn=Fimasys Security CA
+ Validity Date:
+ start date: 07:29:35 CET Oct 17 2005
+ end date: 07:39:35 CET Oct 15 2015
+ Associated Trustpoints: FMSCA
+
+
+
+
+ There is a Cisco 7200 emulator called dynamips available
+ and a graphical front end GNS3.
+
+
Below is a short run through how to configure and enroll directly with EJBCA using GNS3 on Ubuntu 8.10.
+
+
+1. Create a tap interface
+ sudo tunctl -t tap0
+2. Remove ip addressing and set eth0 and tap0 to promiscuous mode
+ sudo ifconfig tap0 0.0.0.0 promisc up
+ sudo ifconfig eth0 0.0.0.0 promisc up
+3. Create a new bridge interface
+ sudo brctl addbr br0
+4. Add tap0 and eth0 to the bridge group
+ sudo brctl addif br0 tap0
+ sudo brctl addif br0 eth0
+5. Enable the bridge interface and give it an ip address
+ sudo ifconfig br0 up
+ sudo ifconfig br0 10.10.10.99/24
+6. Configure the default route
+ sudo route add default gw 10.10.10.254
+
+
Now start gns3.
+
+sudo gns3
+
+
Configure with IOS image, for example c7200-jk9s-mz.124-13b.bin (an image with crypto commands), it's available on the net.
+ Also configure a simple topology:
+
+
drag cloud to topology window
+
drag c7200 to topology window
+
configure cloud and add tap0 interface
+
add manual link from cloud to c7200
+
start c7200
+
open console on c7200
+
enter configuration and configure FastEthernet0/0 with ip 10.10.10.98/255.255.255.0
+
+ Now you should be able to ping the host computer, where EJBCA is running.
+ It is now time to do the actual enrollment as described above. Below are sample commands I have used.
+
+
+Router>enable
+Router#configure terminal
+Router(config)#
+Router(config)#crypto ca trustpoint ScepCA
+
+Router(ca-trustpoint)#enrollment url http://10.10.10.99:8080/ejbca/publicweb/apply/scep
+Router(ca-trustpoint)#serial-number
+Router(ca-trustpoint)#ip-address none
+Router(ca-trustpoint)#subject-name OU=Network Management, O=PrimeKey Solutions AB, C=SE
+Router(ca-trustpoint)#revocation-check none
+Router(ca-trustpoint)#exit
+
+Router(config)#crypto ca authenticate ScepCA
+Router(config)#crypto ca enroll ScepCA
+
+
+ You will see in the log what the username of the user you must create is called.
+ create end entity profile and user with DN containing SN=FFFFFF and unstructuredName=Router, as seen in the log file (FFFFFF and Router are the default values in the simulator).
+
+
+Router(config)#crypto ca enroll ScepCA
+Router(config)#exit
+Router#show crypto ca certificate
+
+
+You can always look at the defined trustpoints using the command:
+
+
+Router#show crypto ca trustpoints
+
+
+If you are enrolling towards an RA instead (see External RA documentation for information how to set up an external RA for SCEP) you issue the following commands:
+
+
+Router>enable
+Router#configure terminal
+Router(config)#
+Router(config)#crypto ca trustpoint ScepRA
+
+Router(ca-trustpoint)#enrollment url http://10.10.10.99:8080/scepraserver/scep
+Router(ca-trustpoint)#enrollment mode ra
+Router(ca-trustpoint)#serial-number
+Router(ca-trustpoint)#ip-address none
+Router(ca-trustpoint)#subject-name OU=Network Management, O=PrimeKey Solutions AB, C=SE
+Router(ca-trustpoint)#revocation-check none
+Router(ca-trustpoint)#exit
+
+Router(config)#crypto ca authenticate ScepRA
+Router(config)#crypto ca enroll ScepRA
+
+
+Note! This would only have a chance to work in EJBCA 3.8.1 and later, and actually it does not work due to the following
+error in Cisco. If you have any ideas, please contact us.
+
+
+Router#debug crypto pki API
+Router#debug crypto pki messages
+Router#debug crypto pki server
+Router#debug crypto pki transactions
+Router#debug crypto pki validation
+
+...
+
+*Jan 16 21:47:32.546: CRYPTO_PKI: make trustedCerts list for ScepRA
+*Jan 16 21:47:32.550: CRYPTO_PKI: subject="c=SE,o=Foo,cn=Scep RA" serial number= 3A 46 2F B4 5B AC 06 47
+
+*Jan 16 21:47:32.554: CRYPTO_PKI: subject="c=SE,o=EJBCA Sample,cn=ScepCA" serial number= 19 A6 7D 78 AF 9D 3B 27
+
+*Jan 16 21:47:32.566: E ../cert-c/source/p7digdat.c(377) : Error #703h
+*Jan 16 21:47:32.566: E ../cert-c/source/p7spprt.c(589) : Error #703h
+*Jan 16 21:47:32.582: pkcs7 verify data returned status 0x703
+*Jan 16 21:47:32.582: CRYPTO_PKI: status = 1795: failed to verify
+*Jan 16 21:47:32.582: %PKI-6-CERTFAIL: Certificate enrollment failed.
+*Jan 16 21:47:32.582: CRYPTO_PKI: All enrollment requests completed for trustpoint ScepRA.
+
+
+
+
+
+
+
+
+
Bruno Bonfils has written this excellent howto on using SSH with certificates from EJBCA:
EJBCA can issue certificates to be used when protecting sites using OpenSSO (Sun's Access Manager).
+ EJBCA will then be configured to publish issued certificates to the AM LDAP server.
+
+
The configuration is really simple and after installing EJBCA consists of only these steps:
+
+
Create a Publisher, AMPublisher with the following properties:
+
+
Publisher Type: LDAP V3 Search Publisher
+
Base DN: The Base DN in the AM LDAP, for example dc=company,dc=com
+
Login parameters to the AM LDAP server
+
Create Nonexisting Users: false
+
Modify Existing Users: true
+
Add multiple certificates per user: false
+
Remove certificates when revoked: true
+
Remove ldap user when certificate revoked: false
+
LDAP location fields from cert DN: CN, Common Name (not really used)
+
Suffix base DN of the LDAP Search: same as Base DN, for example dc=company,dc=com
+
LDAP filter of the search: uid=$USERNAME
+
+
+
Create a Certificate Profile, AMUser:
+
+
Use ENDUSER as template when creating the profile
+
Extended Key Usage: Client Authentication
+
Publishers: AMPublisher
+
+
+
Create an End Entity Profile, AMUser:
+
+
Subject DN Fields: UID, CN, O, C is sufficient
+
Default Certificate Profile: AMUser
+
Available Certificate Profiles: AMUser
+
+
+
+ The procedure when adding a new user is now simple:
+
+
Create a new user in AM
+
Create a new user in EJBCA with the same username and UID as the username in AM
+
Get the certificate for the user, for example with the user's browser on the public web pages of EJBCA
+
+ When the users certificate is created, the certificate is published to the AM LDAP server and certificate authentication can be configured and used in AM.
+
+
+
+
+ A really good article and description about EJBCA and OpenSSO is written by Bruno Bonfils.
+
+
This paper also describes easy integration between EJBCA and OpenSSO, where EJBCA is used for user provisioning.
+
+
+
+
+
+
+ This section will show you how to use an Apache Web Server Proxy in front of EJBCA.
+ The resulting server will
+
+
+
Display EJBCA public web at https://ca-server.company.local/
+
Redirect all HTTP-requests to HTTPS, except for OCSP and CRL.
+
Require a client SSL certificate when accessing https://ca-server.company.local/adminweb/
+
Be able to loadbalance requests
+
Still answer to requests on https://ca-server.company.local/ejbca/*
+
+
+ This example was created on Ubuntu 64-bit Server 7.10 using the Apache Web Server 2.2 package,
+ but should be easy to adapt to any system able to run Apache.
+
+
+ Start by installing EJBCA as normal. If you intend to have the CA on the same machine as
+ the proxy you should modify $EJBCA_HOME/conf/web.properties to only listen to localhost
+
+ Generate the SSL-certificate for Apache. This should be issued by the same CA that issued the Tomcat SSL
+ certificate (AdminCA1 in the default configuration). This can be done with the EJBCA CLI:
+
+
+ $ cd $EJBCA_HOME
+ $ bin/ejbca.sh ra adduser apache-ssl foo123 "CN=ca-server.company.local,O=EJBCA Sample,C=SE" "" AdminCA1 "" 1 PEM SERVER
+ $ bin/ejbca.sh ra setclearpwd apache-ssl foo123
+ $ bin/ejbca.sh batch
+ $ ls p12/pem/ca-server.company.local*
+ p12/pem/ca-server.company.local-CA.pem p12/pem/ca-server.company.local-Key.pem p12/pem/ca-server.company.local.pem
+
+
+ Configure the default virtual host-file /etc/apache2/sites-enabled/000-default
+
+
+ Note that this configuration with SSLVerifyClient inside a Location directtive is not safe with the newly (2009-11-15) discovered
+ vulnerability in SSL/TLS. You should only use SSLVerifyClient and SSLCipherSuite on whole virtualhosts. You can create the same effect
+ as below by using a separate subdomain for EJBCA administration (i.e. admin.ca.youdomain.com).
+ See for example the Debian advisory.
+
+
+NameVirtualHost *:80
+<VirtualHost *:80>
+ DocumentRoot /var/www/
+
+ # Proxy requests to EJBCA instances (only one on local machine configured)
+ <Proxy balancer://mycluster-kerb>
+ BalancerMember ajp://localhost:8009/ejbca/
+ </Proxy>
+ ProxyPass / balancer://mycluster-kerb/
+
+ RewriteEngine On
+ # Redirect all but the CRL Distribution Point, OCSP and Helthcheck to HTTPS
+ RewriteCond %{THE_REQUEST} !(/publicweb/webdist/certdist.*cmd=crl|/publicweb/status/)
+ RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
+ # Treat reqeusts to / and /ejbca/ as the same. Required by EJBCA's Admin Web.
+ RewriteCond %{THE_REQUEST} /ejbca/
+ RewriteRule ^/ejbca/(.*)$ /$1 [PT]
+
+ # Configure log
+ LogLevel warn
+ ErrorLog /var/log/apache2/error.log
+ CustomLog /var/log/apache2/access.log combined
+</VirtualHost>
+
+NameVirtualHost *:443
+<VirtualHost *:443>
+ DocumentRoot /var/www/
+
+ RewriteEngine On
+ # Treat reqeusts to / and /ejbca/ as the same. Required by EJBCA's Admin Web.
+ RewriteCond %{THE_REQUEST} /ejbca/
+ RewriteRule ^/ejbca/(.*)$ /$1 [PT]
+
+ # Configure secure SSL for this server using SSL certificate generated by EJBCA
+ SSLEngine on
+ SSLCipherSuite HIGH
+ SSLProtocol all -SSLv2
+ SSLCertificateFile /home/jboss/ejbca/p12/pem/ca-server.company.local.pem
+ SSLCertificateKeyFile /home/jboss/ejbca/p12/pem/ca-server.company.local-Key.pem
+
+ # Require Client SSL certificate for the Admin GUI
+ <Location /adminweb>
+ SSLVerifyClient require
+ SSLVerifyDepth 1
+ SSLCACertificateFile /home/jboss/ejbca/p12/pem/ca-server.company.local-CA.pem
+ </Location>
+
+ # Proxy requests to EJBCA instances (only one on local machine configured)
+ <Proxy balancer://mycluster-kerb>
+ BalancerMember ajp://localhost:8009/ejbca/
+ </Proxy>
+ ProxyPass / balancer://mycluster-kerb/
+
+ # Configure log
+ LogLevel warn
+ ErrorLog /var/log/apache2/error.log
+ CustomLog /var/log/apache2/access.log combined
+</VirtualHost>
+
+
+ Reload the apache configuration and verify that only port 80, 443 and other desired services
+ (e.g. a ssh-daemon) are listening on all or external interfaces
+
+ Even though this looks secure, it is still a good idea to use a firewall as an extra layer of security (e.g. drop malformed packages and
+ prevent future services from being exploited).
+
+
+
+
+ A sample configuration how to fix up nice URLs for OCSP so that you can point your OCSP service locator to http://ocsp.company.com/ instead of http://ocsp.company.com:8080/ejbca/publicweb/status/ocsp
+ (some info left out for brevity).
+
+
+<VirtualHost ocsp.company.com:80>
+ <Proxy *>
+ Order deny,allow
+ Allow from all
+ </Proxy>
+ ProxyPass / http://127.0.0.1:8080/ejbca/publicweb/status/ocsp
+ ProxyPassReverse / http://127.0.0.1:8080/ejbca/publicweb/status/ocsp
+</VirtualHost>
+
+
You can easily do the same for CRL distribution points.
+
+
+
+
+
+
+
+ Instead of using a proxy you can use mod_jk which uses a JK connector between apache and tomcat. I think this have some benefits.
+ You can easily combine it with mod_rewrite to have any type of external URLs, for OCSP, CRLs etc, and mapping them to other URLs in EJBCA.
+
+
+ This section will show you how to use an Apache with mod_jk in front of EJBCA.
+ The resulting server will
+
+
+
Display EJBCA public web at http://demo.primekey.se/
+
Require a client SSL certificate when accessing https://demo.primekey.se/, which works for the admin-GUI.
+
+ mod_jk have many features and by using it you can virtually do anything you want with hosts, ports and URLs.
+
+ This example was created on Ubuntu 64-bit Server 8.10 using the Apache Web Server 2.2 package,
+ but should be easy to adapt to any system able to run Apache.
+
+
+# sudo apt-get install apache2 libapache2-mod-jk
+# vim /etc/libapache2-mod-jk/workers.properties
+-----
+worker.list=jboss
+
+# Define a worker using ajp13
+worker.jboss.port=8009
+worker.jboss.host=127.0.0.1
+worker.jboss.type=ajp13
+-----
+
+
+# vim /etc/apache2/sites-available/demo.primekey.se
+-----
+<VirtualHost demo.primekey.se:80>
+ # We must disable default charset or everything will be ISO-8859-1,
+ AddDefaultCharset off
+ ServerAdmin webmaster@primekey.se
+ ServerName demo.primekey.se
+ ServerAlias demo.primekey.se
+
+ JkLogFile /var/log/apache2/mod_jk.log
+ JkLogLevel debug
+
+ JkMount /* jboss
+ JkMount / jboss
+</VirtualHost>
+
+<VirtualHost demo.primekey.se:443>>
+ # We must disable default charset or everything will be ISO-8859-1,
+ AddDefaultCharset off
+ ServerAdmin webmaster@primekey.se
+ ServerName demo.primekey.se
+ ServerAlias demo.primekey.se
+
+ SSLEngine on
+
+ JkLogFile /var/log/apache2/mod_jk.log
+ JkLogLevel debug
+
+ JkMount /* jboss
+ JkMount / jboss
+
+ # JkExtractSSL is On by default
+ # JkExtractSSL On
+</VirtualHost>
+-----
+
+Enable demo.primekey.se in /etc/apache2/sites-enabled
+
+
+# vim /etc/apache2/mods-available/ssl.conf
+-----
+SSLVerifyClient require
+SSLVerifyDepth 3
+
+SSLCACertificateFile /etc/apache2/ssl/apache-CA.pem
+SSLCertificateFile /etc/apache2/ssl/apache.pem
+
+SSLOptions +StdEnvVars +ExportCertData
+-----
+
+
+
+# vim /etc/apache2/mods-available/jk.load
+-----
+LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
+JkWorkersFile /etc/libapache2-mod-jk/workers.properties
+-----
+
+
+
+ Now enable ssl.load and ssl.conf in /etc/apache2/mods-enabled.
+
+
Finally restart apache and go to http://demo.primekey.se/ (or https). Same security considerations as for using proxy applies.
+
+ If you are using the external OCSP responder then you also got to ensure you got this line in the file apache2.conf:
+
KeepAlive Off
+ If not apache will hang.
+
+
+ Also an external OCSP responder it could be good to add these lines to the 'Virtual Host' configuration:
+
+ By doing this you don't have to bother about typing the last part of the URL. Just right server name will do.
+
+
+
+
+
+ This section will show you how to set up automatic certificate enroll of
+ machines and users in an Windows environment with EJBCA.
+
+ General idea
+
+
+
Use mod_auth_kerb on a Apache2 web server proxy to validate the requesters identity using Kerberos.
+
A login VBS-Script creates a certificate request that is sent to the proxy using IE-components.
+
A Servlet protected by the proxy receives the requests and creates a new cert.
+
The new certificate will use information from the request (UPN and CertificateTemplate) and read.
+
information from active directory (CN,DC etc).
+
Autoenrollment should be configurable in the Admin GUI.
+
+
+
+ Current status
+
+
+
Machine enroll on Domain Controller: WORKING
+
DomainController enroll on Domain Controller: WORKING
+
User enroll (Administrator) on Domain Controller: NOT WORKING (Does not trusts ca-server as Intranet, despite GP)
+
Machine enroll on other WS2K3 client: WORKING (not checked in a while)
+
User enroll (Administrator) on other WS2K3 client: NOT WORKING (Does not trusts ca-server as Intranet, despite GP, also complains about untrusted VBS if ran manually)
+
Machine enroll on WinXP client: WORKING
+
User enroll (Administrator) on WinXP client: WORKING
+
+
+ Known issues
+
+
+
SECURITY: The Servlet should verify that e.g. only Users can request User certificates, DCs only DC certs etc.. and other permissions if possible.
+
The enroll scripts always fetches new certificates. They should use the command=status first to see if a new cert is needed.
+
AdminWeb cannot verify admin certificates if non-"/ejbca/" path is used in URL.
+
Autoenroll Servlet doesn't get X-Remote-User if "/ejbca/" path is used in URL.
+
Order of Subject DNs is wrong compared with MS certs..
+
SSL connection to AD has not been tested.
+
Certificates don't have the CertificateTemplate attrib yet.. looks nicer in Certificate MMC snapin..
+
JavaScript "onchange" behaves strangely in IE6. Only activated when the table is clicked, not the checkbox..
+
Creation of EEPs is inefficient due to attempted removal of EEP before each new request.. (Debug-code)
+
+
+ ...
+
+
+
+
+ Domain Controller: dc1.company.local
+
+
+
Windows Server 2003 EE patched to SP2
+
Active Directory
+
DNS Server
+
+
+ CA Server: ca-server.company.local
+
+
+
Ubuntu 64 Server 7.10
+
Apache2 with modules
+
Kerberos 5
+
Java 1.6u4
+
JBoss 4.2.2.GA
+
EJBCA 3.6 Alpha
+
Apache Ant 1.7.0
+
+
+ Desktop client: client-01.company.local
+
+
+
Windows XP Pro SP1 patched to SP2
+
+
+
+
+ Configure EJBCA not to respond to external web-requests by editing $EJBCA_HOME/conf/web.properties
+
+ and restart networking (sudo /etc/init.d/networking restart).
+
+
+ Add "ntdpdate dc1.company.local" to /etc/rc.local or a cron job to make sure the
+ ca-server is syncronized with the Domain Controller.
+
+
+ Create the SSL certificates for the Apache proxy using the same CA as our EJBCA installation and the same subject DN.
+
+
+$cd $EJBCA_HOME
+$bin/ejbca.sh ra adduser apache-ssl foo123 "CN=ca-server.company.local,O=EJBCA Sample,C=SE" "" AdminCA1 "" 1 PEM SERVER
+$bin/ejbca.sh ra setclearpwd apache-ssl foo123
+$bin/ejbca.sh batch
+$ls p12/pem/ca-server.company.local*
+p12/pem/ca-server.company.local-CA.pem p12/pem/ca-server.company.local-Key.pem p12/pem/ca-server.company.local.pem
+
+
+ Edit /etc/apache2/sites-enabled/000-default to display an apache proxy front for EJBCA
+
+
+NameVirtualHost *:80
+<VirtualHost *:80>
+ DocumentRoot /var/www/
+
+ # Proxy requests to EJBCA instances (only one on local machine configured)
+ <Proxy balancer://mycluster-kerb>
+ BalancerMember ajp://localhost:8009/ejbca/
+ </Proxy>
+ ProxyPass / balancer://mycluster-kerb/
+
+ RewriteEngine On
+ # Redirect all but the CRL Distribution Point, OCSP and Helthcheck to HTTPS
+ RewriteCond %{THE_REQUEST} !(/publicweb/webdist/certdist.*cmd=crl|/publicweb/status/)
+ RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
+ # Treat reqeusts to / and /ejbca/ as the same. Required by EJBCA's Admin Web.
+ RewriteCond %{THE_REQUEST} /ejbca/
+ RewriteRule ^/ejbca/(.*)$ /$1 [PT]
+
+ # Configure log
+ LogLevel warn
+ ErrorLog /var/log/apache2/error.log
+ CustomLog /var/log/apache2/access.log combined
+</VirtualHost>
+
+NameVirtualHost *:443
+<VirtualHost *:443>
+ DocumentRoot /var/www/
+
+ RewriteEngine On
+ # Treat reqeusts to / and /ejbca/ as the same. Required by EJBCA's Admin Web.
+ RewriteCond %{THE_REQUEST} /ejbca/
+ RewriteRule ^/ejbca/(.*)$ /$1 [PT]
+
+ # Configure secure SSL for this server using SSL certificate generated by EJBCA
+ SSLEngine on
+ SSLCipherSuite HIGH
+ SSLProtocol all -SSLv2
+ SSLCertificateFile /home/jboss/ejbca/p12/pem/ca-server.company.local.pem
+ SSLCertificateKeyFile /home/jboss/ejbca/p12/pem/ca-server.company.local-Key.pem
+
+ # Require Client SSL certificate for the Admin GUI
+ <Location /adminweb>
+ SSLVerifyClient require
+ SSLVerifyDepth 1
+ SSLCACertificateFile /home/jboss/ejbca/p12/pem/ca-server.company.local-CA.pem
+ </Location>
+
+ # Require Kerberos authentication for the Autoenroll Servlet
+ <Location /autoenroll>
+ AuthType Kerberos
+ Krb5Keytab /etc/apache2/http.keytab
+ KrbAuthRealms COMPANY.LOCAL
+ KrbServiceName HTTP
+ KrbMethodNegotiate on
+ KrbMethodK5Passwd off
+ Require valid-user
+ </Location>
+
+ # Forward the UPN as variable X-Remote-User
+ RewriteCond %{IS_SUBREQ} ^false$
+ RewriteCond %{LA-U:REMOTE_USER} (.+)
+ RewriteRule .* - [E=RU:%1]
+ RequestHeader set X-Remote-User %{RU}e
+
+ # Proxy requests to EJBCA instances (only one on local machine configured)
+ <Proxy balancer://mycluster-kerb>
+ BalancerMember ajp://localhost:8009/ejbca/
+ </Proxy>
+ ProxyPass / balancer://mycluster-kerb/
+
+ # Configure log
+ LogLevel warn
+ ErrorLog /var/log/apache2/error.log
+ CustomLog /var/log/apache2/access.log combined
+</VirtualHost>
+
+
+ Restart apache with "sudo /etc/init.d/apache2 restart"
+
+
+ Install Windows support tools on the Domain Controller (found in %WIN2k3CD%\SUPPORT\TOOLS\SUPTOOLS.msi) to get ktpass.exe.
+ Create a new user "ca-server@company.local" and a strong password e.g not FooBar123 used here.
+ Create a keytab-file "http.keytab" on the Domain Controller:
+
+ And move the file to ca-server.company.local:/etc/apache2/http.keytab change permissions to be
+ readable only by the apache-process.
+
+
+$chown root:root /etc/apace2/http.keytab
+
+
+ Verify that the keytab is correct:
+
+
+$kinit Administrator
+$kvno HTTP/ca-server.company.local
+$klist -e
+** Output here should match the one from ktpass.exe **
+
+
+ Verify that the keytab can be used:
+
+
+$kdestroy
+$sudo kinit -k -t /etc/apache2/http.keytab HTTP/ca-server.company.local
+$sudo klist
+(You should have received a ticket here if everything is working.)
+$sudo kdestroy
+
+
+ Add ca-server.company.local (192.168.1.2) to your Domain Controllers DNS server as a "Host (A)" record.
+
+
+
+
+ Create a Shared directory on the Domain Controller, C:\Shared with read and exec rights by Everyone
+
+
+copy %SYSTEMROOT%\system32\certreq.exe C:\Shared\Autoenroll\
+copy %SYSTEMROOT%\system32\certcli.dll C:\Shared\Autoenroll\
+copy %SYSTEMROOT%\system32\certadm.dll C:\Shared\Autoenroll\
+(copy %SYSTEMROOT%\system32\certutil.exe C:\Shared\Autoenroll\ This is used by EnrollDomainController and is already available at all DCs.)
+
+
+ Edit or create C:\Shared\Autoenroll\autoenroll.conf
+
+
+# This is a primitive config file that does not allow spaces
+
+# The request URL is built from the following properties
+# https://[requestpath]?request=...
+#
+
+# Standard SSL-port and using URL rewrite from /ejbca/* to /*
+requestpath=ca-server.company.local/autoenroll
+
+# Non-standard SSL-port and not using URL rewrite
+#requestpath=ca-server.company.local:4443/ejbca/autoenroll
+
+# Debug setting, use only for manual testing
+#debug=true
+debug=false
+
+
+ Edit or create C:\Shared\Autoenroll\RequestAndInstall.vbs
+
+
+ Set oArgs = WScript.Arguments
+ if oArgs.Count < 1 then
+ WScript.Echo "Usage: thisscript.vbs fullpathnameofrequest.inf"
+ WScript.Quit 1
+ else
+ sRequestInfo = Trim(oArgs(0))
+ end if
+
+ Set WS = CreateObject("WScript.Shell")
+
+ sRequest = WS.ExpandEnvironmentStrings("%TEMP%") & "\autoenrolled.req"
+ sResult = WS.ExpandEnvironmentStrings("%TEMP%") & "\autoenrolled.p7b"
+
+ Set oFilesystem = CreateObject("Scripting.FileSystemObject")
+ On Error Resume Next ' Ignore if we try to delete a file that does not exist
+ oFilesystem.DeleteFile(sRequest)
+ Err.Clear
+ On Error GoTo 0
+ sSharedDir = oFilesystem.GetParentFolderName(WScript.ScriptFullName) & "\"
+
+ Set iFile = oFilesystem.OpenTextFile(sSharedDir & "autoenroll.conf")
+ Do While iFile.AtEndOfStream <> True
+ sLine = iFile.Readline
+ If InStr(Left(sLine,1), "#") = 0 then
+ If InStr(sLine, "requestpath=") <> 0 then
+ sRequestPath = Trim(Right(sLine, Len(sLine)-Len("requestpath=")))
+ end if
+ If InStr(sLine, "debug=") <> 0 then
+ sDebug = Trim(Right(sLine, Len(sLine)-Len("debug=")))
+ end if
+ End if
+ Loop
+ iFile.Close
+
+ WS.Run sSharedDir & "certreq.exe -f -new " & sRequestInfo & " " & sRequest, 0, True
+
+ sRequestData = ""
+ Set objFile = oFilesystem.OpenTextFile(sRequest, 1)
+ Do Until objFile.AtEndOfStream
+ sRequestData = sRequestData & objFile.ReadLine
+ Loop
+ objFile.Close
+
+ set oIE = CreateObject("InternetExplorer.Application")
+
+ oIE.navigate2("https://" & sRequestPath & "?debug=" & sDebug & "&request=" & sRequestData)
+
+ If sDebug = "true" Then
+ oIE.visible = true
+ End If
+
+ 'Wait max 30 seconds
+ wscript.sleep 1000
+ counter = 0
+ While oIE.Busy = true And counter < 30
+ counter = counter + 1
+ wscript.sleep 1000
+ Wend
+
+ sResultData = oIE.Document.Body.innerHTML
+ sResultData = Mid(sResultData, 6, Len(sResultData)-11)
+
+ Set oFile = oFilesystem.CreateTextFile(sResult, True)
+ oFile.WriteLine sResultData
+ oFile.Close
+
+ on error resume next ' in case the Task Manager is used to close IE.
+ If sDebug <> "true" Then
+ oIE.quit ' Close the window
+ WS.Run sSharedDir & "certreq.exe -accept " & Chr(34) & sResult & Chr(34), 0, True
+ End If
+
+
+ Edit or create C:\Shared\Autoenroll\EnrollDomainController.vbs
+
+
+ ' This Script is based on the script found at http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/advcert.mspx#EURAE
+
+ iRole = GetLastDomainRole()
+ If iRole <> 4 And iRole <> 5 Then
+ WScript.Echo "This script should only run on a Domain Controller."
+ WScript.Quit 1
+ End If
+
+ Set WS = CreateObject("WScript.Shell")
+
+ Set objDC = GetObject("LDAP://" & CreateObject("ADSystemInfo").ComputerName)
+ sGUID = objDC.GUID
+ sDNShostname = objDC.DNShostname
+
+ Set oFilesystem = CreateObject("Scripting.FileSystemObject")
+ sTempfilePrefix = WS.ExpandEnvironmentStrings("%TEMP%") & "\autoenrolled"
+ sRequestInfo = sTempFilePrefix & ".inf"
+ sSharedDir = oFilesystem.GetParentFolderName(WScript.ScriptFullName) & "\"
+
+ 'Create b64 encoded extension
+ Dim aASNsubstring(2, 5)
+ Const HEX_DATA_LENGTH = 1
+ Const ASCIIDATA = 2
+ Const HEXDATA = 3
+ Const HEX_BLOB_LENGTH = 4
+ Const HEX_TYPE = 5
+ ' Encode DNS
+ aASNsubstring(0, ASCIIDATA) = sDNShostname
+ aASNsubstring(0, HEX_TYPE) = "82"
+ For i = 1 to Len(aASNsubstring(0, ASCIIDATA))
+ aASNsubstring(0, HEXDATA) = aASNsubstring(0, HEXDATA) & Hex(Asc(Mid(aASNsubstring(0, ASCIIDATA), i, 1)))
+ Next
+ aASNsubstring(0, HEX_DATA_LENGTH) = ComputeASN1 (Len(aASNsubstring(0, HEXDATA)) / 2)
+ sASN = aASNsubstring(0, HEX_TYPE) & aASNsubstring(0, HEX_DATA_LENGTH) & aASNsubstring(0, HEXDATA)
+ ' Encode GUID
+ aASNsubstring(1, HEXDATA) = sGUID
+ aASNsubstring(1, HEX_TYPE) = "A0"
+ aASNsubstring(1, HEX_DATA_LENGTH) = ComputeASN1 (Len(aASNsubstring(1, HEXDATA)) / 2)
+ sASN = sASN & "A01F06092B0601040182371901" & aASNsubstring(1, HEX_TYPE) & "120410" & aASNsubstring(1, HEXDATA)
+
+ Set oFile = oFilesystem.CreateTextFile(sTempfilePrefix & ".asn")
+ oFile.WriteLine "30" & ComputeASN1 (Len(sASN) / 2) & sASN
+ oFile.Close
+ WS.Run "certutil -f -decodehex " & sTempfilePrefix & ".asn " & sTempfilePrefix & ".bin", 0, True
+ WS.Run "certutil -f -encode " & sTempfilePrefix & ".bin " & sTempfilePrefix & ".b64", 0, True
+
+ Set iFile = oFilesystem.OpenTextFile(sTempfilePrefix & ".b64")
+ Set oFile = oFilesystem.CreateTextFile(sRequestInfo, True)
+ oFile.WriteLine "[Version]"
+ oFile.WriteLine "Signature= " & Chr(34) & "$Windows NT$" & Chr(34)
+ oFile.WriteLine ""
+ oFile.WriteLine "[NewRequest]"
+ oFile.WriteLine "Subject = " & Chr(34) & "CN=IgnoredValue" & Chr(34)
+ oFile.WriteLine "KeySpec = 1"
+ oFile.WriteLine "KeyLength = 2048"
+ oFile.WriteLine "Exportable = TRUE"
+ oFile.WriteLine "MachineKeySet = TRUE"
+ oFile.WriteLine "SMIME = FALSE"
+ oFile.WriteLine "PrivateKeyArchive = FALSE"
+ oFile.WriteLine "UserProtected = FALSE"
+ oFile.WriteLine "UseExistingKeySet = FALSE"
+ oFile.WriteLine "ProviderName = " & Chr(34) & "Microsoft RSA SChannel Cryptographic Provider" & Chr(34)
+ oFile.WriteLine "ProviderType = 12"
+ oFile.WriteLine "RequestType = PKCS10"
+ oFile.WriteLine "KeyUsage = 0xa0"
+ oFile.WriteLine ""
+ oFile.WriteLine "[EnhancedKeyUsageExtension]"
+ oFile.WriteLine "OID=1.3.6.1.5.5.7.3.1"
+ oFile.WriteLine "OID=1.3.6.1.5.5.7.3.2"
+ oFile.WriteLine ""
+ oFile.WriteLine "[Extensions]"
+ iLine = 0
+ Do While iFile.AtEndOfStream <> True
+ sLine = iFile.Readline
+ If sLine = "-----END CERTIFICATE-----" then
+ Exit Do
+ end if
+ if sLine <> "-----BEGIN CERTIFICATE-----" then
+ if iLine = 0 then
+ oFile.WriteLine "2.5.29.17=" & sLine
+ else
+ oFile.WriteLine "_continue_=" & sLine
+ end if
+ iLine = iLine + 1
+ end if
+ Loop
+ oFile.WriteLine "Critical=2.5.29.17"
+ oFile.WriteLine ""
+ oFile.WriteLine "[RequestAttributes]"
+ oFile.WriteLine "CertificateTemplate = DomainController"
+ oFile.Close
+ iFile.Close
+
+ WS.Run sSharedDir & "RequestAndInstall.vbs " & sRequestInfo, 0, True
+
+ ' Sub
+ Function ComputeASN1 (iStrLen)
+ If Len(Hex(iStrLen)) Mod 2 = 0 then
+ sLength = Hex(iStrLen)
+ else
+ sLength = "0" & Hex(iStrLen)
+ end if
+ if iStrLen > 127 then
+ ComputeASN1 = Hex (128 + (Len(sLength) / 2)) & sLength
+ else
+ ComputeASN1 = sLength
+ End If
+ End Function
+
+ 'Return the domain role number where:
+ '-1 Error
+ '0 Standalone Workstation
+ '1 Member Workstation
+ '2 Standalone Server
+ '3 Member Server
+ '4 Backup Domain Controller
+ '5 Primary Domain Controller
+ Function GetLastDomainRole ()
+ On Error Resume Next
+ strComputer = "."
+ Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
+ Set colItems = objWMIService.ExecQuery("Select DomainRole from Win32_ComputerSystem",,48)
+ For Each objItem in colItems
+ iReturn = objItem.DomainRole
+ Next
+ On Error Goto 0
+ GetLastDomainRole = iReturn
+ End Function
+
+
+ Edit or create C:\Shared\Autoenroll\EnrollMachine.vbs
+
+ Verify that all the file in Shared\Autoenroll directory has read end exec right for Everyone.
+
+ Install Certificate Templates by adding the corresponding Snap-in i the MMC console.
+
+ Install the root CA-certificate(s) in the NTAuthStore, so windows can verify all cerificates produced by EJBCA.
+ Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
+ Edit Default Domain Policy -> Computer Configuration -> Windows Settings -> Security Settings -> Public Key Policies ->
+ Trusted Root Certificate Authorities -> Import -> import the root ca certificate and run "gpupdate /force" on
+ machines that are used for testing.
+ (You can fetch the CA certificate using the EJCBA CLI with "$EJBCA_HOME/bin/ejbca.sh ca getrootcert AdminCA1 ~/AdminCA1.crt -der".)
+
+ Add Startup Scripts in
+ Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
+ Edit Default Domain Policy -> Computer Configuration -> Windows Settings -> Scripts -> Startup ->
+ Add the machine-related scripts from the shared directory.
+
+ Add Login Scripts in
+ Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
+ Edit Default Domain Policy -> User Configuration -> Windows Settings -> Scripts -> Logon ->
+ Add the user-related scripts from the shared directory.
+
+ Add the ca-server and shared directory to the Intranet
+ Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
+ Edit Default Domain Policy -> Computer Configuration | User Configuration (do both!!) -> Administrative Templates ->
+ Windows Components -> Internet Explorer -> Internet Control Page -> Security Page ->
+ Site to Zone assignement list -> Enabled and added "https://ca-server.company.local" to zone "1", "\\Dc1\Shared" to zone "1"
+
+ Configure clients to synchronize time using NTP:
+ Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
+ Edit Default Domain Policy -> Computer Configuration -> Administrative Templates ->
+ System -> Windows Time Service -> Time Providers -> Configure Windows NTP Client (Add "dc1.company.local" as an NTP server.)
+ and Enable Windows NTP Client.
+
+ Use "gpupdate /force" on clients before running tests or wait 8h.. =)
+
+
+
+
+ Well, good luck with Windows error messages.. but you can enable debug
+ ("debug=true" in autoenroll.conf) to see the response from the Servlet.
+
+ Test the machine-cert-retreival script by starting a Console as "LocalSystem". C:\Shared\Autoenroll\ConsoleAsLocalSystem.vbs:
+
+ Adding a custom Administrative template can be done as in this example if needed:
+ Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
+ Edit Default Domain Policy -> Computer Configuration -> Administrative Templates -> Add/Remove Templates -> Add Autoenroll.adm
+
+
+ This is just a sample, but shows how a custom GP can be configured.. (Use the intructions above instead of this template.
+ The example Administrative Template "Autoenroll Related" can be used to force ca-server.company.local
+ into the Intranet zone or add a NTP syncronizing policy. C:\Shared\Autoenroll\Autoenroll.adm:
+
+
+CLASS MACHINE
+
+CATEGORY "Autoenroll Related"
+ CATEGORY "NTP Synch for clients with AD"
+ POLICY "Enable NTP synch"
+ SUPPORTED "This is a hack to get WinXP clients working"
+ EXPLAIN ".."
+ KEYNAME "Software\Policies\Microsoft\W32Time\TimeProviders"
+ VALUENAME "NtpServer"
+ VALUEON NUMERIC 1
+ VALUEOFF NUMERIC 0
+
+ ACTIONLISTON
+ KEYNAME "Software\Policies\Microsoft\W32Time\Parameters"
+ VALUENAME "Type"
+ VALUE "NTP"
+
+ KEYNAME "Software\Policies\Microsoft\W32Time\Config"
+ VALUENAME "AnnounceFlags"
+ VALUE NUMERIC 5
+
+ KEYNAME "Software\Policies\Microsoft\W32Time\Config"
+ VALUENAME "MaxPosPhaseCorrection"
+ VALUE NUMERIC 1099511627775
+
+ KEYNAME "Software\Policies\Microsoft\W32Time\Config"
+ VALUENAME "MaxNegPhaseCorrection"
+ VALUE NUMERIC 1099511627775
+ END ACTIONLISTON
+
+ PART "NTP Servers in the form ntp.server1.com,0x1 ntp.server2.com,0x1 ntp.server3.com,0x1" EDITTEXT
+ KEYNAME "Software\Policies\Microsoft\W32Time\Parameters"
+ VALUENAME "NtpServer"
+ MAXLEN 4096
+ END PART
+
+ PART "Poll interval in seconds" NUMERIC
+ KEYNAME "Software\Policies\Microsoft\W32Time\TimeProviders\NtpClient"
+ VALUENAME "SpecialPollInterval"
+ DEFAULT 900
+ END PART
+ END POLICY
+ END CATEGORY
+
+ CATEGORY "Required trust"
+ POLICY "Trust ca-server.company.local"
+ SUPPORTED "Might need IE6 for this to work.."
+ EXPLAIN "This adds the ca-server.company.local to the list of intranet-sites.."
+ KEYNAME "Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\company.local\ca-server"
+ VALUENAME "https"
+ VALUEON NUMERIC 1
+ VALUEOFF NUMERIC 0
+ END POLICY
+ END CATEGORY
+END CATEGORY
+
+CLASS USER
+
+CATEGORY "Autoenroll Related"
+ CATEGORY "Required trust"
+ POLICY "Trust ca-server.company.local"
+ SUPPORTED "Might need IE6 for this to work.."
+ EXPLAIN "This adds the ca-server.company.local to the list of intranet-sites.."
+ KEYNAME "Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\company.local\ca-server"
+ VALUENAME "https"
+ VALUEON NUMERIC 1
+ VALUEOFF NUMERIC 0
+ END POLICY
+ END CATEGORY
+END CATEGORY
+
+
+ Useful reg-for VMwares with runaway clocks if GP mod didn't work or you just want to modify a single client.
+
+ This is a very thorough guide with screen-shots of how to setup EJBCA 3.6.0
+ with GemSAFE Toolbox in a windows environment for smartcard logon, email signing,
+ email encryption and SSL services.
+
+ This Java program provides a simple UI for creating and querying end entities.
+ All communications with the appserver are via EJBCA web services.
+
+
+ It includes wizard dialogs that prompt the user for the type of certificate to create, that prompt the user to enter values that define the subject DN,
+ that allow the user to receive an email notification containing the password for the new end entity,
+ that allow the user to choose between adding the new end entity to the EJBCA database and actually generating the certificate (as a P12 or JKS file).
+
+
+ Further information on this application can be found in the project's README.txt (building and running the application),
+ its troubleshooting.txt (further tips on running the application), and todo.txt (notes and issues for developers).
+
+
+ A short movie demonstrating the program may be downloaded from
+ SourceForge
+ or
+ YouTube.
+
+
+
+
+
+
+ This excellent HOWTO on PKI in general, LDAP, email and server setup has been kindly contributed by SensorNet. Please read this notice!
+
+
+These pages were created by the SensorNet Project at Oak Ridge National
+Laboratory (ORNL), Oak Ridge, Tennessee, USA to provide help for their
+instance of EJBCA. You are welcome to modify these pages for your own
+use, but please remove any links to the SensorNetCA web pages so that we
+do not get excess traffic. Please tell your users not to use the URLs in
+the screen shots, and please credit Oak Ridge National Laboratory. ORNL
+is operated by UT-Battelle for the U.S. Department Of Energy.
+
+
- A number of other, mostly outdated, HOWTO documents are available in the doc/howto directory in the source distribution.
-
-
-
-
-
- Usage of EJBCA for a complete PKI for CVC CAs are explained in this document.
-
-
-
-
-
- This excellent HOWTO on PKI in general, LDAP, email and server setup has been kindly contributed by SensorNet. Please read this notice!
-
-
-These pages were created by the SensorNet Project at Oak Ridge National
-Laboratory (ORNL), Oak Ridge, Tennessee, USA to provide help for their
-instance of EJBCA. You are welcome to modify these pages for your own
-use, but please remove any links to the SensorNetCA web pages so that we
-do not get excess traffic. Please tell your users not to use the URLs in
-the screen shots, and please credit Oak Ridge National Laboratory. ORNL
-is operated by UT-Battelle for the U.S. Department Of Energy.
-
-
- PrimeKey has made a detailed guide how you set up and configure Windows and EJBCA for Windows SmartCard Logon.
- The guide is divided in three section, introduction, Windows configuration and PKI configuration.
- The reason for this division is that you can give the Windows guide to the windows administrator, who can easily
- follow this guide on the Windows servers, while the PKI can be a hosted service or operated by another department.
-
This article is written for an older version of EJBCA. Now there is a command to import a PKCS#12 file, also in the Admin-GUI under "Edit Certificate Authorities->Import CA keystore".
-
The cli command to import a PKCS#12 file is now called bin/ejbca.sh ca importca ....
- The cli command to import user certificates is now called bin/ejbca.sh ca importcert ....
-
This document describes how to migrate an RSA Keon CA using nCipher HSM to EJBCA.
- The migration guide goes through migrating the CA signing keys, importing the CAs to EJBCA and importing
- issued certificates to EJBCA. The result is a setup in EJBCA that can continue operation transparently.
-
- Download EJBCA migration guide (pdf).
-
-
-
-
-
-
-
-You can enroll certificates for the iOS directly with EJBCA using SCEP. There is a SCEP profile in the iPhone that you can use for this.
-PrimeKey has created a detailed howto if you need this type of support. It works according to the same principals as the examples below.
-
The enrollment line tell how (the method, here an http url) to contact the PKI software. Note: you must omit the pkiclient.exe filename at the end which is automagically add by IOS.
-
The serial-number tells IOS to include the serial number in the request.
-
The name of the trustpoint you use MUST MATCH exactly the shortname of your CA in EJBCA (here FMSCA).
-
- Once you have that, use the command:
-
-
-# crypto ca authenticate FMSCA
-
-
- to fetch the CA certificate.
-
-
- Then, login to EJBCA, and create a new entity profile that looks like:
-
-
-
-
-
- Then, do the password enrollment with the command:
-
-
-# crypto ca enroll FMSCA
-
-
- Check your ejbca logs, you shoud see something like:
-
-
-ERROR [PKCS10RequestMessage] No CN in DN: SN=12013150+unstructuredName=your.ciscobox.hosts.name
-ERROR [Log4jLogDevice] October 19, 2005 9:48:33 AM CEST, CAId : 0, CA, EVENT_ERROR_USERAUTHENTICATION, Administrator : \
-PUBLICWEBUSER, IP Address : 192.168.134.1, User : 12013150, Certificate : No Certificate Involved, Comment : \
-Got request for nonexisting user: 12013150
-
-
- So, you know you must add an entity using the serial number as username, the password you define in IOS, and serialNumber/unstructuredNamed as subject DN fields.
-
-
- After adding the end entity, do the password enrollment again. If you see this you have enrolled succesfully:
-
-
-saroumane#sh crypto ca cert
-Certificate
- Status: Available
- Certificate Serial Number: 426FA96340F5D2CA
- Certificate Usage: General Purpose
- Issuer:
- c=FR
- o=Fimasys
- cn=Fimasys Security CA
- Subject:
- Name: your.ciscobox.hosts.name
- Serial Number: 12013150
- serialNumber=12013150
- hostname=your.ciscobox.hosts.name
- Validity Date:
- start date: 08:58:28 CET Oct 19 2005
- end date: 09:08:28 CET Oct 19 2007
- Associated Trustpoints: FMSCA
-
-CA Certificate
- Status: Available
- Certificate Serial Number: 7AA2B9942CD0D362
- Certificate Usage: Signature
- Issuer:
- c=FR
- o=Fimasys
- cn=Fimasys Security CA
- Subject:
- c=FR
- o=Fimasys
- cn=Fimasys Security CA
- Validity Date:
- start date: 07:29:35 CET Oct 17 2005
- end date: 07:39:35 CET Oct 15 2015
- Associated Trustpoints: FMSCA
-
-
-
-
- There is a Cisco 7200 emulator called dynamips available
- and a graphical front end GNS3.
-
-
Below is a short run through how to configure and enroll directly with EJBCA using GNS3 on Ubuntu 8.10.
-
-
-1. Create a tap interface
- sudo tunctl -t tap0
-2. Remove ip addressing and set eth0 and tap0 to promiscuous mode
- sudo ifconfig tap0 0.0.0.0 promisc up
- sudo ifconfig eth0 0.0.0.0 promisc up
-3. Create a new bridge interface
- sudo brctl addbr br0
-4. Add tap0 and eth0 to the bridge group
- sudo brctl addif br0 tap0
- sudo brctl addif br0 eth0
-5. Enable the bridge interface and give it an ip address
- sudo ifconfig br0 up
- sudo ifconfig br0 10.10.10.99/24
-6. Configure the default route
- sudo route add default gw 10.10.10.254
-
-
Now start gns3.
-
-sudo gns3
-
-
Configure with IOS image, for example c7200-jk9s-mz.124-13b.bin (an image with crypto commands), it's available on the net.
- Also configure a simple topology:
-
-
drag cloud to topology window
-
drag c7200 to topology window
-
configure cloud and add tap0 interface
-
add manual link from cloud to c7200
-
start c7200
-
open console on c7200
-
enter configuration and configure FastEthernet0/0 with ip 10.10.10.98/255.255.255.0
-
- Now you should be able to ping the host computer, where EJBCA is running.
- It is now time to do the actual enrollment as described above. Below are sample commands I have used.
-
-
-Router>enable
-Router#configure terminal
-Router(config)#
-Router(config)#crypto ca trustpoint ScepCA
-
-Router(ca-trustpoint)#enrollment url http://10.10.10.99:8080/ejbca/publicweb/apply/scep
-Router(ca-trustpoint)#serial-number
-Router(ca-trustpoint)#ip-address none
-Router(ca-trustpoint)#subject-name OU=Network Management, O=PrimeKey Solutions AB, C=SE
-Router(ca-trustpoint)#revocation-check none
-Router(ca-trustpoint)#exit
-
-Router(config)#crypto ca authenticate ScepCA
-Router(config)#crypto ca enroll ScepCA
-
-
- You will see in the log what the username of the user you must create is called.
- create end entity profile and user with DN containing SN=FFFFFF and unstructuredName=Router, as seen in the log file (FFFFFF and Router are the default values in the simulator).
-
-
-Router(config)#crypto ca enroll ScepCA
-Router(config)#exit
-Router#show crypto ca certificate
-
-
-You can always look at the defined trustpoints using the command:
-
-
-Router#show crypto ca trustpoints
-
-
-If you are enrolling towards an RA instead (see External RA documentation for information how to set up an external RA for SCEP) you issue the following commands:
-
-
-Router>enable
-Router#configure terminal
-Router(config)#
-Router(config)#crypto ca trustpoint ScepRA
-
-Router(ca-trustpoint)#enrollment url http://10.10.10.99:8080/scepraserver/scep
-Router(ca-trustpoint)#enrollment mode ra
-Router(ca-trustpoint)#serial-number
-Router(ca-trustpoint)#ip-address none
-Router(ca-trustpoint)#subject-name OU=Network Management, O=PrimeKey Solutions AB, C=SE
-Router(ca-trustpoint)#revocation-check none
-Router(ca-trustpoint)#exit
-
-Router(config)#crypto ca authenticate ScepRA
-Router(config)#crypto ca enroll ScepRA
-
-
-Note! This would only have a chance to work in EJBCA 3.8.1 and later, and actually it does not work due to the following
-error in Cisco. If you have any ideas, please contact us.
-
-
-Router#debug crypto pki API
-Router#debug crypto pki messages
-Router#debug crypto pki server
-Router#debug crypto pki transactions
-Router#debug crypto pki validation
-
-...
-
-*Jan 16 21:47:32.546: CRYPTO_PKI: make trustedCerts list for ScepRA
-*Jan 16 21:47:32.550: CRYPTO_PKI: subject="c=SE,o=Foo,cn=Scep RA" serial number= 3A 46 2F B4 5B AC 06 47
-
-*Jan 16 21:47:32.554: CRYPTO_PKI: subject="c=SE,o=EJBCA Sample,cn=ScepCA" serial number= 19 A6 7D 78 AF 9D 3B 27
-
-*Jan 16 21:47:32.566: E ../cert-c/source/p7digdat.c(377) : Error #703h
-*Jan 16 21:47:32.566: E ../cert-c/source/p7spprt.c(589) : Error #703h
-*Jan 16 21:47:32.582: pkcs7 verify data returned status 0x703
-*Jan 16 21:47:32.582: CRYPTO_PKI: status = 1795: failed to verify
-*Jan 16 21:47:32.582: %PKI-6-CERTFAIL: Certificate enrollment failed.
-*Jan 16 21:47:32.582: CRYPTO_PKI: All enrollment requests completed for trustpoint ScepRA.
-
-
-
-
-
-
-
-
-
Bruno Bonfils has written this excellent howto on using SSH with certificates from EJBCA:
EJBCA can issue certificates to be used when protecting sites using OpenSSO (Sun's Access Manager).
- EJBCA will then be configured to publish issued certificates to the AM LDAP server.
-
-
The configuration is really simple and after installing EJBCA consists of only these steps:
-
-
Create a Publisher, AMPublisher with the following properties:
-
-
Publisher Type: LDAP V3 Search Publisher
-
Base DN: The Base DN in the AM LDAP, for example dc=company,dc=com
-
Login parameters to the AM LDAP server
-
Create Nonexisting Users: false
-
Modify Existing Users: true
-
Add multiple certificates per user: false
-
Remove certificates when revoked: true
-
Remove ldap user when certificate revoked: false
-
LDAP location fields from cert DN: CN, Common Name (not really used)
-
Suffix base DN of the LDAP Search: same as Base DN, for example dc=company,dc=com
-
LDAP filter of the search: uid=$USERNAME
-
-
-
Create a Certificate Profile, AMUser:
-
-
Use ENDUSER as template when creating the profile
-
Extended Key Usage: Client Authentication
-
Publishers: AMPublisher
-
-
-
Create an End Entity Profile, AMUser:
-
-
Subject DN Fields: UID, CN, O, C is sufficient
-
Default Certificate Profile: AMUser
-
Available Certificate Profiles: AMUser
-
-
-
- The procedure when adding a new user is now simple:
-
-
Create a new user in AM
-
Create a new user in EJBCA with the same username and UID as the username in AM
-
Get the certificate for the user, for example with the user's browser on the public web pages of EJBCA
-
- When the users certificate is created, the certificate is published to the AM LDAP server and certificate authentication can be configured and used in AM.
-
-
-
-
- A really good article and description about EJBCA and OpenSSO is written by Bruno Bonfils.
-
-
This paper also describes easy integration between EJBCA and OpenSSO, where EJBCA is used for user provisioning.
-
-
-
-
-
-
- This section will show you how to use an Apache Web Server Proxy in front of EJBCA.
- The resulting server will
-
-
-
Display EJBCA public web at https://ca-server.company.local/
-
Redirect all HTTP-requests to HTTPS, except for OCSP and CRL.
-
Require a client SSL certificate when accessing https://ca-server.company.local/adminweb/
-
Be able to loadbalance requests
-
Still answer to requests on https://ca-server.company.local/ejbca/*
-
-
- This example was created on Ubuntu 64-bit Server 7.10 using the Apache Web Server 2.2 package,
- but should be easy to adapt to any system able to run Apache.
-
-
- Start by installing EJBCA as normal. If you intend to have the CA on the same machine as
- the proxy you should modify $EJBCA_HOME/conf/web.properties to only listen to localhost
-
- Generate the SSL-certificate for Apache. This should be issued by the same CA that issued the Tomcat SSL
- certificate (AdminCA1 in the default configuration). This can be done with the EJBCA CLI:
-
-
- $ cd $EJBCA_HOME
- $ bin/ejbca.sh ra adduser apache-ssl foo123 "CN=ca-server.company.local,O=EJBCA Sample,C=SE" "" AdminCA1 "" 1 PEM SERVER
- $ bin/ejbca.sh ra setclearpwd apache-ssl foo123
- $ bin/ejbca.sh batch
- $ ls p12/pem/ca-server.company.local*
- p12/pem/ca-server.company.local-CA.pem p12/pem/ca-server.company.local-Key.pem p12/pem/ca-server.company.local.pem
-
-
- Configure the default virtual host-file /etc/apache2/sites-enabled/000-default
-
-
- Note that this configuration with SSLVerifyClient inside a Location directtive is not safe with the newly (2009-11-15) discovered
- vulnerability in SSL/TLS. You should only use SSLVerifyClient and SSLCipherSuite on whole virtualhosts. You can create the same effect
- as below by using a separate subdomain for EJBCA administration (i.e. admin.ca.youdomain.com).
- See for example the Debian advisory.
-
-
-NameVirtualHost *:80
-<VirtualHost *:80>
- DocumentRoot /var/www/
-
- # Proxy requests to EJBCA instances (only one on local machine configured)
- <Proxy balancer://mycluster-kerb>
- BalancerMember ajp://localhost:8009/ejbca/
- </Proxy>
- ProxyPass / balancer://mycluster-kerb/
-
- RewriteEngine On
- # Redirect all but the CRL Distribution Point, OCSP and Helthcheck to HTTPS
- RewriteCond %{THE_REQUEST} !(/publicweb/webdist/certdist.*cmd=crl|/publicweb/status/)
- RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
- # Treat reqeusts to / and /ejbca/ as the same. Required by EJBCA's Admin Web.
- RewriteCond %{THE_REQUEST} /ejbca/
- RewriteRule ^/ejbca/(.*)$ /$1 [PT]
-
- # Configure log
- LogLevel warn
- ErrorLog /var/log/apache2/error.log
- CustomLog /var/log/apache2/access.log combined
-</VirtualHost>
-
-NameVirtualHost *:443
-<VirtualHost *:443>
- DocumentRoot /var/www/
-
- RewriteEngine On
- # Treat reqeusts to / and /ejbca/ as the same. Required by EJBCA's Admin Web.
- RewriteCond %{THE_REQUEST} /ejbca/
- RewriteRule ^/ejbca/(.*)$ /$1 [PT]
-
- # Configure secure SSL for this server using SSL certificate generated by EJBCA
- SSLEngine on
- SSLCipherSuite HIGH
- SSLProtocol all -SSLv2
- SSLCertificateFile /home/jboss/ejbca/p12/pem/ca-server.company.local.pem
- SSLCertificateKeyFile /home/jboss/ejbca/p12/pem/ca-server.company.local-Key.pem
-
- # Require Client SSL certificate for the Admin GUI
- <Location /adminweb>
- SSLVerifyClient require
- SSLVerifyDepth 1
- SSLCACertificateFile /home/jboss/ejbca/p12/pem/ca-server.company.local-CA.pem
- </Location>
-
- # Proxy requests to EJBCA instances (only one on local machine configured)
- <Proxy balancer://mycluster-kerb>
- BalancerMember ajp://localhost:8009/ejbca/
- </Proxy>
- ProxyPass / balancer://mycluster-kerb/
-
- # Configure log
- LogLevel warn
- ErrorLog /var/log/apache2/error.log
- CustomLog /var/log/apache2/access.log combined
-</VirtualHost>
-
-
- Reload the apache configuration and verify that only port 80, 443 and other desired services
- (e.g. a ssh-daemon) are listening on all or external interfaces
-
- Even though this looks secure, it is still a good idea to use a firewall as an extra layer of security (e.g. drop malformed packages and
- prevent future services from being exploited).
-
-
-
-
- A sample configuration how to fix up nice URLs for OCSP so that you can point your OCSP service locator to http://ocsp.company.com/ instead of http://ocsp.company.com:8080/ejbca/publicweb/status/ocsp
- (some info left out for brevity).
-
-
-<VirtualHost ocsp.company.com:80>
- <Proxy *>
- Order deny,allow
- Allow from all
- </Proxy>
- ProxyPass / http://127.0.0.1:8080/ejbca/publicweb/status/ocsp
- ProxyPassReverse / http://127.0.0.1:8080/ejbca/publicweb/status/ocsp
-</VirtualHost>
-
-
You can easily do the same for CRL distribution points.
-
-
-
-
-
-
-
- Instead of using a proxy you can use mod_jk which uses a JK connector between apache and tomcat. I think this have some benefits.
- You can easily combine it with mod_rewrite to have any type of external URLs, for OCSP, CRLs etc, and mapping them to other URLs in EJBCA.
-
-
- This section will show you how to use an Apache with mod_jk in front of EJBCA.
- The resulting server will
-
-
-
Display EJBCA public web at http://demo.primekey.se/
-
Require a client SSL certificate when accessing https://demo.primekey.se/, which works for the admin-GUI.
-
- mod_jk have many features and by using it you can virtually do anything you want with hosts, ports and URLs.
-
- This example was created on Ubuntu 64-bit Server 8.10 using the Apache Web Server 2.2 package,
- but should be easy to adapt to any system able to run Apache.
-
-
-# sudo apt-get install apache2 libapache2-mod-jk
-# vim /etc/libapache2-mod-jk/workers.properties
------
-worker.list=jboss
-
-# Define a worker using ajp13
-worker.jboss.port=8009
-worker.jboss.host=127.0.0.1
-worker.jboss.type=ajp13
------
-
-
-# vim /etc/apache2/sites-available/demo.primekey.se
------
-<VirtualHost demo.primekey.se:80>
- # We must disable default charset or everything will be ISO-8859-1,
- AddDefaultCharset off
- ServerAdmin webmaster@primekey.se
- ServerName demo.primekey.se
- ServerAlias demo.primekey.se
-
- JkLogFile /var/log/apache2/mod_jk.log
- JkLogLevel debug
-
- JkMount /* jboss
- JkMount / jboss
-</VirtualHost>
-
-<VirtualHost demo.primekey.se:443>>
- # We must disable default charset or everything will be ISO-8859-1,
- AddDefaultCharset off
- ServerAdmin webmaster@primekey.se
- ServerName demo.primekey.se
- ServerAlias demo.primekey.se
-
- SSLEngine on
-
- JkLogFile /var/log/apache2/mod_jk.log
- JkLogLevel debug
-
- JkMount /* jboss
- JkMount / jboss
-
- # JkExtractSSL is On by default
- # JkExtractSSL On
-</VirtualHost>
------
-
-Enable demo.primekey.se in /etc/apache2/sites-enabled
-
-
-# vim /etc/apache2/mods-available/ssl.conf
------
-SSLVerifyClient require
-SSLVerifyDepth 3
-
-SSLCACertificateFile /etc/apache2/ssl/apache-CA.pem
-SSLCertificateFile /etc/apache2/ssl/apache.pem
-
-SSLOptions +StdEnvVars +ExportCertData
------
-
-
-
-# vim /etc/apache2/mods-available/jk.load
------
-LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
-JkWorkersFile /etc/libapache2-mod-jk/workers.properties
------
-
-
-
- Now enable ssl.load and ssl.conf in /etc/apache2/mods-enabled.
-
-
Finally restart apache and go to http://demo.primekey.se/ (or https). Same security considerations as for using proxy applies.
-
- If you are using the external OCSP responder then you also got to ensure you got this line in the file apache2.conf:
-
KeepAlive Off
- If not apache will hang.
-
-
- Also an external OCSP responder it could be good to add these lines to the 'Virtual Host' configuration:
-
- By doing this you don't have to bother about typing the last part of the URL. Just right server name will do.
-
-
-
-
-
- This section will show you how to set up automatic certificate enroll of
- machines and users in an Windows environment with EJBCA.
-
- General idea
-
-
-
Use mod_auth_kerb on a Apache2 web server proxy to validate the requesters identity using Kerberos.
-
A login VBS-Script creates a certificate request that is sent to the proxy using IE-components.
-
A Servlet protected by the proxy receives the requests and creates a new cert.
-
The new certificate will use information from the request (UPN and CertificateTemplate) and read.
-
information from active directory (CN,DC etc).
-
Autoenrollment should be configurable in the Admin GUI.
-
-
-
- Current status
-
-
-
Machine enroll on Domain Controller: WORKING
-
DomainController enroll on Domain Controller: WORKING
-
User enroll (Administrator) on Domain Controller: NOT WORKING (Does not trusts ca-server as Intranet, despite GP)
-
Machine enroll on other WS2K3 client: WORKING (not checked in a while)
-
User enroll (Administrator) on other WS2K3 client: NOT WORKING (Does not trusts ca-server as Intranet, despite GP, also complains about untrusted VBS if ran manually)
-
Machine enroll on WinXP client: WORKING
-
User enroll (Administrator) on WinXP client: WORKING
-
-
- Known issues
-
-
-
SECURITY: The Servlet should verify that e.g. only Users can request User certificates, DCs only DC certs etc.. and other permissions if possible.
-
The enroll scripts always fetches new certificates. They should use the command=status first to see if a new cert is needed.
-
AdminWeb cannot verify admin certificates if non-"/ejbca/" path is used in URL.
-
Autoenroll Servlet doesn't get X-Remote-User if "/ejbca/" path is used in URL.
-
Order of Subject DNs is wrong compared with MS certs..
-
SSL connection to AD has not been tested.
-
Certificates don't have the CertificateTemplate attrib yet.. looks nicer in Certificate MMC snapin..
-
JavaScript "onchange" behaves strangely in IE6. Only activated when the table is clicked, not the checkbox..
-
Creation of EEPs is inefficient due to attempted removal of EEP before each new request.. (Debug-code)
-
-
- ...
-
-
-
-
- Domain Controller: dc1.company.local
-
-
-
Windows Server 2003 EE patched to SP2
-
Active Directory
-
DNS Server
-
-
- CA Server: ca-server.company.local
-
-
-
Ubuntu 64 Server 7.10
-
Apache2 with modules
-
Kerberos 5
-
Java 1.6u4
-
JBoss 4.2.2.GA
-
EJBCA 3.6 Alpha
-
Apache Ant 1.7.0
-
-
- Desktop client: client-01.company.local
-
-
-
Windows XP Pro SP1 patched to SP2
-
-
-
-
- Configure EJBCA not to respond to external web-requests by editing $EJBCA_HOME/conf/web.properties
-
- and restart networking (sudo /etc/init.d/networking restart).
-
-
- Add "ntdpdate dc1.company.local" to /etc/rc.local or a cron job to make sure the
- ca-server is syncronized with the Domain Controller.
-
-
- Create the SSL certificates for the Apache proxy using the same CA as our EJBCA installation and the same subject DN.
-
-
-$cd $EJBCA_HOME
-$bin/ejbca.sh ra adduser apache-ssl foo123 "CN=ca-server.company.local,O=EJBCA Sample,C=SE" "" AdminCA1 "" 1 PEM SERVER
-$bin/ejbca.sh ra setclearpwd apache-ssl foo123
-$bin/ejbca.sh batch
-$ls p12/pem/ca-server.company.local*
-p12/pem/ca-server.company.local-CA.pem p12/pem/ca-server.company.local-Key.pem p12/pem/ca-server.company.local.pem
-
-
- Edit /etc/apache2/sites-enabled/000-default to display an apache proxy front for EJBCA
-
-
-NameVirtualHost *:80
-<VirtualHost *:80>
- DocumentRoot /var/www/
-
- # Proxy requests to EJBCA instances (only one on local machine configured)
- <Proxy balancer://mycluster-kerb>
- BalancerMember ajp://localhost:8009/ejbca/
- </Proxy>
- ProxyPass / balancer://mycluster-kerb/
-
- RewriteEngine On
- # Redirect all but the CRL Distribution Point, OCSP and Helthcheck to HTTPS
- RewriteCond %{THE_REQUEST} !(/publicweb/webdist/certdist.*cmd=crl|/publicweb/status/)
- RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
- # Treat reqeusts to / and /ejbca/ as the same. Required by EJBCA's Admin Web.
- RewriteCond %{THE_REQUEST} /ejbca/
- RewriteRule ^/ejbca/(.*)$ /$1 [PT]
-
- # Configure log
- LogLevel warn
- ErrorLog /var/log/apache2/error.log
- CustomLog /var/log/apache2/access.log combined
-</VirtualHost>
-
-NameVirtualHost *:443
-<VirtualHost *:443>
- DocumentRoot /var/www/
-
- RewriteEngine On
- # Treat reqeusts to / and /ejbca/ as the same. Required by EJBCA's Admin Web.
- RewriteCond %{THE_REQUEST} /ejbca/
- RewriteRule ^/ejbca/(.*)$ /$1 [PT]
-
- # Configure secure SSL for this server using SSL certificate generated by EJBCA
- SSLEngine on
- SSLCipherSuite HIGH
- SSLProtocol all -SSLv2
- SSLCertificateFile /home/jboss/ejbca/p12/pem/ca-server.company.local.pem
- SSLCertificateKeyFile /home/jboss/ejbca/p12/pem/ca-server.company.local-Key.pem
-
- # Require Client SSL certificate for the Admin GUI
- <Location /adminweb>
- SSLVerifyClient require
- SSLVerifyDepth 1
- SSLCACertificateFile /home/jboss/ejbca/p12/pem/ca-server.company.local-CA.pem
- </Location>
-
- # Require Kerberos authentication for the Autoenroll Servlet
- <Location /autoenroll>
- AuthType Kerberos
- Krb5Keytab /etc/apache2/http.keytab
- KrbAuthRealms COMPANY.LOCAL
- KrbServiceName HTTP
- KrbMethodNegotiate on
- KrbMethodK5Passwd off
- Require valid-user
- </Location>
-
- # Forward the UPN as variable X-Remote-User
- RewriteCond %{IS_SUBREQ} ^false$
- RewriteCond %{LA-U:REMOTE_USER} (.+)
- RewriteRule .* - [E=RU:%1]
- RequestHeader set X-Remote-User %{RU}e
-
- # Proxy requests to EJBCA instances (only one on local machine configured)
- <Proxy balancer://mycluster-kerb>
- BalancerMember ajp://localhost:8009/ejbca/
- </Proxy>
- ProxyPass / balancer://mycluster-kerb/
-
- # Configure log
- LogLevel warn
- ErrorLog /var/log/apache2/error.log
- CustomLog /var/log/apache2/access.log combined
-</VirtualHost>
-
-
- Restart apache with "sudo /etc/init.d/apache2 restart"
-
-
- Install Windows support tools on the Domain Controller (found in %WIN2k3CD%\SUPPORT\TOOLS\SUPTOOLS.msi) to get ktpass.exe.
- Create a new user "ca-server@company.local" and a strong password e.g not FooBar123 used here.
- Create a keytab-file "http.keytab" on the Domain Controller:
-
- And move the file to ca-server.company.local:/etc/apache2/http.keytab change permissions to be
- readable only by the apache-process.
-
-
-$chown root:root /etc/apace2/http.keytab
-
-
- Verify that the keytab is correct:
-
-
-$kinit Administrator
-$kvno HTTP/ca-server.company.local
-$klist -e
-** Output here should match the one from ktpass.exe **
-
-
- Verify that the keytab can be used:
-
-
-$kdestroy
-$sudo kinit -k -t /etc/apache2/http.keytab HTTP/ca-server.company.local
-$sudo klist
-(You should have received a ticket here if everything is working.)
-$sudo kdestroy
-
-
- Add ca-server.company.local (192.168.1.2) to your Domain Controllers DNS server as a "Host (A)" record.
-
-
-
-
- Create a Shared directory on the Domain Controller, C:\Shared with read and exec rights by Everyone
-
-
-copy %SYSTEMROOT%\system32\certreq.exe C:\Shared\Autoenroll\
-copy %SYSTEMROOT%\system32\certcli.dll C:\Shared\Autoenroll\
-copy %SYSTEMROOT%\system32\certadm.dll C:\Shared\Autoenroll\
-(copy %SYSTEMROOT%\system32\certutil.exe C:\Shared\Autoenroll\ This is used by EnrollDomainController and is already available at all DCs.)
-
-
- Edit or create C:\Shared\Autoenroll\autoenroll.conf
-
-
-# This is a primitive config file that does not allow spaces
-
-# The request URL is built from the following properties
-# https://[requestpath]?request=...
-#
-
-# Standard SSL-port and using URL rewrite from /ejbca/* to /*
-requestpath=ca-server.company.local/autoenroll
-
-# Non-standard SSL-port and not using URL rewrite
-#requestpath=ca-server.company.local:4443/ejbca/autoenroll
-
-# Debug setting, use only for manual testing
-#debug=true
-debug=false
-
-
- Edit or create C:\Shared\Autoenroll\RequestAndInstall.vbs
-
-
- Set oArgs = WScript.Arguments
- if oArgs.Count < 1 then
- WScript.Echo "Usage: thisscript.vbs fullpathnameofrequest.inf"
- WScript.Quit 1
- else
- sRequestInfo = Trim(oArgs(0))
- end if
-
- Set WS = CreateObject("WScript.Shell")
-
- sRequest = WS.ExpandEnvironmentStrings("%TEMP%") & "\autoenrolled.req"
- sResult = WS.ExpandEnvironmentStrings("%TEMP%") & "\autoenrolled.p7b"
-
- Set oFilesystem = CreateObject("Scripting.FileSystemObject")
- On Error Resume Next ' Ignore if we try to delete a file that does not exist
- oFilesystem.DeleteFile(sRequest)
- Err.Clear
- On Error GoTo 0
- sSharedDir = oFilesystem.GetParentFolderName(WScript.ScriptFullName) & "\"
-
- Set iFile = oFilesystem.OpenTextFile(sSharedDir & "autoenroll.conf")
- Do While iFile.AtEndOfStream <> True
- sLine = iFile.Readline
- If InStr(Left(sLine,1), "#") = 0 then
- If InStr(sLine, "requestpath=") <> 0 then
- sRequestPath = Trim(Right(sLine, Len(sLine)-Len("requestpath=")))
- end if
- If InStr(sLine, "debug=") <> 0 then
- sDebug = Trim(Right(sLine, Len(sLine)-Len("debug=")))
- end if
- End if
- Loop
- iFile.Close
-
- WS.Run sSharedDir & "certreq.exe -f -new " & sRequestInfo & " " & sRequest, 0, True
-
- sRequestData = ""
- Set objFile = oFilesystem.OpenTextFile(sRequest, 1)
- Do Until objFile.AtEndOfStream
- sRequestData = sRequestData & objFile.ReadLine
- Loop
- objFile.Close
-
- set oIE = CreateObject("InternetExplorer.Application")
-
- oIE.navigate2("https://" & sRequestPath & "?debug=" & sDebug & "&request=" & sRequestData)
-
- If sDebug = "true" Then
- oIE.visible = true
- End If
-
- 'Wait max 30 seconds
- wscript.sleep 1000
- counter = 0
- While oIE.Busy = true And counter < 30
- counter = counter + 1
- wscript.sleep 1000
- Wend
-
- sResultData = oIE.Document.Body.innerHTML
- sResultData = Mid(sResultData, 6, Len(sResultData)-11)
-
- Set oFile = oFilesystem.CreateTextFile(sResult, True)
- oFile.WriteLine sResultData
- oFile.Close
-
- on error resume next ' in case the Task Manager is used to close IE.
- If sDebug <> "true" Then
- oIE.quit ' Close the window
- WS.Run sSharedDir & "certreq.exe -accept " & Chr(34) & sResult & Chr(34), 0, True
- End If
-
-
- Edit or create C:\Shared\Autoenroll\EnrollDomainController.vbs
-
-
- ' This Script is based on the script found at http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/advcert.mspx#EURAE
-
- iRole = GetLastDomainRole()
- If iRole <> 4 And iRole <> 5 Then
- WScript.Echo "This script should only run on a Domain Controller."
- WScript.Quit 1
- End If
-
- Set WS = CreateObject("WScript.Shell")
-
- Set objDC = GetObject("LDAP://" & CreateObject("ADSystemInfo").ComputerName)
- sGUID = objDC.GUID
- sDNShostname = objDC.DNShostname
-
- Set oFilesystem = CreateObject("Scripting.FileSystemObject")
- sTempfilePrefix = WS.ExpandEnvironmentStrings("%TEMP%") & "\autoenrolled"
- sRequestInfo = sTempFilePrefix & ".inf"
- sSharedDir = oFilesystem.GetParentFolderName(WScript.ScriptFullName) & "\"
-
- 'Create b64 encoded extension
- Dim aASNsubstring(2, 5)
- Const HEX_DATA_LENGTH = 1
- Const ASCIIDATA = 2
- Const HEXDATA = 3
- Const HEX_BLOB_LENGTH = 4
- Const HEX_TYPE = 5
- ' Encode DNS
- aASNsubstring(0, ASCIIDATA) = sDNShostname
- aASNsubstring(0, HEX_TYPE) = "82"
- For i = 1 to Len(aASNsubstring(0, ASCIIDATA))
- aASNsubstring(0, HEXDATA) = aASNsubstring(0, HEXDATA) & Hex(Asc(Mid(aASNsubstring(0, ASCIIDATA), i, 1)))
- Next
- aASNsubstring(0, HEX_DATA_LENGTH) = ComputeASN1 (Len(aASNsubstring(0, HEXDATA)) / 2)
- sASN = aASNsubstring(0, HEX_TYPE) & aASNsubstring(0, HEX_DATA_LENGTH) & aASNsubstring(0, HEXDATA)
- ' Encode GUID
- aASNsubstring(1, HEXDATA) = sGUID
- aASNsubstring(1, HEX_TYPE) = "A0"
- aASNsubstring(1, HEX_DATA_LENGTH) = ComputeASN1 (Len(aASNsubstring(1, HEXDATA)) / 2)
- sASN = sASN & "A01F06092B0601040182371901" & aASNsubstring(1, HEX_TYPE) & "120410" & aASNsubstring(1, HEXDATA)
-
- Set oFile = oFilesystem.CreateTextFile(sTempfilePrefix & ".asn")
- oFile.WriteLine "30" & ComputeASN1 (Len(sASN) / 2) & sASN
- oFile.Close
- WS.Run "certutil -f -decodehex " & sTempfilePrefix & ".asn " & sTempfilePrefix & ".bin", 0, True
- WS.Run "certutil -f -encode " & sTempfilePrefix & ".bin " & sTempfilePrefix & ".b64", 0, True
-
- Set iFile = oFilesystem.OpenTextFile(sTempfilePrefix & ".b64")
- Set oFile = oFilesystem.CreateTextFile(sRequestInfo, True)
- oFile.WriteLine "[Version]"
- oFile.WriteLine "Signature= " & Chr(34) & "$Windows NT$" & Chr(34)
- oFile.WriteLine ""
- oFile.WriteLine "[NewRequest]"
- oFile.WriteLine "Subject = " & Chr(34) & "CN=IgnoredValue" & Chr(34)
- oFile.WriteLine "KeySpec = 1"
- oFile.WriteLine "KeyLength = 2048"
- oFile.WriteLine "Exportable = TRUE"
- oFile.WriteLine "MachineKeySet = TRUE"
- oFile.WriteLine "SMIME = FALSE"
- oFile.WriteLine "PrivateKeyArchive = FALSE"
- oFile.WriteLine "UserProtected = FALSE"
- oFile.WriteLine "UseExistingKeySet = FALSE"
- oFile.WriteLine "ProviderName = " & Chr(34) & "Microsoft RSA SChannel Cryptographic Provider" & Chr(34)
- oFile.WriteLine "ProviderType = 12"
- oFile.WriteLine "RequestType = PKCS10"
- oFile.WriteLine "KeyUsage = 0xa0"
- oFile.WriteLine ""
- oFile.WriteLine "[EnhancedKeyUsageExtension]"
- oFile.WriteLine "OID=1.3.6.1.5.5.7.3.1"
- oFile.WriteLine "OID=1.3.6.1.5.5.7.3.2"
- oFile.WriteLine ""
- oFile.WriteLine "[Extensions]"
- iLine = 0
- Do While iFile.AtEndOfStream <> True
- sLine = iFile.Readline
- If sLine = "-----END CERTIFICATE-----" then
- Exit Do
- end if
- if sLine <> "-----BEGIN CERTIFICATE-----" then
- if iLine = 0 then
- oFile.WriteLine "2.5.29.17=" & sLine
- else
- oFile.WriteLine "_continue_=" & sLine
- end if
- iLine = iLine + 1
- end if
- Loop
- oFile.WriteLine "Critical=2.5.29.17"
- oFile.WriteLine ""
- oFile.WriteLine "[RequestAttributes]"
- oFile.WriteLine "CertificateTemplate = DomainController"
- oFile.Close
- iFile.Close
-
- WS.Run sSharedDir & "RequestAndInstall.vbs " & sRequestInfo, 0, True
-
- ' Sub
- Function ComputeASN1 (iStrLen)
- If Len(Hex(iStrLen)) Mod 2 = 0 then
- sLength = Hex(iStrLen)
- else
- sLength = "0" & Hex(iStrLen)
- end if
- if iStrLen > 127 then
- ComputeASN1 = Hex (128 + (Len(sLength) / 2)) & sLength
- else
- ComputeASN1 = sLength
- End If
- End Function
-
- 'Return the domain role number where:
- '-1 Error
- '0 Standalone Workstation
- '1 Member Workstation
- '2 Standalone Server
- '3 Member Server
- '4 Backup Domain Controller
- '5 Primary Domain Controller
- Function GetLastDomainRole ()
- On Error Resume Next
- strComputer = "."
- Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
- Set colItems = objWMIService.ExecQuery("Select DomainRole from Win32_ComputerSystem",,48)
- For Each objItem in colItems
- iReturn = objItem.DomainRole
- Next
- On Error Goto 0
- GetLastDomainRole = iReturn
- End Function
-
-
- Edit or create C:\Shared\Autoenroll\EnrollMachine.vbs
-
- Verify that all the file in Shared\Autoenroll directory has read end exec right for Everyone.
-
- Install Certificate Templates by adding the corresponding Snap-in i the MMC console.
-
- Install the root CA-certificate(s) in the NTAuthStore, so windows can verify all cerificates produced by EJBCA.
- Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
- Edit Default Domain Policy -> Computer Configuration -> Windows Settings -> Security Settings -> Public Key Policies ->
- Trusted Root Certificate Authorities -> Import -> import the root ca certificate and run "gpupdate /force" on
- machines that are used for testing.
- (You can fetch the CA certificate using the EJCBA CLI with "$EJBCA_HOME/bin/ejbca.sh ca getrootcert AdminCA1 ~/AdminCA1.crt -der".)
-
- Add Startup Scripts in
- Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
- Edit Default Domain Policy -> Computer Configuration -> Windows Settings -> Scripts -> Startup ->
- Add the machine-related scripts from the shared directory.
-
- Add Login Scripts in
- Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
- Edit Default Domain Policy -> User Configuration -> Windows Settings -> Scripts -> Logon ->
- Add the user-related scripts from the shared directory.
-
- Add the ca-server and shared directory to the Intranet
- Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
- Edit Default Domain Policy -> Computer Configuration | User Configuration (do both!!) -> Administrative Templates ->
- Windows Components -> Internet Explorer -> Internet Control Page -> Security Page ->
- Site to Zone assignement list -> Enabled and added "https://ca-server.company.local" to zone "1", "\\Dc1\Shared" to zone "1"
-
- Configure clients to synchronize time using NTP:
- Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
- Edit Default Domain Policy -> Computer Configuration -> Administrative Templates ->
- System -> Windows Time Service -> Time Providers -> Configure Windows NTP Client (Add "dc1.company.local" as an NTP server.)
- and Enable Windows NTP Client.
-
- Use "gpupdate /force" on clients before running tests or wait 8h.. =)
-
-
-
-
- Well, good luck with Windows error messages.. but you can enable debug
- ("debug=true" in autoenroll.conf) to see the response from the Servlet.
-
- Test the machine-cert-retreival script by starting a Console as "LocalSystem". C:\Shared\Autoenroll\ConsoleAsLocalSystem.vbs:
-
- Adding a custom Administrative template can be done as in this example if needed:
- Start Menu -> Administration -> Users and Computer -> Right click the domain name -> Properties -> Group Policy ->
- Edit Default Domain Policy -> Computer Configuration -> Administrative Templates -> Add/Remove Templates -> Add Autoenroll.adm
-
-
- This is just a sample, but shows how a custom GP can be configured.. (Use the intructions above instead of this template.
- The example Administrative Template "Autoenroll Related" can be used to force ca-server.company.local
- into the Intranet zone or add a NTP syncronizing policy. C:\Shared\Autoenroll\Autoenroll.adm:
-
-
-CLASS MACHINE
-
-CATEGORY "Autoenroll Related"
- CATEGORY "NTP Synch for clients with AD"
- POLICY "Enable NTP synch"
- SUPPORTED "This is a hack to get WinXP clients working"
- EXPLAIN ".."
- KEYNAME "Software\Policies\Microsoft\W32Time\TimeProviders"
- VALUENAME "NtpServer"
- VALUEON NUMERIC 1
- VALUEOFF NUMERIC 0
-
- ACTIONLISTON
- KEYNAME "Software\Policies\Microsoft\W32Time\Parameters"
- VALUENAME "Type"
- VALUE "NTP"
-
- KEYNAME "Software\Policies\Microsoft\W32Time\Config"
- VALUENAME "AnnounceFlags"
- VALUE NUMERIC 5
-
- KEYNAME "Software\Policies\Microsoft\W32Time\Config"
- VALUENAME "MaxPosPhaseCorrection"
- VALUE NUMERIC 1099511627775
-
- KEYNAME "Software\Policies\Microsoft\W32Time\Config"
- VALUENAME "MaxNegPhaseCorrection"
- VALUE NUMERIC 1099511627775
- END ACTIONLISTON
-
- PART "NTP Servers in the form ntp.server1.com,0x1 ntp.server2.com,0x1 ntp.server3.com,0x1" EDITTEXT
- KEYNAME "Software\Policies\Microsoft\W32Time\Parameters"
- VALUENAME "NtpServer"
- MAXLEN 4096
- END PART
-
- PART "Poll interval in seconds" NUMERIC
- KEYNAME "Software\Policies\Microsoft\W32Time\TimeProviders\NtpClient"
- VALUENAME "SpecialPollInterval"
- DEFAULT 900
- END PART
- END POLICY
- END CATEGORY
-
- CATEGORY "Required trust"
- POLICY "Trust ca-server.company.local"
- SUPPORTED "Might need IE6 for this to work.."
- EXPLAIN "This adds the ca-server.company.local to the list of intranet-sites.."
- KEYNAME "Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\company.local\ca-server"
- VALUENAME "https"
- VALUEON NUMERIC 1
- VALUEOFF NUMERIC 0
- END POLICY
- END CATEGORY
-END CATEGORY
-
-CLASS USER
-
-CATEGORY "Autoenroll Related"
- CATEGORY "Required trust"
- POLICY "Trust ca-server.company.local"
- SUPPORTED "Might need IE6 for this to work.."
- EXPLAIN "This adds the ca-server.company.local to the list of intranet-sites.."
- KEYNAME "Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\company.local\ca-server"
- VALUENAME "https"
- VALUEON NUMERIC 1
- VALUEOFF NUMERIC 0
- END POLICY
- END CATEGORY
-END CATEGORY
-
-
- Useful reg-for VMwares with runaway clocks if GP mod didn't work or you just want to modify a single client.
-
- This is a very thorough guide with screen-shots of how to setup EJBCA 3.6.0
- with GemSAFE Toolbox in a windows environment for smartcard logon, email signing,
- email encryption and SSL services.
-
- This Java program provides a simple UI for creating and querying end entities.
- All communications with the appserver are via EJBCA web services.
-
-
- It includes wizard dialogs that prompt the user for the type of certificate to create, that prompt the user to enter values that define the subject DN,
- that allow the user to receive an email notification containing the password for the new end entity,
- that allow the user to choose between adding the new end entity to the EJBCA database and actually generating the certificate (as a P12 or JKS file).
-
-
- Further information on this application can be found in the project's README.txt (building and running the application),
- its troubleshooting.txt (further tips on running the application), and todo.txt (notes and issues for developers).
-
-
- A short movie demonstrating the program may be downloaded from
- SourceForge
- or
- YouTube.
-
2011-11-02: EJBCA 4.0.5 and cert-cvc 1.2.13 with EAC ePassport support is now out!
+
2011-12-25: EJBCA 4.0.7 is now out! Visit the download section. There is also a LiveCD!
@@ -18,10 +18,11 @@
The library is freely usable under the LGPL 2.1 (or later) license for all parties interesting
in handling CVC certificates, in particular for EU EAC ePassports.
- The cert-cvc library was donated to the open source by the Swedish National Police Board.
+ The cert-cvc library was donated to the open source by the Swedish National Police Board.
+ The current version is cert-cvc 1.2.13, with full EAC ePassport support.
- Did you know that EJBCA includes a stand-alone OCSP responder? The responder is scalable with high-performance and can be used
+ Did you know that EJBCA includes a stand-alone Validation Authority, including an OCSP responder? The responder is scalable with high-performance and can be used
also with any other CA than EJBCA.
diff -urN ../ejbca_4_0_6/doc/xdocs/stylesheets/project.xml ./doc/xdocs/stylesheets/project.xml
--- ../ejbca_4_0_6/doc/xdocs/stylesheets/project.xml 2011-11-18 12:33:18.000000000 +0100
+++ ./doc/xdocs/stylesheets/project.xml 2011-12-25 12:00:02.000000000 +0100
@@ -46,7 +46,7 @@