Skip to content

Host Certificate AutoEnrollment

CERN Host Certificate AutoEnrollment and AutoRenewal

CERN Certification Authority (CERN CA) issues host certificates for systems installed on CERN network. This document describes an automated method allowing unattended host certificate installation and automatic renewal.

Software installation

As root on your system run:

# /usr/bin/yum install cern-get-certificate

above command will install required software and its dependencies on your SLC5, SLC6 or CC7 system.


Please review the content of the configuration file: /etc/sysconfig/cern-get-certificate, default settings should be appropriate in most cases.

# Configuration file for cern-get-certificate

# private path for certificate key file - default: /etc/pki/tls/private/

# path for storing certificate file - default: /etc/pki/tls/certs/

# ownership of certificate files - use numeric IDs
# uid - default 0 (root)
# gid - default 0 (root)

# perform autorenewal
# NOTE: if a service using the certificate is running
# at the time renewal happens it should be most likely
# restarted after - this can be done using autorenewexec
# option below

#autorenewexec="/sbin/service httpd reload"

# renew if validity shorter than X days - default: 7

# keytab for host authentication

See man cern-get-certificate for more information.


In order to enable autoenrollment and obtain the host certificate, your system must be configured in CERN standard way, namely cern-get-keytab should be executed in order to obtain host Kerberos credentials before cern-get-certificate is run.

In order to activate, please run as root:

# /usr/sbin/cern-get-certificate --autoenroll [ --grid ]
Above command will enable AutoEnrollment on the CERN CA service, issue an certificate signing request (CSR) and use the CSR to obtain, and store, host certificate from CERN CA (or Grid host certificate when --grid option is specified).

You may check the status by running as root:

# /usr/sbin/cern-get-certificate --status [ --grid ]
which will produce an output similar to the one below:
cert private key file  : present (/etc/pki/tls/private/
cert PEM file          : present (/etc/pki/tls/certs/
cert DER file          : present (/etc/pki/tls/certs/
cert days until expiry : 729
cron autorenewal status: enabled
cron autorenewal days  : 7
cron exec on autorenew : disabled
cert validity (OCSP)   : valid
autoenrollment status  : enabled
In order to renew the certificate, run as root:
# /usr/sbin/cern-get-certificate --renew [ -- force ]
In order to disable the autoenrollment and autorenewal, run as root:
# /usr/sbin/cern-get-certificate --noautoenroll

Known limitations

  • At present only CERN Host Certificates can be obtained using this method, Grid Host Certificates must be obtained directly from CERN CA. (Grid Host Certificates can be obtained too starting Feb 26 2015)
  • Certificates can be obtained only for physical/virtual systems, not for DNS-aliases.
  • Certificate files names are fixed to be in form* (but the actual location and ownership of files is configurable)

More information

Please visit: Certificates Autoenrollment documentation page.


# /usr/sbin/cern-get-certificate --help
# man cern-get-certificate