Enabling LDAPS on Primis
Perform the following steps if the Active Directory server has its own CA certificate
Copy the CA certificate from the Active Directory server to the Primis server.
Import the CA certificate into the Java keystore by entering the command
keytool -keystore /var/opt/viscount/etc/freedom_truststore.jks -importcert -alias domain.com
-file <CA certificate of the Active Directory server>Edit /var/opt/viscount/etc/env file and find the line specifying ENGINE_DAEMON_OPTS and add the following options at the beginning
-Djavax.net.ssl.trustStore=/var/opt/viscount/etc/freedom_truststore.jks - Djavax.net.ssl.trustStorePassword=keystore_password
After the change, the line should look like the following:
ENGINE_DAEMON_OPTS="-
Djavax.net.ssl.trustStore=/var/opt/viscount/etc/freedom_truststore.jks - Djavax.net.ssl.trustStorePassword=keystore_password ${ENGINE_DEBUG} …Restart PRIMIS by entering the command
systemctl restart engine tomcatLogin to Primis Web application, select System -> Active Directory, and edit the LDAP connection. Update the Server URL to use ldaps by changing the lap protocol to “ldaps” and append the port “:636” to the URL. e.g.
ldaps://<AD domain>:636Test PRIMIS to Active Directory Connection by clicking the “Test Connection” button.
Perform the following steps if you want to install a self-signed CA certificate on the Active Directory server
Login to the Primis server and change your current working directory by entering the command
cd /var/opt/viscount/etcGenerate a private key that will be used to sign the root certificate by entering the command
openssl genrsa -des3 -out rootCA.key 2048
and then enter a passwordCreate the root certificate, and sign with the newly created private key by entering the command
openssl req -x509 -new -key rootCA.key -days 3650 -out rootCA.crt
and then enter the information prompts that follow.Copy the root certificate “rootCA.crt” to the domain controller and import it using the MMC console to the computer account Trusted Root Certification Authorities folder
On the domain controller, generate a certificate signing request (CSR) by creating a .inf file. Once the file is created, generate the csr by entering the following command
certreq -new device_request.inf device.csr
An example .inf file is as follows. Be sure to enter unique values in the “subject” line (same prompted questions);--------------------- request.inf ---------------------
[Version]
Signature="$Windows NT$"
[NewRequest]
Subject = "CN=dc1.acme.com,OU=IT,DC=dc1,DC=acme,DC=com,O=ACME,L=New York,S=New York,C=US"
;
KeySpec = 1
KeyLength = 1024
Exportable = TRUE
MachineKeySet = TRUE
SMIME = False
PrivateKeyArchive = FALSE
UserProtected = FALSE
UseExistingKeySet = FALSE
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
ProviderType = 12
RequestType = PKCS10 KeyUsage = 0xa0
[EnhancedKeyUsageExtension]
OID=1.3.6.1.5.5.7.3.1 ; this is for Server Authentication
Copy the CSR back to the PRIMIS server, and sign this CSR with the root certificate, thus creating the signed device certificate. Do this by entering the following command
openssl x509 -req -days 3650 -in device.csr -CA rootCA.crt -CAkey rootCA.key -set_serial 01 -out device.crtCopy the device certificate to the domain controller, and import it using the MMC console into the computer account personal folder.
Restart the domain controller.
Import the previously created root certificate into the Java keystore by entering the command
keytool -keystore /var/opt/viscount/etc/freedom_truststore.jks -importcert -alias domain.com
-file /var/opt/viscount/etc/rootCA.crtEdit /var/opt/viscount/etc/env file and find the line specifying ENGINE_DAEMON_OPTS and add the following options at the beginning
-Djavax.net.ssl.trustStore=/var/opt/viscount/etc/freedom_truststore.jks - Djavax.net.ssl.trustStorePassword=keystore_password
After the change, the line should look like the following: ENGINE_DAEMON_OPTS="-
Djavax.net.ssl.trustStore=/var/opt/viscount/etc/freedom_truststore.jks - Djavax.net.ssl.trustStorePassword=keystore_password ${ENGINE_DEBUG} …Restart PRIMIS by entering the command
systemctl restart engine tomcatLogin to Primis Web application, select System -> Active Directory, and edit the LDAP connection. Update the Server URL to use ldaps by changing the lap protocol to “ldaps” and append the port “:636” to the URL. e.g.
ldaps://<AD domain>:636Test PRIMIS to Active Directory Connection by clicking the “Test Connection” button.