Skip to main content
Version: 2.1.0

Microservices configs

This page covers possibilities offered by our inventory that you can configure inside the inventory file inventories/<your inventory>/group_vars/regards_nodes/main.yml.

Security

You can configure JWT access token like this:

group_config_mservices:
# Token secret (REGARDS API and Orders direct download links) - (64 characters max)
jwt_secret: "{{ regards_vault.group_config_mservices.authentication.jwt_secret }}"
jwt_key_hs256: "{{ regards_vault.group_config_mservices.authentication.jwt_key_hs256 }}"
jwt_key_hs384: "{{ regards_vault.group_config_mservices.authentication.jwt_key_hs384 }}"
jwt_key_hs512: "{{ regards_vault.group_config_mservices.authentication.jwt_key_hs512 }}"
order_jwt_secret: "{{ regards_vault.group_config_mservices.authentication.order_jwt_secret }}"
# Password to crypt DB secret (16 characters max)
cipher_iv: "{{ regards_vault.group_config_mservices.authentication.cipher_iv }}"
PathTypeDescriptionConstraints
group_docker_mservices.jwt_secretStringJWT secretFacultative. Recommended for production.
group_docker_mservices.jwt_key_hs256StringJWT secret HS256Facultative. Recommended for production.
group_docker_mservices.jwt_key_hs384StringJWT secret HS384Facultative. Recommended for production.
group_docker_mservices.jwt_key_hs512StringJWT secret HS512Facultative. Recommended for production.
group_docker_mservices.order_jwt_secretStringJWT secretFacultative. Recommended for production. Used to authenticate order links.
group_docker_mservices.cipher_ivStringCipher IVFacultative. 16 characters max. Recommended for production.

Mail

Mail configuration used by microservices can be configured like this:

group_config_mservices:
mail:
host: smtprelay.regards.fr
port: 25
username: admin@regards.fr
password: my vaulted password
noreply: no-reply@regards.fr
PathTypeDescriptionConstraints
group_docker_mservices.mail.hostStringSMTP HostFacultative. Default: rs-maildev
group_docker_mservices.mail.portIntSMTP portFacultative. Default: 1025
group_docker_mservices.mail.usernameStringSMTP usernameFacultative. Empty by default
group_docker_mservices.mail.passwordStringSMTP passwordFacultative. Empty by default
group_docker_mservices.mail.noreplyStringNo reply adressFacultative. Default: regards@noreply.fr

Account password configuration

Mail configuration used by microservices can be configured like this:

group_config_mservices:
password_config:
regex: ^.+$
info: Password must contains at least 1 character
PathTypeDescription
group_docker_mservices.password_config.regexRegexRegex used by the backend service to validate new password (Default ^(?=.[0-9])(?=.[a-zA-Z])(?!.* ).16$)
group_docker_mservices.password_config.infoStringPassword information displayed to users (Default Password must contain at least one letter, one digit and must be 8-16 characters)

Account and password validity

group_config_mservices:
account_validity_in_days: 10
account_password_validity_in_days: 10
PathTypeDescription
group_docker_mservices.account_validity_in_daysIntNumber of days before an account will be deactivated (Default 355 days). If you provide 0, this check is disabled
group_docker_mservices.account_password_validity_in_daysIntNumber of days before an account password must be generated (Default 350 days). If you provide 0, this check is disabled

Token validity

group_config_mservices:
access_token_validity: 2592000
PathTypeDescription
group_docker_mservices.access_token_validityIntNumber of seconds a token last

REGARDS Microservice Certificate Authorities

You can load additional certificate authorities into REGARDS JVM like this:

group_config_mservices:
ca_certificates:
- AC_SOME_AUTHORITY.crt
- AC_ANOTHER_AUTHORITY.crt

Related files must be located inside <your inventory>/static/ca-certificates, like this:

$ cd 'inventories/<your inventory>/static/ca-certificates'
$ ls
AC_SOME_AUTHORITY.crt
AC_ANOTHER_AUTHORITY.crt

REGARDS Proxy

If REGARDS microservices need a proxy to access to another system, you can configure it:

group_config_mservices:
proxy:
url: http://myproxy.regards.fr
username: regards
password: password
PathTypeDescriptionConstraints
group_docker_mservices.proxy.urlStringProxy URLFacultative, false, or a valid URL
group_docker_mservices.proxy.usernameStringProxy usernameFacultative. Empty by default
group_docker_mservices.proxy.passwordStringProxy passwordFacultative. Empty by default

REGARDS session

You can configure REGARDS session retention duration like this :

group_config_mservices:
session:
retention_days: 30
dashboard_retention_days: 90
PathTypeDescription
group_docker_mservices.session.retention_daysIntNumber of retention days of inactive sessions (agent side) in days. Default to 5 days
group_docker_mservices.session.dashboard_retention_daysIntNumber of retention days of inactive sessions (manager side) in days. Default to 30 days

Open microservices ports

All REGARDS services use internal ports on the docker network to operate. However, if you wish, you can open these ports outside the network. To do this, here's the configuration you'll need to carry out in your inventory for the target microservice(s) and the list of existing ports.

Internal portIventory propertyUsage
90XXhttpJetty server port of the microservice to receive all REST requests
10500jdwpEnable remote debugging port
180XXjmxEnables remote monitoring and management through Java Management Extensions.
8081metricsEnable access to actuator metrics

The example below shows how to configure these ports for the storage service

group_docker_mservices:
storage:
http: 9750
jdwp: 9751
jmx: 9752
metrics: 9753