Enable SSL

Since, everything is working as expected(hopefully!) we can enable SSL and finally force usage  HTTPS terms of OCS communication. This will improve security and integrity of data. Let’s start with SSL certificate. In my previous guides there was a bit of confusion regarding SSL Certificate. I strongly advise using certificate that can be easily trusted by all clients (eg. Active Directory PKI generated, Let’s Encrypt and so on). I do not recommend using self signed certificates, unless you want to manually trust it when accessing OCS using web browser. Also, please remember that when deploying client certificate, one must provide valid CA/Issuer cert – not server cert(unless self signed is used). Also there are few tips that can help with certificate creation and trust:

  1. Multiple common names/dns names should be added as DNS fields, not common names. You can use fqdns as well as netbios names like, dns=ocsng, dns=ocsng.domain.com,dns=ocsng.anotherdomain.com etc.
  2. Common Name can be a pure display name of the party such as OCS Inventory NG Server when using DNS fields
  3. Ip address can be added to certificate as well using IP field

Always plan the names and IP addresses ahead!

Ok, now we can configure SSL for ocs and apache.
I do have basic SSL Certificate generated using Microsoft PKI using these values:

  • CN = OCS Inventory NG
    OU = IT
    O = MyCompany Name
    S = stateName
    C = PLand DNS Names:
  • DNS=ocsng.domain.local

    I have bundle with .pfx extension so I will need to convert it to Linux .pem/.key format.
    I copied the bundle using WinScp into /tmp folder in Debian, now in Shell i enter the tmp folder, convert the bundle and copy it into appropriate directories. Also I need to download and trust my Certification Authority Certificate in Linux(comments are included after //).

    1. Install OpenSSL and enable SSL in Apache:
    2. Convert and install the certificate:
    3. Now we need to adjust Apache configuration to support SSL and secure downloads folder
    4. Now, the second OCS config file: