Introduction
This article describes how to workaround any error on SES component due to unauthorized self-signed certificates.
Description
One use case concerns the use of LDAP authentication mechanism with the use of self-signed certificate. During authentication the following message will be raised and the authentication will fail
2018-02-23T10:32:21.993Z - error: uncaughtException: self signed certificate in certificate chain
Implementation
- Edit the file /etc/systemd/system/multi-user.target.wants/systran-ses-console.service
- Add the NODE_TLS_REJECT_UNAUTHORIZED environment variable as follows:
[Unit] Description=Systran Enterprise Server Console After=network.target
[Service] Type=simple User=systran WorkingDirectory=/opt/systran/apps-node/enterprise-server Environment="NODE_TLS_REJECT_UNAUTHORIZED=0" ExecStart=/usr/bin/node ses-console.js LimitNOFILE=16384 Restart=on-failure RestartSec=1s
[Install] WantedBy=multi-user.target RequiredBy=systran-ses-console.target
- Then reload & restart the SES Console
systemctl daemon-reload systemctl restart systran-ses-console.service