MTG Mini-CA System Configuration
Context path and port number of the application
The application includes an embedded Tomcat web server that is accessible via the AJP protocol from an Apache web server. The application has its own AJP port number and context path, as follows:
Application | Port number | Context path |
---|---|---|
Mini-CA |
8805 |
mini-ca |
The port numbers must be defined inside the worker.properties
file.
Example for the Mini-CA application: worker.mini-ca.port=8805
Heap Size
The application will be started with an defined heap size. The heap size is defined at the /etc/opt/mtg-kms-server
directory.
The following table defines the size and the file were the heap size is set of each application.
Application | File | The maximum heap size | The initial Java heap size |
---|---|---|---|
Mini-CA |
mtg-minica.service.conf |
-Xmx128M |
-Xms128M |
The heap size must be adapted to your requirements at mtg-minica.service.conf
|
Configuration Files
There are always two configuration files, one is the application.properties
for the Java-Application und the other is the logback.xml
for the log configuration.
During the initial installation the application.properties
and logback.xml
are pre-set with default values copied from the corresponding configuration templates.
All values have to be checked and if required, changed to their appropriate values.
The default configuration templates are stored in the /etc/opt/<Application>
directory.
After an update installation, the package management may place a newer version of the config files beside your existing. Always compare the default configuration files in with the new version. In case an update requires additional/changed parameters, those have to be added manually to the existing configuration files. Please also check the package release notes for such additional/changed parameters. |
Parameters in configuration files are always case-sensitive! |
Configuration of the MTG Mini-CA
Application Configuration
The Mini-CA is a standalone Java-Application.
The applet’s application.properties
are located in:
/etc/opt/mini-ca/application.properties
Name | Description |
---|---|
|
The maximum number of request processing threads to be created, which therefore determines the maximum number of simultaneous requests that can be handled. |
|
The minimum number of threads always kept running. |
|
The protocol handler caches Processor objects to speed up performance. This setting dictates how many of these objects get cached. |
|
If this attribute is true, the AJP Connector will only start if the secret attribute is configured with a non-null, non-zero length value. The default value is |
|
Only requests from workers with this secret keyword will be accepted. The default value is |
spring.datasource.url |
URL for DBMS. Default is PostgreSQL Please insert the valid URL for your database. |
spring.datasource.username |
Username DBMS. Default is |
spring.datasource.password |
Password DBMS. Default is |
spring.jpa.hibernate.ddl-auto |
DB DDL generation feature. Default is |
spring.jpa.database-platform |
Can be left empty for most databases. Must be set to |
minica.admin.username |
Admin username for the MTG Mini-CA. Default is |
minica.admin.password |
MTG Mini-CA Admin password used for BasicAuth. Password must be hashed using BCrypt. Required. |
minica.client.username |
Client username for the MTG Mini-CA. Default is |
minica.client.password |
Client password used for BasicAuth. Password must be hashed using BCrypt. Required. |
minica.hsm.encryption.aes-key |
Key for encrypting the hsm user’s credentials in the database. Recommended is a 32 bytes, base64-encoded string. Required. |
minica.hsm.keystore.password |
Password for encrypting the Software HSM’s keystores. Required. |
jwt.secret |
The secret used to sign all issued JWTs. |
jwt.expiration |
JWT expiration duration in ISO 8601 Duration format (E.g. |
spring.flyway.enabled |
If this attribute is true, Flyway is enabled for automatic database migrations. The default value is |
spring.flyway.locations |
The locations for Flyway to scan for migration scripts (Default: |
|
If set to true then metrics are sent to an OpenSearch server. It can be left empty. |
|
Specifies the URL where the OpenSearch server can be accessed. It can be left empty. |
|
Specifies the user who has access to the OpenSearch server. It can be left empty. |
|
Specifies the password of the user of the OpenSearch server. It can be left empty. |
|
The location of a keystore file containing certificates that are used to verify the TLS connection to Keycloak. This can be used to overwrite the default Java CA truststore. |
|
The password for the truststore. Must be set if metrics.client.truststore.path is set. |
|
The format of the truststore (see property |
BCrypt
In order to configure a password for the admin minica.admin.password
and the client minica.client.password
inside the application.properties
, the password must be hashed using BCrypt.
The htpasswd command can be used from the apache installation with the following command line:
/usr/local/apache2/bin/htpasswd -bnBC 10 "" <password to be hashed> | tr -d ':\n' | sed 's/$2y/$2a/'
Secrets encoded as Base64 strings
The AES key minica.hsm.encryption.aes-key
and the JWT Secret jwt.secret
can be generated via the following openssl commands:
minica.hsm.encryption.aes-key 32 Bytes -> openssl rand -base64 32
jwt.secret 64 Bytes -> openssl rand -base64 64
Apache Configuration
The Apache Configuration page contains information on the configuration of the Apache httpd-server.
System monitoring
General
For checking the Mini-CA the following endpoint is provided which can be reached via the following URL:
-
<base URL>/actuator/health
The access to these endpoint it is not further secured.
Health Endpoint
For checking the Mini-CA, an endpoint is provided that can be reached via the following URL:
-
<base URL>/actuator/health
An example call would be in the browser:
or with curl:
-
curl kms.mtg.de/mini-ca/actuator/health -i -X GET -H 'Accept: application/json'
If the Mini-CA is accessible, a Http response with HTTP/1.1 200 OK
and the following JSON structure is returned.
{
"status": "UP"
}