Using your own security certificate¶
Info
This procedure, combined with proper Certificate Authority (internal or external) will fix NET::ERR_CERT_AUTHORITY_INVALID errors.
octoplant will create a self-signed certificate and private key automatically at run time.
If you wish to use your own certificate for OIDC instead of the one created by octoplant, this is an optional procedure to do this. The description is most useful for the IT department or a domain manager.
Configuration in octoplant¶
To use your own certificate, create a 41388 entry in the server.ini
file under the [Common] section as shown below:
Use the name of your server in place of {server name} here and in the instructions below.
Valid 41388 entry examples:
Other valid base URIs for the entry 41388=https://{server name}
could be similar to one of the following:
https://localhost:64021/octoplant/
https://octo.plant.localhost:123
https://octoplant.landau.auvesy-mdt.com:64023
https://192.168.178.12:5555
https://[\:\:abcd\:1234\:dcba]\:9999
http://octo.ld.auvesy.de
Info
The host or domain name must contain ASCII characters only. If you have unicode characters you must replace them with their punycode representation.
Creating the SSL certificate¶
- Install OpenSSL.
-
Create an empty text file named
sssan.conf
in the OpenSSL executable folder.The executable folder will be the one with
openssl.exe
in it. It may vary depending on the OpenSSL distribution. -
Edit the new
sssan.conf
file with Notepad or similar plain text editor. Enter the following text into that file and save it. -
Open a CMD shell with administrator rights.
- Change the shell to the OpenSSL executable folder.
-
Set the environment property OPENSSL_CONF. Enter the following in the shell:
SET OPENSSL_CONF={full path to the OpenSSL executable folder}\openssl.cfg
-
To generate an SSL certificate with SAN, enter the following in the shell:
openssl.exe req -new -x509 -newkey rsa:4096 -sha256 -nodes -keyout "{insert cert location}\server.key" -days 3560 -out "{insert cert location}\cert.crt" -config "sssan.conf"
This will create two files in the chosen certificate directory:
server.key
: A private key filecert.crt
: The certificate
-
Leave the administrator shell open if you will install the certificate on the server.
-
Move to the configuration local directory
-
Rename the following files:
cert.crt
toApiCertificate
(no extension)server.key
toApiPrivateKey
(no extension)
The certificate creation process is complete. Now you can:
- Setup an Active Directory-managed certificate service
- Distribute certificates to client computers by using group policy
- Install the certificate on the server
- or sign the certificate with your in-house certificate authority
Installing the certificate on the server¶
-
Open Microsoft Management Console with administrator rights by typing
mmc<Enter>
at the shell command line. -
The Microsoft Management Console appears is opened.
-
Create a new console snap-in:
-
Select File -> Add/Remove Snap-in….
The Add or Remove Snap-ins dialog appears:
-
Select Certificates, and then the Add button.
The Certificates snap-in wizard will appear:
-
Select the Computer account radio button then the Next> button.
The Select Computer dialog will appear:
-
Select the Local computer radio button then the Finish button.
- Select the OK button on the Add or Remove Snap-ins dialog.
-
-
Expand Certificates under the Console Root.
- Right-click on Trusted Root Certification Authorities.
- Select All Tasks.
-
Then select Import, as in the following illustration:
The Certificate Import Wizard will appear:
-
Select the Next button.
-
Select the Browse button.
A Windows Explorer dialog will open:
-
Browse to the location where you saved the ApiCertificate above, then select it.
-
Select the Open button.
The Certificate Import Wizard will display the file:
-
-
Select the Next button.
The next step is to verify the Certificate Store location:
Verify the certificate store is the Trusted Root Certification Authorities.
-
Select the Next button.
The wizard will display the results:
-
Verify the settings for this certificate.
-
Select the Finish button to complete the wizard.
The wizard will complete the import and display a dialog:
-
Select the OK button.
Verifying the certificate¶
-
Under Certificates, find and right-click on {server_name}:
-
Select the Open menu item.
-
The certificate information will be displayed:
-
Select the Details tab, then the Subject Alternative Name to see the DNS and IP information you entered for this certificate:
-
Select the OK button, and exit the console.