Configuration (tWC)

Configuration (tWC)

The service is mainly configured by application.yml.

Container configuration

Containers in first place are configured by environment variables.

But still you can use 2 approaches while the first one is the preferred one.

1. approach - all configurations made by environment

2. approach - map volume with config file

  • map a volume mount into the container

  • put the application.properties/yml into it

  • point in a environment variable to the used mount point by setting the evironment vaiable SPRING_CONFIG_LOCATION

  • in docker-compose it could look like this

    services: app: image: my-spring-app environment: - SPRING_CONFIG_LOCATION=file:/application/config/ volumes: - ./config:/application/config

Application configuration

Spring application properties

As mentioned in Configuration (SOAP/AL) | Container configuration the config can be set in 2 ways. Here the config items are described:

config item

type

valid values

default

example

Description

config item

type

valid values

default

example

Description

server.port

int

1..65535

8080

7090

The port on which the application will be listening on. Has to map the port mapping for container.

spring.context-path

string

 

webservice

webservice

The context path

tia.soap.al.keystore

string

 

 

/application/work/keystore.pkcs12

The location of the key store.

If the parameter is not configured (the config line does not exist), a default keystore with basic KGS Test-Certificates is used. This default configuration should only be used for testing purposes.

logging.level.com.software.kgs

string

WARN, ERROR, INFO, DEBUG

DEBUG

 

The log level

tia.soap.al.security.accessSecrets.createDuringStartup

boolean

true, false

true

 

If security is used, it write the securities or not. Securities are derived from used private key and certificate configured for this instance.

tia.soap.al.security.accessSecrets.destinationFile

string

 

 

/application/work/mySecrets.txt

The destination file where the secrets will be written. Destination shall be a bind mount.

tia.soap.al.instances.{I}.async.directory

string

valid existing path

 

/tmp/dr1/inst1/input

for DR scenarios. A tia document router is watching this folder

tia.soap.al.instances.{I}.async.dataPrefix

string

 

 

data_

a prefix for data file can be given.

tia.soap.al.instances.{I}.async.indexSuffix

string

 

 

idx

If an index file shall be written, an index suffix has to be given. It will be the file suffix for the created index file.

If not given, no index file is written.

 

The index schema inside is : datafile|repo|docId|compId|size

tia.soap.al.instances.{I}.archiveLink.repo

string

 

 

FI

Destination (CS) repository for instance {I}

tia.soap.al.instances.{I}.archiveLink.host

string

 

 

host.docker.internal

195.166.10.22

Destination (CS) host for instance {I}

tia.soap.al.instances.{I}.archiveLink.port

int

80..65535

 

8093

Destination (CS) port for instance {I}

tia.soap.al.instances.{I}.archiveLink.protocol

string

http, https

 

https

Destination (CS)protocol for instance {I}

tia.soap.al.instances.{I}.archiveLink.path

string

 

 

/contentserver

Destination (CS) context path for instance {I}

tia.soap.al.instances.{I}.security.securityEnabled

boolean

true, false

 

 

If security is used. If false, the other security parameters doesn’t need to be set.

If enabled, at startup the tia webservice core tries to send the selected certificate

tia.soap.al.instances.{I}.security.keyStoreAlias

string

 

kgs

kgs

Destination key store alias for instance {I}. The alias for the private key and certificate pair of the instance. Also used for access key calculation

tia.soap.al.instances.{I}.security.certificateAuthId

string

 

 

 

A destination certificate is used by config item keyStoreAlias. Normally the authId is taken from certificates CN. But for archive link auth id (secKey calculation) this can be overwritten for accessing content server. This parameter sets the used authId.

management.endpoints.web.exposure.include

 

 

  • health

  • metrics

  • prometheus

 

Cloud relevant health and metrics endpoints

tia.soap.al.instances.{I}.allowed.serverinfo

Boolean

true, false

false

 

Option indicates whether serverinfo-requests are to be forwarded to Content Server.

from Version 1.1.0

tia.soap.al.instances.{I}.allowed.info

Boolean

true, false

false

 

Option indicates whether info-requests are to be forwarded to Content Server.

from Version 1.1.0

tia.soap.al.instances.{I}.allowed.create

Boolean

true, false

false

 

Option indicates whether create-requests are to be forwarded to Content Server.

from Version 1.1.0

tia.soap.al.instances.{I}.allowed.delete

Boolean

true, false

false

 

Option indicates whether delete-requests are to be forwarded to Content Server.

from Version 1.1.0

tia.soap.al.instances.{I}.allowed.get

Boolean

true, false

false

 

Option indicates whether get-requests are to be forwarded to Content Server.

from Version 1.1.0

tia.soap.al.instances.{I}.allowed.getAll

Boolean

true, false

false

 

Option indicates whether getAll-requests are to be forwarded to Content Server.

from Version 1.1.0

management.endpoints.web.exposure.include

 

 

  • health

  • metrics

  • prometheus

 

Cloud relevant health and metrics endpoints

Example config

server: port: 8080 servlet: context-path: /webservice spring: main: allow-bean-definition-overriding: true logging.level: org.springframework: WARN com.software: INFO tia: soap: al: # keystore: /application/work/keystores/soapalKs.pkcs12 instances: S1: archiveLink: connection: repo: "AP" host: "host.docker.internal" port: "8069" protocol: "http" path: "contentserver" security: keyStoreAlias: "kgs" certificateAuthId: "tia" securityEnabled: true allowed: serverInfo: true info: true create: true delete: true get: true getAll: true security: accessSecrets: createDuringStartup: true destinationFile: /application/work/mySecrets.txt management: endpoints: web: exposure: include: - health - metrics - prometheus

Mime type mapping

Per default there is an inbuilt mime mapping. This can be overwritten by setting the property soap.al.customMimeTypeMapping.

For this you need to use the 2nd approach from https://kgs-software.atlassian.net/wiki/spaces/DOCUEN/pages/4029579301/Configuration+tWC#2.-approach---map-volume-with-config-file in order to map the config file onto the container.

image/tiff FAX TIF TIFF application/octet-stream BIN REO application/msword DOC application/pdf PDF application/postscript PS application/rtf RTF application/vnd.ms-excel XLS application/vnd.ms-project MPP application/vnd.ms-powerpoint PPT application/x-alf ALF application/x-otf OTF application/x-raw RAW application/x-scr SCR image/bmp BMP image/gif GIF image/jpeg JPG image/pcx PCX text/html HTM HTML text/plain TXT text/h323 323 application/xml XML video/3gpp2 3g2 video/3gpp 3gp application/x-7z-compressed 7z audio/audible AA audio/aac AAC text/csv CSV application/x-zip-compressed ZIP application/x-compress Z application/vnd.openxmlformats-officedocument.wordprocessingml.document DOCX drawing/x-dwf DWF application/x-gtar GTAR application/x-gzip GZ audio/m4a M4A audio/m4b M4B audio/m4p M4P audio/x-m4r M4R video/x-m4v M4V video/x-sgi-movie MOVIE audio/mpeg MP3 video/mp4 MP4 MP4V video/mpeg MPG image/png PNG application/x-tar TAR application/vnd.visio VSD audio/wav WAV application/vnd.ms-outlook MSG