Deploying Build Files

emCA

This section describes the procedure for configuring the environment variables required for emCA.

Configuration

Note: All actions required for setting up and configuring emCA should be done using administrator privileges.

Environment Variables

For emCA.properties

In emCA application deployment, the configuration of properties file is done through environment variables. In this case, the user has to place the emCA.properties file on the server and make a note of the location of properties file. The same path needs to be provided during environment variables configuration. This file is used to configure database, logs and truststore.

Following is the procedure for configuring emCA.properties file in environment variables. The same Variable Name that is defined below has to be used during configuration.

Variable name: EMCA_CONFIGURATION_PATH

Variable value: location of property files (emCA.properties)

For Windows

Go to Advanced System Settings -> Click on Environment Variables -> Click on New; then Enter the following as shown below figure

Variable name: EMCA_CONFIGURATION_PATH

Variable value: location of property files (emCA.properties)

It is recommended to restart the system after setting the environment variables

For Linux

For setting environment variables in Linux run the following command

sudo -H gedit /etc/environment

It will open the environment folder and set the emCA core path inside the folder.

EMCA _CONFIGURATION_PATH for emCA.properties file

Once the Environment variable is set for emCA.properties, the user can open the emCA.properties to configure various options which include configuring of database as well as logs.

It is recommended to restart the system after setting the environment variables.

Snapshot

Please find below is the emCA.properties file snapshot along with description of properties:

Database

Open the emCA.properties file and based on the type of database used; the corresponding values need to be updated. Please find the below sample Database configuration provided for MySQL database.

Example: for #MySQL database, use the below-mentioned values in the table:

hibernate.dialect

[DialectInfo] refers to Dialect information

org.hibernate.dialect.MySQLDialect

jdbc.driver.class.name

[DriverClassName] refers to Driver class name

com.mysql.jdbc.Driver

jdbc.url

[URL] refers to Database URL

jdbc:mysql://127.0.0.1:3306/emca

jdbc.application.username

[UserName] refers to UserName who has access to this schema

root

jdbc.application.password

[Password] refers to Password for the user

nNh0bStJeJxo3eu3taSY2Q==

Logs

In the emCA.properties file also configure the logs path for capturing events. Provide the log file path to capture logs.

Note: If java.util.logging.FileHandler is not configured then application logs will not be generated.

Deployment

The following component is required for deployment:

emCA application (emCA.war file)

emCA application package is provided as a war file which has to be deployed on the application server. Please configure and save all the properties in the file defined in section –‘For emCA.properties’ under Environment Variables

Please find the following steps to deploy the application:

  • Copy the emCA.war inside Tomcat->Web apps folder apache-tomcat-7.0.37\webapps.

  • Windows run services.msc.

  • Select the service name Apache Tomcat and Click Start.

Quick Check Guide

To verify if the application has been successfully deployed, please follow the below steps:

Once deployment is completed and server is started, open any browser like IE, Google Chrome, Firefox etc. and enter URL - https://www.example.com/emCA/login.htm

emCA login page should be displayed as shown below

After successful deployment of the emCA application, check if all the Tables have been created in the specified schema in the database.

Also, check for log file generation in the path mentioned (Configuration->Log Properties).

NOTE:

java.util.logging.FileHandler.pattern = <LogFolderPath>//emca_debug.log

A log file should have been generated in the above-mentioned path.

emCA API

This section provides the procedure for emCA API deployment and configuration. emCA API (emcaServices) provides an open API (Application Programming Interface) for integrating certificate services with third-party applications and devices. emCA API supports REST in JSON format. emCA APIs are light weight and flexible.

Requirement

  • emcaServices.war package

Deploy WAR

  • Copy emcaServices.war to <APP_SERVER>/webapps/

  • Configure EMCA_CONFIGURATION_PATH

  • Define datasource or JNDI for API database access

Start Service

  • Restart application server

  • Verify endpoint availability at https://<host>:<port>/emCA/api/health

Authentication & Transport

  • All endpoints require TLS

  • Use token-based authentication in HTTP headers

Supported REST Methods

CA Management:

GET

getKeyProfiles

POST

createCA

POST

createCSR

POST

importCertificate

POST

createOrUpdateCRLProfile

POST

createOrUpdateCRL

POST

getCRL

GET

getCRL

POST

revoke/suspend

POST

reinstateCA

POST

createOrUpdateUserProfile

POST

createUserCertificate

Certificate Management:

POST

getJwt-token

POST

createCertificate

POST

createCertificates

POST

createCustomCertificate

POST

createKeyStore

POST

rekey

POST

regenerateKeyStore

POST

revoke

POST

suspend

POST

reinstate

POST

getCertificate

POST

getProfiles

POST

getProfileInfo

POST

getCertInfo

POST

getCertCount

POST

getExpiringSoonCertInfo

POST

getCAs

POST

getCertificateChain

GET

getCAs

GET

getCertificateChain

GET

getProfileInfo

GET

getProfiles

GET

getCertificate

Configuration

Note: All actions required for setting up and configuring emCA should be done using administrator privileges.

Environment Variables

Application.properties

This file is used to configure database-related properties like dialect, driver class name, URL, Username, password (database user should have full privilege to the schema created for emCA application) as well as logs.

For Windows

Configure the property file path in environment variables as shown in below figure .

Variable name: EMCA_SERVICES_CONFIGURATION_PATH

Variable value: location of property files (application.properties)

For Linux

For setting environment variable in Linux, run following command.

sudo -H gedit /etc/environment

It will open the environment folder and set the emCA and emCA Services path inside the folder.

EMCA_SERVICES_CONFIGURATION_PATH for application.properties file as shown in the below figure.

Once the Environment variable is set for application.properties, the user can open the application.properties to configure various options which includes configuring of database as well as logs.

Snapshot

Application.properties file snapshot for reference:

Database

Open the application.properties file and based on the type of database used; the corresponding values need to be updated. Please find below a sample Database configuration provided for MySQL database.

Example: for #MySQL database, use below mentioned values in the table:

#Hibernate properties:

Parameter

Description

Values to be replaced

spring.jpa.properties.hibernate.dialect

[DialectInfo] refers to Dialect information

org.hibernate.dialect.MySQL5Dialect

spring.datasource.driver.class.name

[DriverClassName] refers to Driver class name

com.mysql.jdbc.Driver

spring.datasource.url

[URL] refers to Database URL

jdbc:mysql://127.0.0.1:3306/emca

spring.datasource.username

[UserName] refers to UserName who has access to this schema

Root

spring.datasource.password

[Password] refers to Password for the user ( Refer Section 6)

nNh0bStJeJxo3eu3taSY2Q==

Ex:

#MySQL

DialectInfo= “org.hibernate.dialect.MySQLDialect”

DriverClassName=” com.mysql.jdbc.Driver”

URL= “jdbc:mysql://<127.0.0.1:3306>/ emca”

UserName=”root”

Password=”root”

Note: The same schema which is used for the emCA application should be used for the emCA API as well

Logs

The application uses Log4j for logging. Please specify the local server path for collecting the logs in the log4j.xml file. The local server path of the log4j.xml file needs to be provided in the application.properties file which is set in the environment variables

Log4J XML file as shown below:

In the above LOCAL SERVER PATH, the administrator has to provide folder path where in the log files get generated.

Deployment

The following component is required for deployment:

emCAServices.war

emCAServices comes as a war file that has to be deployed on the application server. Server provides configuration through the properties file.

Please configure and save all the properties defined in the properties file. Then deploy the configured emCAServices war file.

Please find below the steps to deploy the application:

  • Copy the emcaServices war inside Tomcat ->Web apps folder apache-tomcat-7.0.37\webapps.

  • Windows run services.msc.

  • Select the service Apache Tomcat and click start.

Quick Check Guide

Once deployment is completed and the server is started, Open any browser like Internet Explorer, Google Chrome, Firefox, etc. and enter the URL- https:/www.example.com/emcaServices

Example: https://www.example.com/emCAServices in the enter address field

The following message will be displayed as shown below.

OCSP Core

This section provides the step by step guide for installation, configuration, and usage of OCSP Core. Online Certificate Status Protocol (OCSP) is an Internet protocol used for obtaining the revocation status of an X.509 digital certificate. An OCSP responder (a server typically run by the certificate issuer) may return a signed response signifying that the certificate specified in the request is 'good', 'revoked', or 'unknown'.

Configuration

Note: All actions required for setting up and configuring OCSP Core should be done using administrator privileges.

Environment Variables

For ocspcore.properties

This file is used to configure database related properties like dialect, driver class name, URL, Username, password (database user should have full privilege to the schema created for emCA application) as well as logs.

For Linux

For setting environment variable in Linux run following command

sudo -H gedit /etc/environment

It will open environment folder and set OCSP Core path inside that

OCSPCORE_CONFIGURATION_PATH for ocspcore.properties file as shown in below figure

Once the Environment variable is set for ocspcore.properties, the user can open the ocspcore.properties to configure various options which includes configuring of database as well as logs.

Snapshot

Please find the below ocspcore.properties file snapshot for reference:

Database

ocspcore.properties file is used to configure database related properties where we can configure database properties like dialect, driver class name, URL, Username, password (database user should have full privilege to the schema created for OCSP).

Open the ocspcore.properties file and change the below DB configuration:

Parameter

Description

hibernate.dialect

[DialectInfo] refers to Dialect information

datasource.driver.class.name

[DriverClassName] refers to Driver class name

datasource.url

[URL] refers to Database URL

datasource.database.name

[databaseName] default/ common name

datasource.username

[UserName] refers to UserName who has access to this schema

datasource.password

[Password] refers to Password for the user ( Refer Section 6)

Note: Default values in the configuration file will be used if it’s not changed as per the requirement. Please configure as per your requirement.

OCSP Responder will connect with the same schema which is connected to the emCA Application

Logs

The application uses Log4j for logging. Please specify the local server path for collecting the logs in the log4j.xml file. The local server path of log4j.xml file need to be provided in ocspcore.properties file which is set in the environment variables [please refer section 6.3.1.1]

Log4J XML file as shown below:

In the above LOCAL SERVER PATH, the administrator has to provide a folder path where in the log files get generated.

Deployment

The following component is required for deployment:

OCSP CORE(ocsprespondercore.war file)

OCSPCORE comes as a war file which has to be deployed on the application server. Server provides configuration through properties file.

Please configure and save all the properties defined in the properties file defined in section -‘(B) For ocspcore.properties’ under section 5.6.1.1. Environment Variables.

Then deploy the configured OCSP Core war file.

Please find below steps to deploy the application:

  • Copy the ocsprespondercore.war inside Tomcat ->Web apps folder apache-tomcat\webapps

  • Windows run services.msc

  • Select Apache Tomcat and click Start

Quick Check Guide

Once deployment is successfully done and the server is started, Open any browser like Internet Explorer, Google Chrome, Firefox etc. and enter URL- as mentioned below

https://www.example.com/ocsprespondercore in enter address field place (For ex: https:// 127.0.0.1:8080/ocsprespondercore)

The following message is displayed. This implies that the application is deployed properly.

“HTTP Status 405 - OCSP only supports POST”.

To verify whether logs are getting generated as per the path defined, please open the folder that is mentioned in the configuration path set in log4j.xml file (Configuration->log4j.xml).

Please make sure that the log file is created in the above-mentioned path.

OCSP Responder Web

This section provides step by step guide for installation, configuration and usage of OCSP Web. This is generally deployed in the DMZ for external applications to interface. OCSP Web will in turn interfaces with OCSP Core that is deployed in the MZ where in only selected internal application will have access to it.

Configuration

Environment Variables - For ocspweb.properties

This file is used to configure logs.

For Linux

For setting the environment variable in Linux, run following command:

sudo -H gedit /etc/environment

It will open environment folder and set OCSP Web path inside that

OCSPWEB_CONFIGURATION_PATH for ocspweb.properties file as shown in below figure

Once the Environment variable is set for ocspweb.properties, the user can open the ocspweb.properties to configure logs.

Snapshot

Please find below is the ocspweb.properties file snapshot for reference:

Connection

OCSP Web has to connect to OCSP Core for passing the requests received by OCSP Web to OCSP Core. For connecting to OCSP Core, in the properties file as shown below

Logs

The application uses Log4j for logging. Please specify the local server path for collecting the logs in the log4j.xml file. The local server path of log4j.xml file need to be provided in ocspweb.properties file which is set in the environment variables [please refer section 6.4.1.1]

Log4J XML file as shown below:

In the above LOCAL SERVER PATH, the administrator has to provide folder path where in the log files get generated.

Deployment

The following components are required for deployment:

OCSP Web (ocspresponderweb.war file)

OCSP Web comes as a war file which has to be deployed on the application server. Server provides configuration through properties file.

Please configure and save all the properties. Then deploy the configured OCSP Web war file.

Please find below steps to deploy the application:

  • Copy the ocspresponderweb.war inside Tomcat->Web apps folder apache-tomcat\webapps

  • Windows run services.msc

  • Go to Apache Tomcat and click Start

Quick Check Guide

Once deployment is successfully done and the server is started, Open any browser like internet explorer, Google Chrome, Firefox etc. and enter URL- as mentioned below

https://www.example.com/ocspresponderweb in enter address field place (For ex: https:// 127.0.0.1:8080/ocspresponderweb)

The following message is displayed. This implies that the application is deployed properly.

