13.6. Customizing Web Services
All of the subsystems (with the exception of the TKS) have some kind of a web-based services page for agents and some for other roles, like administrators or end entities. These web-based services pages use basic HTML and JavaScript, which can be customized to use different colors, logos, and other design elements to fit in with an existing site or intranet.
13.6.1. Customizing Subsystem Web Applications
Each PKI subsystem has a corresponding web application, which contains:
- HTML pages containing texts, JavaScript codes, page layout, CSS formatting, and so on
- A
web.xml
file, which defines servlets, paths, security constraints, and other - Links to PKI libraries.
The subsystem web applications are deployed using context files located in the
/var/lib/pki/pki-tomcat/conf/Catalina/localhost/
direcotry, for example, the ca.xml
file:
<Context docBase="/usr/share/pki/ca/webapps/ca" crossContext="true" allowLinking="true"> ... </Context>
The
docBase
points to the location of the default web application directory, /usr/share/pki/
.
To customize the web application, copy the web application directory into the instance's
webapps
directory:
$ cp -r /usr/share/pki/ca/webapps/ca /var/lib/pki/pki-tomcat/webapps
Then change the
docBase
to point to the custom web application directory relative from the webapps
directory:
<Context docBase="ca" crossContext="true" allowLinking="true"> ... </Context>
The change will be effective immediately without the need to restart the server.
To remove the custom web application, simply revert the
docBase
and delete the custom web application directory:
$ rm -rf /var/lib/pki/pki-tomcat/webapps/ca
13.6.2. Customizing the Web UI Theme
The subsystem web applications in the same instance share the same theme, which contains:
- CSS files, which determine the global appearance
- Image files including logo, icons, and other
- Branding properties, which determine the page title, logo link, title color, and other.
The Web UI theme is deployed using the
pki.xml
context file in the /var/lib/pki/pki-tomcat/conf/Catalina/localhost/
directory:
<Context docBase="/usr/share/pki/common-ui" crossContext="true" allowLinking="true"> ... </Context>
The docBase points to the location of the default theme directory,
/usr/share/pki/
.
To customize the theme, copy the default theme directory into the
pki
directory in the instance's webapps
directory:
$ cp -r /usr/share/pki/common-ui /var/lib/pki/pki-tomcat/webapps/pki
Then change the
docBase
to point to the custom theme directory relative from the webapps
directory:
<Context docBase="pki" crossContext="true" allowLinking="true"> ... </Context>
The change will be effective immediately without the need to restart the server.
To remove the custom theme, simply revert the
docBase
and delete the custom theme directory:
$ rm -rf /var/lib/pki/pki-tomcat/webapps/pki
13.6.3. Customizing TPS Token State Labels
The default token state labels are stored in the
/usr/share/pki/tps/conf/token-states.properties
file and described in Section 2.5.2.4.1.4, “Token State and Transition Labels”.
To customize the labels, copy the file into the instance directory:
$ cp /usr/share/pki/tps/conf/token-states.properties /var/lib/pki/pki-tomcat/tps/conf
The change will be effective immediately without the need to restart the server.
To remove the customized labels, simply delete the customized file:
$ rm /var/lib/pki/pki-tomcat/tps/conf/token-states.properties