CS/IPA Implementation for Separating Default PKI Instance Creation from PKI Subsystem Packaging#
‘’’NOTE: |
While porting Dogtag from using tomcat5 (Dogtag 1.3) to tomcat6 (Dogtag 9.0), numerous changes were made to the registry model defined below. These changes are discussed in Bugzilla Bug #632425 - Port to tomcat6. |
Overview#
Implementation of the reviewed design has been captured in the following Bugzilla Bugs:
Bugzilla Bug #529070 - rpm packaging problems (cannot reinstall correctly)
Bugzilla Bug #547471 - Apply PKI SELinux changes to PKI registry model
Bugzilla Bug #553072 - Apply “registry” logic to pki-kra . . .
Bugzilla Bug #553074 - Apply “registry” logic to pki-ocsp . . .
Bugzilla Bug #553075 - Apply “registry” logic to pki-tks . . .
Bugzilla Bug #553076 - Apply “registry” logic to pki-ra . . .
Bugzilla Bug #553078 - Apply “registry” logic to pki-tps . . .
Packages#
As documented in the Bugzilla Bugs listed in the previous section, numerous files were changed in the following packages:
pki-ca
pki-common
pki-kra
pki-ocsp
pki-ra
pki-setup
pki-silent
pki-selinux
pki-tks
pki-tps
Changes to the PKI Subsystem#
Key PKI subsystem changes include:
The PKI subsystem package contains the following new files and directories:
PKI Subsystem |
PKI Controlling Daemon Init Script |
PKI Lock Directories |
PKI Run Directories |
---|---|---|---|
CA |
/etc/rc.d /init.d/pki-cad |
/var/lock/pki/
/v
ar/lock/pki/ca/ |
/var/run/pki/
/
var/run/pki/ca/ |
DRM |
/etc/rc.d/ init.d/pki-krad |
/var/lock/pki/
/va
r/lock/pki/kra/ |
/var/run/pki/
/v
ar/run/pki/kra/ |
OCSP |
/etc/rc.d/i nit.d/pki-ocspd |
/var/lock/pki/
/var
/lock/pki/ocsp/ |
/var/run/pki/
/va
r/run/pki/ocsp/ |
RA |
/etc/rc.d /init.d/pki-rad |
/var/lock/pki/
/v
ar/lock/pki/ra/ |
/var/run/pki/
/
var/run/pki/ra/ |
TKS |
/etc/rc.d/ init.d/pki-tksd |
/var/lock/pki/
/va
r/lock/pki/tks/ |
/var/run/pki/
/v
ar/run/pki/tks/ |
TPS |
/etc/rc.d/ init.d/pki-tpsd |
/var/lock/pki/
/va
r/lock/pki/tps/ |
/var/run/pki/
/v
ar/run/pki/tps/ |
Each PKI subsystem package no longer performs a post installation of a default PKI instance. For example, since installation of the ‘pki-ca’ package no longer creates a default CA instance, one must always be installed using the ‘pkicreate’ utility. For example, to create a new CA instance called ‘pki-ca’:
and to remove this new CA instance called ‘pki-ca’:
\ **``NOTE:``**\ `` No command-line changes have been made to
The individual PKI controller daemon init scripts, for example the ‘pki-cad’ file contains the following ownership and permissions:
Each PKI controller daemon init script controls ALL new PKI instances, replacing individual legacy PKI instance ownership and control of init scripts (legacy PKI instances are still controlled by their legacy init scripts), and operate with the following syntax (e. g. - ‘pki-cad’):
\ **``NOTE:``**\ `` If no optional [instance-name] is specified, 'pki-cad' attempts to perform the specified action
\ ```see
``\ ``below
<PKI_Registry_Implementation#Changes_to_CA_Instances>`__).
The values returned by PKI controller daemon init scripts attempt to satisfy the requirements specified by the following URL:
`` [\ ```http://fedoraproject.org/wiki/FCNewInit/Initscripts
<http://fedoraproject.org/wiki/FCNewInit/Initscripts>`__| FCNewInit/Initscripts]
The PKI subsystem lock directory (e. g. - ‘/var/lock/pki/ca/’) contains the following ownership and permissions:
The PKI subsystem run directory (e. g. - ‘/var/run/pki/ca/’) contains the following ownership and permissions:
The following new PKI subsystem files and directories have been labeled by SELinux and enabled to run in enforcing mode:PKI instance creation (e. g. - CA):
Changes to PKI Instances#
Key PKI instance changes include:
Since new PKI instances must ALWAYS be created by invoking the ‘pkicreate’ utility (i. e. - default instances are no longer created by installation of the ‘pki-ca’, ‘pki-kra’, ‘pki-ocsp’, ‘pki-ra’, ‘pki-tks’, or ‘pki-tps’ packages), the usage statement was updated:
] # User ownership
] # Group ownership
] # Redirection of
] # Redirection of
] # User ownership
] # Group ownership
] # Redirection of
] # Redirection of
When installed via the ‘pkicreate’ utility, each new PKI instance now automatically generates an instance-specific “registry” entry called ‘/etc/sysconfig/pki/<pki_subsystem_name>/<instance_name>’. For example, the registry entry of the ‘pki-ca’ instance created above looks like this:
Newly created PKI instances no longer contain their own init script (e. g. - ‘/etc/rc.d/init.d/pki-ca’, ‘/etc/rc.d/init.d/pki-subca’, etc.); rather, they are controlled through the new centralized ‘/etc/rc.d/init.d/pki-cad’ init script (see above) which utilizes this new “registry” feature. Note that previously installed PKI instances should continue to be controlled through their existing init scripts (e. g. - /etc/init.d/pki-ca)
\ **``IMPORTANT:``**\ `` If a legacy PKI instance exists (e. g. - "/var/lib/pki-ca"), a new instance named 'pki-ca' may not be installed in the same location.
Newly created PKI instances contain a local shell script called /var/lib/<instance_name>/<instance_name> (rather than a legacy symlink which pointed to the instance’s init script). For example, the ‘/var/lib/pki-ca/pki-ca’ script looks like this:
Each running new PKI instance places an instance lockfile under /var/lock/pki/<pki_subsystem_name>/<instance_name>.pid. For example, ‘/var/lock/pki/ca/pki-ca.pid’ looks like this:
Each running new PKI instance places an instance pidfile under /var/run/pki/<pki_subsystem_name>/<instance_name>.pid. For example, ‘/var/run/pki/ca/pki-ca.pid’ looks like this:
The following new PKI instance locations have been labeled by SELinux and enabled to run in enforcing mode: