Data storage
TrueNAS

Configure TLS certificates

12min

Before KMIP connections can occur, the TrueNAS instance and must establish a mutual trust relationship by validating their respective digitally signed certificates.

The following sections show how to generate and sign certificates for TrueNAS and the KMIP server connection pair on the . The certificates are registered both in TrueNAS and for the KMIP server connection pair on the and are used each time a TCP/IP session secured by TLS is established.

Generate and sign the TrueNAS certificate

There are two optional methods for generating and signing the TrueNAS certificate:

  1. Use an external CA
  2. Use the KMES Series 3 as the CA

Method 1: Use an external CA

For this method, import the external CA certificates into an empty certificate container on the . Then, generate a Certificate Signing Request (CSR), which the external CA uses to issue a TLS certificate for the TrueNAS instance. Finally, import the certificate into the certificate container on the that contains the external CA certificate.

1

Log in to the application interface with the default administrator identities.

2

Go to PKI > Certificate Authorities and select [ Add CA ] at the bottom of the page.

3

Specify a name for the certificate container, such as Externally Issued, then select [ OK ].

The new certificate container displays in the Certificate Authorities window.

4

Right-click the newly created certificate container and select Import > Certificate(s).

5

In the Import Certificates window, select [ Add ], and find and select the external CA certificate that issues the TrueNAS TLS certificate. The CA certificates populate in the Verified section of the Import Certificates window.

6

Select [ OK ] to save.

The external CA certificates now display in tree form under the certificate container.

7

Next, create a placeholder code signing certificate from which you can generate a CSR. Right-click the lowest-level CA certificate in the tree and select Add Certificate > Pending.

8

On the Subject DN tab of the Create X.509 Certificate window, set a Common Name for the certificate, such as TrueNAS.

9

Leave all other settatings set to the default values and select [ OK ].

10

Right-click the placeholder TrueNAS certificate and select Export > Signing Request. This will open .

11

Leave all of the settings on the Subject DN tab of the Create PKCS #10 Request window as the default values.

12

On the V3 Extensions tab, select the TLS Client Certificate profile.

13

On the PKCS #10 Info tab, specify a save location for the CSR and select [ OK ].

A message states the certificate signing request was successfully written to the location you specified.

14

Then, send the CSR file to an external certificate authority. The external CA uses the CSR to issue a TLS certificate.

After the external CA issues the code signing certificate, copy it to the storage medium configured on the .

15

Go to PKI > Certificate Authorities, right-click the placeholder TrueNAS certificate, and select Replace > With Signed Certificate.

16

On the Import Certificates window, select [ Add ]. Then, find and select the externally signed TLS certificate in the file browser. The certificate displays under the CA certificates in the Verified section of the Import Certificates window.

17

Select [ OK ] to save.

18

The remaining steps in this procedure involve exporting the TrueNAS certificate as a PKCS #12 file. To do this, go to Administration > Configuration > Options and enable Allow export of certificates using passwords. After enabling this option, select [ Save ].

19

Go to PKI > Certificate Authorities, right-click the Truenas certificate, and select Export > PKCS12.

20

In the Export PKCS12 window, select Export Selected and change the Cipher Options to AES-256. Note and optionally modify the file name, and select [ Next ].

21

Set a password for the PKCS #12 file and select [ Next ].

22

Select [ Finish ] to save the PKCS #12 file to the specified location.

This PKCS #12 file contains the signed TrueNAS certificate, associated private key, and the root certificate, all encrypted under the password that was set for the file.

Method 2: Use the KMES Series 3 as the CA

1

Log in to the application interface using the default Admin identities.

2

Go to PKI > Certificate Authorities and select [ Add CA ] at the bottom of the window.

3

Specify a name for the certificate container, such as Issued and select [ OK ].

The new certificate container displays in the Certificate Authorities menu.

4

Right-click the newly created certificate container and select Add Certificate > New Certificate.

5

On the Subject DN tab, set a Common Name for the certificate, such as Root.

6

On the Basic Info tab, change the key size to 4096. Leave all other settings set to the default values.

7

On the V3 Extensions tab, select the Certificate Authority profile and select [ OK ].

The Root CA certificate now displays under the -issued certificate container.

8

Right-click the Root CA certificate you created and select Add Certificate > New Certificate.

9

On the Subject DN tab, set a Common Name for the certificate, such as TrueNAS.

10

On the V3 Extensions tab, change the profile to TLS Client Certificate and select [ OK ].

11

The remaining steps in this proceure involve exporting the TrueNAS certificate as a PKCS #12 file. To do this, go to Administration > Configuration > Options and enable Allow export of certificates using passwords. After enabling this option, select [ Save ].

12

Go to PKI > Certificate Authorities, right-click on the Truenas certificate, and select Export > PKCS12.

13

On the Export PKCS12 window, select Export Selected and change the Cipher Options to AES-256. Note and optionally modify the file name and select [ Next ].

14

Set a password for the PKCS #12 file and select [ Next ].

15

Select [ Finish ] to save the PKCS #12 file to the specified location.

This PKCS #12 file contains the signed TrueNAS certificate, associated private key, and the root certificate, all encrypted under the password that was set for the file.

Create and configure the TLS certificate for the KMIP connection pair on the KMES Series 3

Perform the following tasks:

  1. Generate a private key and construct a CSR.
  2. Sign the KMIP connection pair CSR.
  3. Export all certificates in the CA tree.
  4. Configure the KMIP connection pair to use the signed certificate and CA chain.

Generate a private key and construct a CSR

1

Log in to the application interface with the default Admin identities.

2

Go to Administration > Configuration > Network Options and go to the TLS/SSL Settings tab.

3

Select the Connection drop-down option and select the KMIP connection pair.

4

Enable the KMIP connection pair if it is not already enabled.

5

Uncheck the Use System/Host API SSL Parameters checkbox if it is selected.

6

In the User Certificates section, select [ Edit ] next to PKI Keys.

7

In the Application Public Keys window, select [ Generate ].

8

When prompted that SSL will not be functional until new certificates are imported, select [ Yes ] to continue.

9

In the PKI Parameters window, leave all fields set to the default values and select [ OK ].

The Application Public Keys window now shows that a PKI Key Pair is Loaded.

10

Select [ Request ].

11

In the Subject DN tab, select Classic from the Preset drop-down list and specify the hostname or IP address of the KMES in Common Name.

12

On the V3 Extensions tab, set the profile to TLS Server Certificate.

13

On the PKCS #10 Info tab, specify a save location and name for the CSR file and select [ OK ].

14

When prompted that the certificate signing request was successfully written to the specified location, select [ OK ].

15

Select [ OK ] again in the Application Public Keys window to finish.

Sign the KMIP connection pair CSR

1

Go to PKI > Certificate Authorities.

2

Right-click the Root CA certificate and select Add Certificate > From Request.

3

In the file browser, select the KMIP connection pair CSR.

Certificate information populates in the Create X.509 From CSR window.

4

Leave all settings exactly as they are and select [ OK ] to save.

The signed KMIP connection pair certificate now displays under the Root CA certificate in the CA tree.

Export all certificates in the CA tree

Perform the following steps for each certificate in the certificate tree:

1

Right-click the certificates in the certificate tree and select Export > Certificate(s).

2

On the Export Certificate window, change the encoding to PEM and specify a save location for the file.

Configure the KMIP connection pair to use the signed certificate and CA chain

1

Log in to the application interface with the default Admin identities.

2

Go to Administration > Configuration > Network Options and go to the TLS/SSL Settings tab.

3

Select the Connection drop-down option and select the KMIP connection pair.

4

In the User Certificates section, select [ Edit ] next to Certificates.

5

On the Certificate Authority window, right-click the KMIP SSL CA X.509 certificate container and select [ Import ].

6

On the Import Certificates window, select [ Add ] at the bottom of the window.

7

In the file browser, select both the root CA certificate and the signed KMIP connection pair certificate, and select [ Open ].

The certificates now display in the Verified section of the Import Certificates window.

8

Select [ OK ] to save.

You now see Signed loaded next to Certificates in the User Certificates section of the Network Options window under the KMIP connection pair.

9

Select [ OK ] to save and finish.

Create a role and identity on the KMES Series 3 for TrueNAS

This section covers the following tasks:

  1. Add a PKI IdP.
  2. Create a TrueNAS role.
  3. Create a FlashArray identity.

Add a PKI identity provider configured with the TLS authentication mechanism

1

Log in to the application interface with the default Admin identities.

2

Go to Identity Management > Identity Providers.

3

Right-click anywhere in the window and select Add > Provider > PKI.

4

On the Info tab of the Identity Provider Editor window, specify a name for the Identity Provider and uncheck Enforce Dual Factor.

5

On the PKI Options tab, select [ Select ].

6

In the Certificate Selector window, expand the certificate tree you created for mutual authentication, select the CA certificate that signed the TrueNAS and KMIP connection pair certificates, and select [ OK ].

7

Select [ OK ] to finish creating the PKI identity provider.

8

Right-click the identity provider you just created and select Add > Mechanism > TLS.

9

On the Info tab, specify a name for the authentication mechanism.

10

On the PKI tab, leave all fields set to the default values.

11

Select [ OK ] to save.

Create a role for TrueNAS

1

Go to Identity Management > Roles and select [ Add ].

2

On the Info tab of the Role Editor window, set the Type to Application, the name to TrueNAS, and Logins Required to 1.

3

On the Permissions tab, enable all permissions.

4

On the Advanced tab, set Allowed Ports to KMIP only.

5

Select [ OK ] to finish creating the role.

Create an identity for FlashArray

1

Go to Identity Management > Identities.

2

Right-click anywhere in the window and select Add > Client Application.

3

On the Info tab of the Identity Editor window, select Application for the storage location and specify FlashArray as the identity name.

4

On the Assigned Roles tab, select the role you created for TrueNAS.

5

On the Authentication tab, remove the default API Key mechanism and select [ Add ].

6

In the Configure Credential window, select the TLS Certificate drop-down option in Type and select the Provider and Mechanism you created. Select [ OK ] to finish configuring the credential.

7

Select [ OK ] to finish creating the identity.