“HTTP Status 405 - OCSP only supports POST”.

To verify whether logs are getting generated as per the path defined, please open the folder that is mentioned in the configuration path set in log4j.xml file (Configuration->log4j.xml)

Please make sure that the log file is created in the above-mentioned path.

TSA Core

This section provides step by step guide for installation, configuration, and usage of TSA Core. TSA Core including (emTSA and eTSA) is used for timestamping the requests received. And also help in managing timestamping Signers as well as keys.

Configuration

Note: All actions required for setting up and configuring TSA Core should be done using administrator privileges

Environment Variables For tsacore.properties

This file is used to configure database related properties like dialect, driver class name, URL, Username, password (database user should have full privilege to the schema created for TSA application) as well as logs.

For Linux

For setting the environment variable in Linux, run the following command.

sudo -H gedit /etc/environment

It will open environment folder and set TSA Core path inside that

TSACORE_CONFIGURATION_PATH for tsacore.properties file as shown in below figure

Once the Environment variable is set for tsacore.properties, the user can open the tsacore.properties to configure various options which includes configuring of database as well as logs.

Snapshot

Please find below is the tsacore.properties file snapshot for reference:

Database

tsacore.properties file is used to configure database related properties where we can configure database properties like dialect, driver class name, URL, Username, password (database user should have full privilege to the schema created for TSA).

Open the tsacore.properties file and change the below DB configuration:

Parameter

Description

hibernate.dialect

[DialectInfo] refers to Dialect information

jdbc.driver.class.name

[DriverClassName] refers to Driver class name

jdbc.url

[URL] refers to Database URL

jdbc.username

[UserName] refers to UserName who has access to this schema

jdbc.password

[Password] refers to Password for the user ( Refer Section 6)

Logs

The application uses Log4j for logging. Please specify the local server path for collecting the logs in the log4j.xml file. The local server path of log4j.xml file need to be provided in tsacore.properties file which is set in the environment variables

Log4J XML file as shown below:

In the above LOCAL SERVER PATH, the administrator has to provide folder path where in the log files get generated.

Deployment

The following component is required for deployment:

TSA CORE(emTSA.war and eTSA.war file)

TSA CORE comes as 2 war files which has to be deployed on the application server. Server provides configuration through properties file.

Please configure and save all the properties defined in section - ‘(B) For tsacore.properties’ under section 5.8.1.1. Environment Variables. Then deploy the configured TSA Core war file.

Please find below steps to deploy the application:

  • Copy the eTSA.war inside Tomcat ->Web apps folder apache-tomcat\webapps

  • Windows run services.msc

  • Go to Apache Tomcat and Click start

Quick Check Guide

Once deployment is successfully done and the server is started, Open any browser like internet explorer, Google Chrome, Firefox etc. and enter URL- as mentioned below

https://www.example.com/eTSA in enter address field place (For ex: https:// 127.0.0.1:8080/eTSA)

The TSA Login page will be displayed.

To verify whether logs are getting generated as per the path defined, please open the folder that is mentioned in the configuration path set in log4j.xml file (Configuration->log4j.xml)

Please make sure that the log file is created in the above-mentioned path.

TSA Web

This section provides step by step guide for the installation, configuration, and usage of TSA Web. This is generally deployed in the DMZ for external applications to interface. TSA Web will in turn interface with TSA Core that is deployed in the Militarized Zone/ Trusted Zone where in only selected internal applications will have access to it.

Configuration

Note: All actions required for setting up and configuring TSA Web should be done using administrator privileges.

Environment Variables For tsaweb.properties

This file is used to configure connections with TSA Core as well as logs.

For Linux

For setting the environment variable in Linux, run the following command.

sudo -H gedit /etc/environment

It will open environment folder and set TSA Web path inside that

TSAWEB_CONFIGURATION_PATH for tsaweb.properties file as shown in below figure

Once the Environment variable is set for tsaweb.properties, the user can open the tsaweb.properties to configure various options which includes configuring of connection to TSA Core well as logs.

Snapshot

For your reference, we have attached a snapshot of the tsaweb.properties file below:

Connection

TSA Web has to connect to TSA Core for passing the requests received by TSA Web to TSA Core. For connecting to TSA Core, in the properties file as shown below

Logs

The application uses Log4j for logging. Please specify the local server path for collecting the logs in the log4j.xml file. The local server path of log4j.xml file need to be provided in tsaweb.properties file which is set in the environment variables [please refer section 6.6.1.1]

Log4J XML file as shown below:

