EJBCA – Internal Architecture

Updated on October 16, 2025

Internal Architecture

For developers and other interested parties, the following diagrams show an outline of the internal architecture of EJBCA, and dependencies between different modules.

Model View Controller Design

All the web modules are packaged as Web Archives (WAR) and packaged inside an Enterprise Archive (EAR) together with EJB modules for business logic, code for mapping Java objects to database rows and additional libraries need by the application that isn’t provided by the application server.

Sample Flow

Let’s say you run the pkcs10 ClientToolBox command, on a system with an RA and a CA, where the RA responds to WebService (SOAP) requests.

The flow would then start from PKCS10ReqCommand in ClientToolBox and finally reach X509CAImpl.generateCertificate, where the certificate is actually generated. The following displays an overview of how the call would flow between classes:

EJBCA Module Descriptions

This is a list of all modules in the modules directory. Unit tests directories (src-test) are excluded from this list.

Color key: WAR/RAR FILESEJB STATELESS SESSION BEANSENTITY BEANS, and STANDALONE APPLICATION.

ModuleBuild artifacts, by source directoryEditionDescription
acmesrc: JAR file with implementationEnterpriseACME protocol (RFC 8555) service.
SRC-COMMON: WAR FILE
admin-guiSRC: WAR FILEAdmin Web interface.
appserver-extsrc: Two JAR files with log classesApp server “extensions”. Currently, it contains classes that extend log4j.
batchenrollment-guiSRC: STANDALONE APPLICATIONA GUI application to mass enroll certificates.
caasrc: JAR file with implementationEnterpriseCertification Authority Authorization (RFC 6844) validation.
SRC-CLI: STANDALONE APPLICATION
certificatestoreSRC: WAR FILEThe certificate store servlet, allowing certificates to be downloaded.
cesecore-commonsrc: Common classes JARCommon classes for the CESeCore framework.
cesecore-cvcasrc: JAR file with implementationImplementation of CVC CA. Excluded in RA-only and VA-only builds.
cesecore-ejbSRC: EJB SSBSImplementations of CESeCore Statless Session Beans.
cesecore-ejb-interfaceSRC: EJB SSB INTERFACESInterfaces for cesecore-ejb
cesecore-entitySRC: JAR FILE WITH ENTITY CLASSESEntity classes for the CESeCore framework. These correspond to tables in the database.
cesecore-p11src: JAR fileSecurity fix for old versions of the SunPKCS11 implementation.
cesecore-x509casrc: JAR file with implementationImplementation of X509CA. Excluded in RA-only and VA-only builds.
clearcache-warSRC: WAR FILEWAR file that allows clearing caches by an HTTP request from localhost.
clientToolBoxSRC: STANDALONE APPLICATIONCommand line utility to manage HSM keys, send Web Service requests, run stress test, etc.
cli-utilsrc: JAR file with common classesCommon classes shared by the command line utilities in EJBCA.
cmpclientSRC: STANDALONE APPLICATIONEnterpriseCommand line CMP client.
cmpProxySRC: STANDALONE WAR FILE (HTTP OR TCP)EnterpriseStandaone WAR file.
commonNo build artifactDefault log4j configuration for CLI utilities and tests.
configdumpSRC-CLI: STANDALONE APPLICATIONEnterpriseConfigdump lets you export a YAML file of your EJBCA configuration. Certificates or keys are not exported.
src-common: JAR file with interfaces
SRC-EJB: EJB SSBS
crlstoreSRC: WAR FILEThe CRL store servlet. It allows CRLs to be downloaded.
ctsrc: JAR with implementation and OCSP extensionEnterpriseCertificate Transparency (RFC 6962) submission.
editition-specificSRC-EJB: EJB SSBS (placeholders for CE)Interfaces and placeholders for Enterprise Edition specific functionality.
SRC-INTERFACE: EJB SSB INTERFACES
editition-specific-eeSRC-EJB: EJB SSBS (actual implementations)EnterpriseEnterprise Edition only EJBs.
ejbca-cmp-tcpSRC: WAR FILECMP TCP server. Runs inside the app server if configured.
ejbca-cmp-warSRC: WAR FILECMP HTTP interface. Contains a servlet.
ejbca-commonsrc: JAR file with utility classesUtility classes specific to EJBCA, and not used in other products that use CESeCore.
ejbca-common-websrc: JAR file with utility classesUtility classes that are specific to the EJBCA web interfaces.
ejbca-ejbSRC: EJB SSBSImplementations of EJBCA specific Stateless Session Beans.
ejbca-ejb-cliSRC: STANDALONE APPLICATIONCommand line utility to operate EJBCA via the Remote EJB interface.
ejbca-ejb-interfaceSRC: EJB SSB INTERFACESInterfaces for ejbca-ejb.
ejbca-entitySRC: JAR FILE WITH ENTITY CLASSESEntity classes specific to EJBCA. These correspond to tables in the database.
SRC-CLI: STANDALONE APPLICATION (EJBCA-DB-CLI.JAR)EnterpriseDatabase CLI tool for migrating between databases and for handling database protection.
ejbca-propertiesJAR file with propertiesThe properties files from conf/, conf/plugins/ and src/upgrade/
ejbca-renew-warSRC: WAR FILESelf-service certificate renewal in public web.
ejbca-rest-apiSRC: WAR FILEEnterpriseWAR with entry point for the REST API.
ejbca-rest-*src: JAR file with REST ResourceEnterpriseREST Resource for different parts of the API (common, camanagement, cryptotoken).
ejbca-scep-warSRC: WAR FILESCEP protocol for creating and renewing certificate.
ejbca-webdist-warSRC: WAR FILECertDistServlet which implements download of certificates and CRL.
ejbca-webtestNo build artifactThis module contains Selenium tests for the AdminWeb, PublicWeb and RA Web.
ejbca-wssrc: JAR files with interface and implementationThis is the module for the WebService (SOAP) interface.
ejbca-ws-clisrc: JAR files with WS module of ClientToolBoxThis module is included in ClientToolBox, and provides a WebService (SOAP) client.
estSRC-WAR: WAR FILEEnterpriseProvides an EST protocol interface to EJBCA.
externalrasrc: JAR files for client and serviceEnterpriseThe ExternalRA is a legacy module for running an external Registration Authority. It consists of a service built into EJBCA, and an external web GUI.
SRC: STANDALONE APPLICATION (EXTERNALRA-CLI.JAR)
externalra-guiSRC: WAR FILEEnterpriseThe web GUI part of ExternalRA, to be deployed on a remote server.
externalra-scepSRC: STANDALONE APPLICATIONEnterpriseSCEP client for ExternalRA.
healthcheck-warSRC: WAR FILEProvides a Health Check URL to check CA status.
oldlogexport-cliSRC: STANDALONE APPLICATIONTool to export legacy LogEntryData database table to a file.
peerconnectorsrc-cli: JAR files with subcommands for ejbca-ejb-cliEnterpriseModule for handling peer connections, such as CA-RA or CA-VA.
src-common: JAR file with common classes
SRC-EJB: EJB SSBS
SRC-INTERFACE: EJB SSB INTERFACE
src-publ: JAR file with classes for handling peer publisher communication
src-ra: JAR file with classes for handling RA peer communication
SRC-RAR: RAR FILE
SRC-WAR: WAR FILE
plugins-eesrc: JAR fileExtra plugins, such as Publishers, included in Enterprise Edition only.
publicweb-guiSRC: WAR FILEThe EJBCA Public Web pages (/ejbca/ URL).
ra-guiSRC: WAR FILEThe EJBCA RA Web pages (/ejbca/ra/ URL).
statedumpSRC-CLI: STANDALONE APPLICATIONInternalStatedump is a PrimeKey internal tool, not included in EJBCA releases. It is the predecessor of Configdump.
src-common: JAR file with common classes
SRC-EJB: EJB SSB
systemtestsSRC: EJB SSBSContains functional tests of EJBCA. These require an app server to be running.

 

The EJBs provide additional Remote EJB access that is required by the test, and are only built into the app server when productionmode is set to false.

SRC-INTERFACE: EJB SSB INTERFACES
unidfnrSRC-EJB: EJB SSB AND ENTITYEnterpriseUNID-FNR allows authenticated OCSP clients to obtain personal information from a certificate identifier.
vaSRC-WAR: WAR FILEOCSP responder servlet.
validationtoolSRC: STANDALONE APPLICATIONEnterpriseCommand line application for validating certificates.

EJB Stateless Session Beans Dependencies

The following diagram shows the internal relations between the Stateless Session Beans as they are injected. An updated version of this diagram can be generated by running “ant gen-depgraph” on a machine where the “dot” application is available.

Database Diagram

This is generated with MySQL / MariaDB Workbench, by using the Tools → Reverse Engineer tool and then selecting Arrange → Autolayout.

  1. Model View Controller Design
  2. Sample Flow
  3. EJBCA Module Descriptions
  4. EJB Stateless Session Beans Dependencies
  5. Database Diagram