You can configure TCP on NexJ Model Server, set up SSL communication including two-way including two-way SSL authentication, and set up password encryption on Model Server.
Configuring TCP
You can configure OS TCP keep-alive and retries to enable quicker detection of remotely disconnected TCP connections.
To configure TCP:
Change the kernel parameter values or registry keys, based on operating-system-specific files provided with the NexJ Studio plugin.
On Linux, do one of the following:
If the /etc/sysctl.conf file exists, edit the file to match the values in the <NEXJ_PLUGIN>/core/etc/config/os/tcp-linux.conf file.
Otherwise, copy the <NEXJ_PLUGIN>/core/etc/config/os/tcp-linux.conf file to the /etc/sysctl.d directory. Ensure that none of the other .conf files in that directory specify the parameters listed in the tcp-linux.conf file.
On Windows, double-click the <NEXJ_PLUGIN>\core\etc\config\os\tcp-<os>.reg file, where os is one of: xp, server2003, or server2008-Vista-7. Accept the confirmation messages to update registry settings.
If using Windows, restart the computer.
The TCP settings are now updated.
Setting up SSL communication
You can enable SSL communication and server authentication through the secureTransport property in the environment file. To enable SSL communication, you must place your SSL keystore file in the SERVER_HOME/conf folder. You can obtain an SSL keystore from a trusted certificate authority (CA). For non-production environments, you may generate a self-signed keystore. The following is an example command to generate a self-signed keystore.
where user_name is a valid user of the NexJ application.
When generating the keystore, you will be prompted to specify a keystore password, which you must specify in the environment when enabling SSL for it.
To set up SSL communication:
Enable SSL communication. Do one of the following:
In the environment file, set secureTransport="true".
In NexJ Studio, in the Deployment layer, double-click the environment, click the Overview tab > Security tab, and select the Secure Transport Protocol (use SSL) checkbox.
Specify the keystore password. Do one of the following:
In the environment file, set keystorePassword="text:<password>".
In NexJ Studio, in the Deployment layer, double-click the environment, click the Overview tab > Security tab, and enter the password in the Keystore Password field.
After you specify the password, for security reasons, you can only view it in the Source tab in NexJ Studio. The Security tab and the Properties tab only display *** in password fields.
SSL communication is now set up.
Configuring two-way SSL authentication
You can configure two-way SSL authentication for an HTTP channel or a Kafka channel. Two-way authentication ensures that the client and the server mutually authenticate each other before exchanging data.
As of NexJ CRM 9.9, and when you are running with HTTPS on local development environments on the NexJ Model Server, you must generate a new certificate (for example, sha256RSA, 4096 bits), insert it into the PKCS#12 keystore, and then replace enterprise\etc\config\teee\ssl.keystore. Microsoft Internet Explorer and Google Chrome will be able to mark the site as trusted if the certificate is added to the Windows certificate store as "Trusted Root Certification Authorities."
Setting up two-way authentication involves specifying the following certificates in the channel connection attributes:
The base64-encoded PKCS#12 certificate to send to external systems.
The base64-encoded X.509 certificate for your NexJ application to trust.
For communication to happen, the external system must also specify its own certificate for the NexJ application to authenticate against and add the NexJ application’s certificate to its trust store.
The process to set up two-way authentication is the same for communicating with all external systems including other Model Server instances.
If you do not already have the certificates in a compatible base64 format, you can convert them into the supported format using the following two-step command sequence:
cat nexjsa_pki_base64 | tr -d '\n' | tee nexjsa_pki_base64_one_line
To configure two-way authentication:
Steps that refer to NexJ Studio are performed in the Deployment layer for the environment, in the Channel Connections tab > General tab for the HTTP or Kafka channel you want to set up two-way authentication for.
Set the authentication mode to certificate. Do one of the following:
In the environment file, set authentication="certificate".
In NexJ Studio, select certificate in the Authentication dropdown.
Specify your keystore password. Do one of the following:
In the environment file, set password="text:<keystore_password>".
In NexJ Studio, specify your keystore password in the Password field.
Enter the base64-encoded PKCS#12 certificate of your channel. Do one of the following:
In the environment file, set certificate="<channel_certificate>".
In NexJ Studio, copy the certificate into the Certificate field.
Enter the base64-encoded X.509 certificate for the external system you want to trust. If you do not specify this, any channel with a global trust certificate is automatically trusted.
In the environment file, set trust="<external_system_certificate>".
In NexJ Studio, copy the certificate into the Trust field.
When you copy the certificate, ensure that you preserve newline characters for the certificate, as shown in the following example:
The first line of the certificate must contain only-----BEGIN CERTIFICATE-----, and the last line must contain only-----END CERTIFICATE-----.
Click the Save button
in the toolbar to save the changes to the environment.
The channel is now set up for two-way authentication.
Setting up password encryption
To secure your environment with master password encryption, you must create a master password file and encrypt your environment with this master password. For more information, see Creating a master password file and Encrypting deployment files.
You must then deploy your application with the master password encryption. For an example Ant script used to deploy the application with master password encryption, see Deploying using the command line.
After you deploy the application, to enable Model Server to process your encrypted environment file:
Copy the master password file to the Model Server machine in the <SERVER_HOME>/conf directory.
If you want to place the file in a different location, add the following line to the modeld.conf file located at <SERVER_HOME>/conf directory: cipher.master.url=<location_of_master.pwd>
Set file permissions to make the master password file readable only to the server process user (that is, the login account specified in the application server service) and the deployment administrator.
Password encryption is now enabled for your Model Server.
Restart Model Server for the changes to take effect.
JavaScript errors detected
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.