Certificate Discovery

Introduction

Digital certificates have a limited validity period. In most cases they are rendered useless once they expire. As a consequence, services that rely upon those certificates do not function properly, or go completely out of service. Several similar incidents have been observed in the past. Therefore, a reliable mechanism to locate and manage such certificates is necessary to avoid such situations. Additionally, keeping track of all certificates in a system and/or infrastructure is beneficial, because it allows to locate mis-issued certificates. It is also possible to enforce policies in an easier manner, tied to cryptographic mechanisms or other aspects of certificates.

MTG Certificate Lifecycle Manager

The MTG Certificate Lifecycle Manager (MTG CLM) consists of two components, amongst others. The server and the clients. The server is the standard MTG CLM application which is the central component of the MTG ERS system. For an illustration of the graphical interface of this component, see Figure 1. This component also provides a REST-API that can be securely accessed by authenticated and authorised clients.

ra
Figure 1. MTG CLM

The clients are the so-called ERS CLI (Command Line Interface) clients. A CLI client is a program that consumes the REST-API of CLM. This CLI-client is able to log in to CLM and request a certificate. Additionally, it can scan certain ports or port ranges of several other systems located near its network. This can be configured on the command-line interface of the system where an ers client is installed. The installation of an ers client uses typical mechanisms of modern operating systems like rpm or debian packages, or exe files and contains all its dependencies without depending on other resources. Examples to configure the servers, IPs, and ports to scan can be found below:

Configure ers CLI to scan standard ports of the server mail.example.com.
ers discover --servers mail.example.com
Configure ers CLI to scan standard ports of the server mail.example.com and web.example.com at ports 8443 and 9443.
ers discover --servers "mail.example.com,web.example.com" --ports "8443,9443"
Configure ers CLI to additionally scan ports of server server1.example.com in the port range 8000 to 9000 and port 9443.
ers discover --servers server1.example.com --ports "8000-9000,9443"
Configure ers CLI to scan ports of an IP subnet in the port range 8000 to 9000
ers discover --ips 198.51.100.0/24 --ports "8000-9000"

Consecutive calls of ers discover lead to adding additional servers or re-configuring the ports to scan. The standard ports where the CLI client scans are shown below:

Table 1. Standard scan ports
Service Port

WEB

443

SMTP

465

LDAP

636

DNS

853

FTP

989

FTP

990

Telnet

992

IMAP

993

POP

995

To scan the configured servers and ports, execute:

Scan ports
ers scan

In most cases the command ers scan is placed in a crontab statement with the desired execution time.

When the ers client scans, it tries to establish a TLS connection to the specified server and ports. If it succeeds into establishing a TLS connection it downloads the certificates of the server and pushes them to the CLM component along with some metadata, via a call to the REST-API. The CLM verifies the identity of the client and stores the certificates and metadata into its database. Below is a simplified UML sequence diagram of the calls, responsibilities, and involved systems:

seqdia
Figure 2. Simplified sequence diagram

Imported certificates and metadata are administered by the application. Examples of metadata is the URL and port where the certificates have been discovered. Typical administration tasks are:

  1. Send notifications of about-to-expire certificates

  2. Search certificates according to their metadata

  3. Search certificates according to their data

  4. Display statistics (see charts below)

ra
Figure 3. First example of illustration of discovered certificates.
ra
Figure 4. Second example of illustration of discovered certificates.

All CLI clients can be seen and managed in the GUI of CLM.

Planned features

The CLI client can scan the local filesystems on which it is installed, to locate files with known formats like PEM, DER, PKCS12, JKS, or JCEKS. When such files are discovered, these files and/or location and metadata are pushed to CLM. The CLM then, administers this information.