In the above LOCAL SERVER PATH, the administrator has to provide folder path where in the log files get generated.

Deployment

Following components are required for deployment:

TSA Web(WebTSA.war file)

TSA Web comes as a war file which has to be deployed on the application server. Server provides configuration through properties file.

Please configure and save all the properties defined in section - ‘(B) For tsaweb.properties’ under section 5.9.1.1. Environment Variables. Then deploy the configured TSA Core war file.

Please find below steps to deploy the application:

  • Copy the WebTSA.war inside Tomcat->Web apps folder apache-tomcat\webapps

  • Windows run services.msc

  • Go to Apache Tomcat and click Start

Quick Check Guide

Once deployment is successfully done and the server is started, Open any browser like internet explorer, Google Chrome, Firefox etc. and enter URL- as mentioned below

https://www.example.com/WebTSA in enter address field place (For ex: https:// 127.0.0.1:8080/WebTSA)

Following page is displayed . This implies that the application is deployed properly.

To verify whether logs are getting generated as per the path defined, please open the folder that is mentioned in the configuration path set in log4j.xml file (Configuration->log4j.xml)

Please make sure that the log file is created in the above-mentioned path.

Schedular

This section provides a step-by-step guide to installing, configuring, and using the Scheduler.

Configuration

Note – all actions required for setting up and configuring emCA Scheduler should be done using administrator privileges

Environment Variables For scheduler.properties

This file is used to configure database related properties like dialect, driver class name, URL, Username, password (database user should have full privilege to the schema created for emCAScheduler) as well as logs.

Variable name: EMCA_SCHEDULER_CONFIGURATION_PATH

Variable value: location of property files (scheduler.properties)

For Linux

For setting the environment variable in Linux, run the following command.

sudo -H gedit /etc/environment

It will open the environment folder and set emCAScheduler path inside that

EMCA_SCHEDULER_CONFIGURATION_PATH for scheduler.properties file .

Once the Environment variable is set for scheduler.properties, the user can open the scheduler.properties to configure various options which includes configuring of connection to emCASheduler well as logs.

Snapshot

Please find below is the scheduler.properties file snapshot for reference:

Deployment

The following component is required for deployment.

emCAScheduler.bat

emCAScheduler comes as a .bat file which has to run and provide configuration through properties file.

Please configure and save all the properties defined in section –‘(B) For scheduler.properties’. Environment Variables. Then run the emCASchedule .bat file.

Please find below steps to run the scheduler in windows:

Copy the emCAScheduler.bat inside C:\emCA

run emCAScheduler.bat you will get the window as given below:

For scheduling task or emCAScheduler follow the steps given below :

  1. Go to start in windows → search for Task Scheduler and open it as shown below

  1. Click on ‘Create Basic Task’ from the right side of window. The Create Basic Task Wizard window will be displayed. Enter the Name of the scheduler as required. The Description is optional as shown below.

  1. Click on Next. You will be redirected to another window where the Task start time can be selected.

  1. Click on ‘Next’. You will be redirected to another window. Set the date and time as given below:

  1. Click on ‘Next’. Select the ‘Action’ as shown below.

  1. Once done, enter the Program/Script to start a program and enter the argument to run the scheduler. Argument can be either single or multiple. Arguments can be entered with space as follows:

crl file suspendedCerts ftp ldap

a) crl : Run the command ‘crl scheduler’ to update the CRL where validity is less than the current date.

b) file: Run the command ‘file scheduler’ to copy all the CRL into local file folder.

c) suspendedCerts : Run the command ‘suspendedCerts’ to revoke the suspended certificates.

d) ftp: Run the command ‘ftp’ to copy all the Root, CA, certificates which is created through emCA application into a file server.

f) ldap: Run the command ‘ldap’ to publish all the Root, CA and User certificates in LDAP server.

  1. Click on ‘Next’ button. The following window will be displayed.

  1. Click on ‘Finish’. You can see the task scheduled as ‘emCAScheduler’ by clicking on ‘Task Scheduled Library’ on the left side of the window given below.

Quick Check Guide

To verify if the emCAScheduler is successfully run, follow the below steps.

FTP: View the certificate in FTP with the credentials given in properties as FTP details:

Give the Login Url: ftp:// 127.0.0.1. in the properties file (server: 127.0.0.1). The system will request for username and password as shown below:

  • Enter the user name and password as mentioned in the properties file: user = [FTP USER], pass = [FTP PASSWORD], and click on the Sign in button.

  • Now click on the folder as given in the properties file: path=[FTP FOLDER NAME] . you can see all the certificates.

Last updated