What is DogTag and Why Use It?
Dog Tag is an Enterprise-class open source Certificate Authority that Red Hat purchased from AOL back in 2004. Red Hat opened it up to the open source community in 2008. Dog Tag supports all aspects of certificate lifecycle management, including key archival, OCSP and smartcard management, and much more.
Most importantly, it is an available CA that has been tested for use with Cisco’s BYOD solution using Cisco’s Identity Services Engine 1.2 & newer.
Note: There is also an Enterprise level version of DogTag known as the Red Hat Certificate System.
Before we go any further, I need to send a huge call-out to Vivek Santuka who prototyped & pioneered this initiative at work. Also a call-out to Brian Sak for updating the work that Vivek did.
Dog Tag will run on most Red Hat variants. For the purposes of this document, we will focus on Fedora Core 15 (32-bit). This is the version that is known to work and has been tested with ISE 1.2. This version of Fedora can be installed with the minimum option and will leverage the Apache web server, PHP, and the open source directory server.
Install 32-bit Fedora 15
Step 1 Boot the machine with the 32-bit Fedora 15 ISO file or DVD available here: http://dl.fedoraproject.org/pub/fedora/linux/releases/15/Fedora/i386/iso/
Step 2 Select “Install system with basic video driver”
The “Minimal” installation type is all that you need for this use-case.
Accept the default choices for the remainder of the installation
The Certificate Authority should have a static IP Address to ensure that communication is always optimal. There is a component of the setup wizard that will allow you to configure the network prior to the installation finishing. However, the majority of the time those settings do not seem to be maintained and when the Fedora operating system is fully installed there is no assigned IP Address, as seen in figure 3.
After the installation, verify if there is an IP Address. Use the ifconfig eth0 command. Figure 3 shows the result when no IP Address has been configured.
Using your favorite editor, edit the ifcfg-eth0 file to setup the network stack for the interface.
Example-1: Edit the ifcfg-eth0 file
- With the ifcfg-eth0 file open, ensure that the ONBOOT option is set to “yes”. This is ensuring the interface will be on when the system reboots.
- Ensure the BOOTPROTO option is set to “none”. This configures the interface to use a static IP address.
- Set the IPADDR option to be the desired IP address of the server, and the NETMASK to be the subnet mask for that IP address.
- The DNS1 and DNS2 options may be used to point the server to the correct DNS server(s).
- Use the GATEWAY option to specify the IP Address of the default-gateway.
Example-2 below shows the details of a configured ifcfg-eth0 file:
Example-2: Configured ifcfg-eth0 file
Ensure the network starts at boot with the “chkconfig network on” command.
Example-3: Ensuring network starts at boot, and restarting the service
Install Packages with yum
Fedora uses a software package manager called “yum” to manage the installed packages within the operating system. yum provides the advantage of identifying dependencies and helping to manage the installation of the application and all of that applications dependencies. See http://fedoraproject.org/wiki/Yum for more on yum.
We will use yum to update this Fedora 15 server to the latest packages, as well as install needed applications such as NTP.
Configure Proxy (if needed)
The setup used to write this document required a proxy server to access the Internet. Therefore this procedure was included. If your environment does not require a proxy to access the Internet, please go to Procedure 2.
Step 1 Use your favorite text editor to edit the yum configuration file located at /etc/yum.conf
Example 4 – Editing the yum configuration file
Step 2 Add a line for with a field of “proxy=” followed by the URL and Port for your proxy server
Example 5 – Complete yum.conf file
Update system with yum
Step 1 Add a yum plugin to choose the fastest location to download from. This plugin saved hours during the writing of this paper.
Example 6 – Installing the fastest mirror plugin
Step 2 Update all installed packages with the “yum update” command
Example 7 – Updating all installed packages with yum
Install and Configure the NTP Service
Certificates require strict time synchronization. It’s recommended to use the network time protocol (NTP) to ensure the time is accurate on the Certificate Authority. The NTP service (aka: NTP daemon) is not installed by default with the minimal installation of Fedora 15, so we will use yum to install it.
- Install the NTP Service with the “yum install ntp” command
- Use the “chkconfig ntpd on” command to ensure ntp daemon starts at boot
- Use the ntpdate ntp_server_ip_address command to sync to an NTP source
- Ensure the service is started with the “ntpd start” command
Example 8 – Installing, syncing and starting NTP
Install the LDAP server
Dog Tag uses an open source LDAP server called “Directory Server” to store its data. Before you can install Dog Tag, Directory Server must be installed and prepared.
Step 1 Install the LDAP server package with the “yum install 389-ds” command
Step 2 Create a new user named “ds389” to be used by the Directory Server
Example 9 – Installing Directory Server and creating the service account
Step 3 Launch the Directory Server configuration wizard using the setup-ds.pl script located in /usr/sbing/setup-ds.pl
Example 10 – Launching the setup script
Step 4 Accept the defaults. Once you reach the portion where the wizard is asking for a System User, you will need to change the default (nobody) to the ds389 user. Use the ds389 for the group as well, as seen in Example – 11
Example 11 – Setting the System User and Group to ds389
Step 5 Set the password for the Directory Manager
Example 12 – Setting the Directory Manager password and successs message
Install the PHP services
Step 1 Use yum to install php as seen in example 13
Example 13 – installing php with yum
Step 2 Start the apache (httpd) and Directory Server (dirsrv) services and configure them to start on bootup as seen in example 4
Example 14 – Starting the apache and directory server services
Step 1 Install DogTag with the yum install pki-ca command as seen in Example 15
Example 15 – installing DogTag
Modify the Firewall Rules (IPTables)
In order to connect to the DogTag service on the ports used in procedure 3, you must modify the Linux server’s host-firewall (iptables) to allow the connections. Since this is not an iptables document, and in order to keep this simple, let’s just turn off iptables.
Step 1 Stop the firewall service with the “service iptables stop” command
Step 2 Keep the firewall from starting when the server is booted with the “chkconfig iptables off” command.
Example 16 – Shutting off the Firewall
Create a new CA Instance
Now that DogDag is installed, you need to create a new Certificate Authority instance. The following is using ports that we have preferred to use. You may change any of the parameters in the following section to suite the needs of your organization.
Step 1 Create a pki instance using the pkicreate command with the following options:
#This is setting the root location to store the pki instance. Based on the settings used in example 17, it will be placed in the following directory: /var/lib/ise-ca.
#This is naming the new CA instance “ise-ca”. you may replace this with another name, to suit the needs of your organization.
#Sets the subsystem to be a certificate authority. Other possible sub-systems are not applicable to this guide.
# Agent Services are where an administrator can see what certificate has been provisioned, revoke them, etc.
# Sets the SSL port for End-Entities web services.
# Sets the SSL port for End-Entities authentication.
# This is the default port to use to access the CA Services Page as the administrator.
# Sets the regular port number. When not specified, it will be randomly generated.
· tomcat_server_port=9701 #
· user=pkiuser #
· group=pkiuser #
· redirect conf=/etc/ise-ca
# configures the configuration data to be stored in /etc/ise-ca
· redirect logs=/var/log/ise-ca
# configures the logs to be in the /var/log/ise-ca directory.
# sets the install to be in verbose mode, to provide you with as much detail as possible.
Example 17 – Creating the pki instance
Step 2 Proceed with the Graphical Configuration of the DogTag CA
Once the setup script complete running, a message will be displayed with a unique URL to access the DogTag GUI and complete the CA installation, as seen in example 18.
Example 18 – Example of Unique URL to DogTag GUI
Step 3 Click Next from the Welcome Screen
Step 4 Create a “New Security Domain”. Name it “ISE BYOD Domain” & click Next
Step 5 Name the Subsystem “Certificate Authority” & click Next
Step 6 Make this a Self-Signed Root CA within this new PKI Hierarchy. Of course this could become a subordinate CA of an existing CA. However, that is not the focus of this post.
Step 7 The Internal Database is the Directory Server (ds389) that we installed earlier. All settings should be filled in correctly. Please add the Directory Manager password created earlier in Example 12.
Step 8 Generate the Keypairs. The default of RSA w/ SHA256 and a key size of 2048 bits will work fine, then click next.
Step 9 The certificate subject lines can be left at their default values, and click next
Step 10 If there are actions needed, they will be in red. If not, click Next
Step 11 Provide a password, and export the CA’s key pair. Store the key pair in a secure location.
Step 12 The new root CA certificate will be imported into your browser or your local certificate store, to ensure your system trusts certificates signed by this new CA.
Step 13 You should now be asked to install an Administrative Certification. This is a personal certificate to identify you (the admin) to the CA for administrative tasks. Please ensure you backup and store this key in a secure location, as you will not be able to administer the CA without this identity certificate.
Enable and Configure SCEP
Here you will be enabling and configuring Simple Certificate Enrollment Protocol (SCEP) by directly modifying the CS.cfg file.
Step 1 Backup the CS.cfg file before making any changes.
Example 20 – Backup of the CS.cfg file
Step 2 Open up the CS.cfg file in a text editor.
Example 21 – Edit the CS.cfg file
Step 3 Add the following lines to the bottom of the CS.cfg file and save the changes.
Step 4 Backup the caRouterCert.cfg file before making any changes.
Example 22 – Backing up the caRouterCert.cfg file
Step 5 Edit the caRouterCert.cfg file using a text editor. Delete the value for the variable auth.instance_id and save your changes. The end result should look like Example 24.
Example 23 – Edit the caRouterCert.cfg file
Example 24 – The final setting for auth.instance_id= field in the caRouterCert.cfg file
Step 6 Restart the CA services with the “service pki-cad restart“command
Example 25 – Restart the CA Services
Step 1 Move the Apache Welcome.conf file to disable the default installation
Example 26 – Move the welcome.conf file
Step 2 Create a new file called scepproxy.php at /var/www/html.
Example 27 – Creating the scepproxy.php file
Step 3 Populate the file with the following PHP script and save the file when completed.
Step 4 Restart the Apache service to reflect your changes with the “service httpd restart” command
The DogTag installation is complete. You are ready to add this CA to ISE for BYOD certificate provisioning.
Configure ISE to use the new DogTag CA
This document is assuming your already have your BYOD policies ready, or you will create them afterwards. In this section, we will focus on the simple task of adding the new DogTag CA to ISE for purposes of SCEP provisioning the BYOD certificates.
For more on configuring ISE for BYOD, please see the BYOD How-To Guides here: http://www.cisco.com/en/US/solutions/ns340/ns414/ns742/ns744/landing_DesignZone_TrustSec.html
Add DogTag to the SCEP RA Profiles
From the ISE administrative GUI, we will add the DogTag server to the SCEP RA Profiles
Step 1 Navigate to Administration >> System >> Certificates >> SCEP RA Profiles & Click Add
Step 2 Name the RA “DogTag” & Enter a Description
Step 3 Enter the DogTag Server URL of http://<server_name>/scepproxy.php
Step 4 Click “Test Connectivity”
Click Submit. You are finished & ready to onboard.
Thanks so much for taking the time to read my boring blog posts. I hope they are useful. Please feel free to send your comments.
Aaron Woland, CCIE No. 20113, is a Sr. Secure Access Engineer at Cisco Systems, Inc., and deploys and supports ISE and Secure Access for Cisco’s Largest Customers all over the world. Aaron is the co-author of Cisco ISE for BYOD and Secure Unified Access book (Cisco Press), and many published white papers and design guides. Aaron is one of only five members of the Hall of Fame for Distinguished Speakers at Cisco Live, and is a security columnist for Network World where he blogs on all things related to Identity. His other certifications include: Certified Ethical Hacker, MCSE, CCSP, CCNP, CCDP and many other industry certifications.