By default, a FlexEdge™ device creates its own HTTPS certificate signed by the C3.2 Local Root, a certificate authority (CA) built into Crimson. Browsers don't trust that root, so they show a security warning when you open the device's web pages. This article shows how to make the FlexEdge present a certificate from your own CA instead, so that PCs which already trust your CA open the web pages without a warning.
Crimson 3.2 offers two ways to do this:
- Automatic with Custom Root: you give the device a CA certificate and its private key, and the device issues its own certificate from it, naming its IP addresses and mDNS name. Use this when you don't want to issue a certificate for each device by hand.
- Specified Below: you issue the device's certificate yourself with your CA and upload the finished certificate and key. Use this when your CA's private key must not leave your CA system.
Preparation
-
Software and device:
- Crimson 3.2 and a FlexEdge DA50 or DA70 you can download a database to. Use Crimson 3.2 build 3.2.1056.0 or later.
-
For Automatic with Custom Root:
- A CA certificate (.crt) and its private key (.key). The certificate must be a CA certificate, with the Basic Constraints extension set to CA:TRUE.
- The key password, if the private key is encrypted.
-
For Specified Below:
- A server certificate (.crt) issued by your CA for this device, and its private key (.key).
- The certificate's Subject Alternative Names (SANs) must list every name and IP address users will type in the browser to reach the device.
- The key password, if the private key is encrypted.
-
Trust on the PCs:
- Your root CA certificate, installed as trusted on every PC that opens the device's web pages. See Part 4.
Note: With Automatic with Custom Root, your CA's private key is stored in the Crimson database and on the device. Don't use your organization's root CA for this. Create a separate issuing (intermediate) CA for your devices, so that a lost database or device exposes only that CA, and you can revoke or replace it without touching the rest of your PKI.
Part 1: Choose How the Certificate Is Created
Step 1: Open the Identity Settings
- Open your database in Crimson 3.2.
- Navigate to Device Configuration > System Configuration > Network > Identity, Naming Tab.
- Open the Default Cert drop-down. It has these choices:
- Specified Below: the device uses the certificate uploaded in Cert File, Key File and Key Password.
- Automatic with Crimson Root: the default. The device creates a certificate from its local IP addresses and mDNS name, signed by the C3.2 Local Root.
- Automatic with Custom Root: the device creates the same kind of certificate, but signs it with the CA certificate uploaded in Cert File, Key File and Key Password.
- Any certificate added under Security > Identity Certs, listed by its label. The device uses that certificate and key as they are.
Continue with Part 2 for Automatic with Custom Root, or Part 3 for Specified Below.
Part 2: Automatic with Custom Root
Step 1: Upload Your CA
- On the Naming Tab, set the following:
- Default Cert: Automatic with Custom Root.
- Automatic IPs: Included, so the device's IP addresses are added to the certificate.
- Cert File: your CA certificate. Drop the file onto the field, or use the upload button beside it.
- Key File: your CA's private key.
- Key Password: the key's password, if it has one.
Step 2: Add Names the Device Can't Know
The device only knows its own IP addresses and mDNS name. If users reach it by another name or address, such as a DNS name or a router's public address that forwards to it, add that name so the browser accepts the certificate.
- Set the following, if needed:
- External Name: the DNS name users type, for example flexedge01.plant.example.com.
- External IP: an address the device doesn't have itself, such as the router address that forwards to it.
Note: Your own CA can sign any name. With the C3.2 Local Root, Crimson only accepts names ending in .local and private IP addresses, because the root certificate restricts them.
Continue with Part 4.
Part 3: Specified Below
Step 1: Upload the Device Certificate
- On the Naming Tab, set the following:
- Default Cert: Specified Below.
- Cert File: the server certificate you issued for this device. If your CA uses an issuing (intermediate) CA, put the issuing CA certificate in the same file after the device certificate. The device then sends both, so PCs that trust only your root CA still accept it.
- Key File: the certificate's private key.
- Key Password: the key's password, if it has one.
Note: With Specified Below, External Name, External IP and Automatic IPs are grayed out. Only the names in your certificate's SANs are valid, so issue a new certificate if the device's address changes.
Continue with Part 4.
Part 4: Download and Check the Certificate
Step 1: Download the Database
- Save the database.
- Download it to the FlexEdge with Link > Send.
- Restart the FlexEdge. The new certificate is used only after a restart.
Step 2: Trust Your CA on Each PC
The browser only accepts the device's certificate if it trusts your root CA. On Windows:
- Copy your root CA certificate to the PC.
- Double-click the file and click Install Certificate.
- Choose Local Machine (this needs administrator rights), then Place all certificates in the following store, and select Trusted Root Certification Authorities.
- Finish the wizard, then restart the browser.
In a domain, your IT department can deploy the root CA to all PCs with Group Policy instead. Firefox keeps its own certificate list unless it is set to use the Windows store.
Step 3: Open the Device's Web Pages
- Browse to the device over HTTPS, using one of the names or addresses in its certificate. The System Web Server is on port 4443, for example https://flexedge01.plant.example.com:4443. The Crimson Web Server (port 443 when HTTPS is enabled) also uses the Default Cert unless it is set to a different certificate.
- Click the padlock in the address bar and open the certificate details. Issued by should show your CA, not C3.2 Local Root.
Part 5: Frequently Asked Questions (FAQ)
Question: The browser still shows a warning. What should I check?
Answer: Check the certificate details in the browser. If it is issued by C3.2 Local Root, the new database hasn't been downloaded, or Default Cert is still set to Automatic with Crimson Root. If it is issued by your CA, check that the PC trusts your root CA (Part 4, Step 2), and that the address you typed appears in the certificate's Subject Alternative Names. Add a missing name with External Name or External IP (Part 2), or issue a new certificate that includes it (Part 3).
Question: Can I upload a normal server certificate with Automatic with Custom Root?
Answer: No. With Automatic with Custom Root, the uploaded certificate signs the device's certificate, so it must be a CA certificate with Basic Constraints set to CA:TRUE. To use a server certificate you have already issued, choose Specified Below (Part 3).
Question: Which other services use this certificate?
Answer: The Default Cert is the device's identity for the System Web Server, the TLS Server (when its Server Certificate is set to Default) and the FTP Server's TLS. The Crimson Web Server and the OPC UA server have their own Server Certificate setting, where you can choose the Default Cert or a certificate from Security > Identity Certs.
Question: Does the key type matter?
Answer: For HTTPS, use RSA 2048 or larger.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
HMS Technical Support
If you have any questions or trouble contact HMS Technical Support by clicking here.