8 Configuration
This chapter explains how to configure the RESTServer.
RESTServer Configuration
RESTServer reads its configuration from the application.yaml file. The application.yaml file is located in the /IN/service_packages/REST/etc directory.
RESTServer application.yaml Section
- Some sections are nested within other sections.
- Comments are prefaced with a “#” at the beginning of the line.
Editing the File
Open the configuration file on your system using a standard text editor. Do not use text editors, such as Microsoft Word, that attach control characters. These can be, for example, Microsoft DOS or Windows line termination characters (for example, ^M), which are not visible to the user, at the end of each row. This causes file errors when the application tries to read the configuration file.
Always keep a backup of your file before making any changes to it. This ensures you have a working copy to which you can return.
Loading Config Changes
If you change the configuration file, you must restart the service to enable the new options to take effect.
SSL Configuration
When endpoint is https, SSL configuration is used for certification. You need to configure SSL in the application.yaml file under ssl section in server. PKCS12 keystore should also be created.
Create new certificate if required:
openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out Certificate.crt -keyout Certifcate.keyTo import the certificate, run the openssl command as an administrator or root user.
cat Certificate.key Certifcate.crt > Certifcate.pem.txtopenssl pkcs12 -export -in Certifcate.pem.txt -out keystore.pkcs12cat example.key example.crt > example.pem.txt
openssl pkcs12 -export -in example.pem.txt -out mykeystore.pkcs12