Networking NVIDIA NVOS User Manual for InfiniBand Switches

Certificates Management

NVOS includes a self-signed certificate and private key so that the server works out of the box. The switch generates the self-signed certificate and private key when it boots for the first time. The X.509 certificate with the public key is in /etc/ssl/certs/nvue.pem and the corresponding private key is in /etc/ssl/private/nvue.key.

NVIDIA recommends that you use your own certificates and keys.

NVOS lets you manage CA certificates (such as DigiCert or Verisign) and entity (end-point) certificates. Both CA certificates and entity certificates can contain a chain of certificates. A CA certificate can also be a trust bundle that includes intermediate certificates.

You can import certificates onto the switch from an external source, set the certificate to use for the NVUE REST API, gNMI, and NMX, and show information about a certificate, such as its serial number and validity period.

NVOS uses OpenSSL 3, which does not support legacy ciphers by default. Make sure that all certificates and keys use modern algorithms (for example, SHA-256, RSA, or ECDSA), not deprecated ones such as MD5, SHA-1, RC2-40-CBC, RC4, and DES.

For the certificate commands, see Certificate Management Commands.

Import Certificate

If the certificate is passphrase protected, include the passphrase.

You must provide a certificate ID (<cert-id>) to uniquely identify the certificate you import.

CA Certificate

The following example imports a CA certificate with a public key and calls the certificate tls-cert-1. The public key is a Base64 ASCII-encoded PEM string.

admin@nvos:~$ nv action import system security ca-certificate tls-cert-1 data """-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----"""

The following example imports a CA certificate with a public key from scp://user:pass@1.2.3.4:/opt/certs/ca-cert.crt and calls the certificate tls-cert-1:

admin@nvos:~$ nv action import system security ca-certificate tls-cert-1 uri scp://user:pass@1.2.3.4:/opt/certs/ca-cert.crt

The following example imports the same CA certificate with the external option. The external option makes the CA certificate standalone: NVOS does not add it to the system CA certificate bundle in /etc/ssl/certs/ca-certificates.crt.

admin@nvos:~$ nv action import system security ca-certificate tls-cert-1 uri scp://user:pass@1.2.3.4:/opt/certs/ca-cert.crt external

Entity Certificate

The following example imports an entity certificate bundle (public and private key) and calls the certificate tls-cert-1. The bundle is protected with the passphrase mypassphrase.

A certificate bundle must be in PKCS #12 (.p12) format.

To generate a .p12 certificate bundle, use the following command:

openssl pkcs12 -export -out $cert_filename.p12 -in $cert_filename.pem -inkey $cert_filename.key -passout pass:$p12_pass

The following example imports the .p12 bundle file:

admin@nvos:~$ nv action import system security certificate tls-cert-1 passphrase mypassphrase uri-bundle scp://user:pass@1.2.3.4:/opt/certs/cert.p12

The following example imports an entity certificate from files on the switch and calls the certificate tls-cert-local. The files are in the /home/admin directory:

admin@nvos:~$ nv action import system security certificate tls-cert-local uri-public-key file://127.0.0.1/home/admin/cert.crt uri-private-key file://127.0.0.1/home/admin/cert.key

# You can also use an absolute path:
admin@nvos:~$ nv action import system security certificate tls-cert-local uri-public-key file:///home/admin/cert.crt uri-private-key file:///home/admin/cert.key

The following example imports an entity certificate with the public key from scp://user:pass@1.2.3.4:/opt/certs/public and the private key from scp://user:pass@1.2.3.4:/opt/certs/private, and calls the certificate tls-cert-1. The certificate is not passphrase protected.

admin@nvos:~$ nv action import system security certificate tls-cert-1 uri-public-key scp://user:pass@1.2.3.4:/opt/certs/public uri-private-key scp://user:pass@1.2.3.4:/opt/certs/private

Set the Certificate to Use in NVUE REST API

When you update a CA certificate, entity certificate, or CRL, run the nv config save command before you reboot the switch.

You can configure the NVUE REST API to use a specific certificate.

The following example configures the NVUE REST API to use the certificate tls-cert-1:

admin@nvos:~$ nv set system api certificate tls-cert-1
admin@nvos:~$ nv config apply

The following example configures the NVUE REST API to use the self-signed certificate:

admin@nvos:~$ nv set system api certificate self-signed
admin@nvos:~$ nv config apply

To unset the certificate for the NVUE REST API:

admin@nvos:~$ nv unset system api certificate
admin@nvos:~$ nv config apply

Set the Certificate to Use for the gNMI Server

You can configure the gNMI server to use a specific certificate.

The following example configures the gNMI server to use the certificate tls-cert-1:

admin@nvos:~$ nv set system gnmi-server certificate tls-cert-1
admin@nvos:~$ nv config apply

The following example configures the gNMI server to use the self-signed certificate:

admin@nvos:~$ nv set system gnmi-server certificate self-signed
admin@nvos:~$ nv config apply

To unset the certificate for the gNMI server:

admin@nvos:~$ nv unset system gnmi-server certificate
admin@nvos:~$ nv config apply

Delete Certificates

The following command deletes the certificate tls-cert-1:

admin@nvos:~$ nv action delete system security certificate tls-cert-1

Show Certificate Information

The following example shows all the entity certificates on the switch:

admin@nvos:~$ nv show system security certificate

The following example shows the applications that are using the entity certificate tls-cert-1:

admin@nvos:~$ nv show system security certificate tls-cert-1 installed

The following example shows detailed information about the CA certificate tls-cert-1:

admin@nvos:~$ nv show system security ca-certificate tls-cert-1 dump

Certificate Revocation List (CRL)

With mTLS, the NVUE server (nginx) uses CA certificates from the trusted store to validate client certificates. CAs also issue certificate revocation lists (CRLs) to revoke certificates before they expire. Reasons for revocation include:

  • Certificate compromise: the private key of a certificate is compromised or leaked.

  • CA compromise: the private key of the certificate authority is compromised.

  • Superseded certificate: a newer certificate replaces the certificate because of upgrades or changes in cryptographic algorithms, key lengths, or certificate details.

  • Affiliation change: the organization, individual, or domain associated with the certificate changes ownership or no longer exists.

  • Invalid information: the certificate contains incorrect or outdated information, such as an invalid domain name, organization details, or expiration date.

Each CRL includes:

  • CRL number: a sequentially increasing number.

  • Last update: the date this CRL was issued.

  • Next update: when the next CRL is due. This is also the expiration date of the current CRL.

  • A list of revoked certificates, each with its serial number, revocation date, and (depending on the CA policy) the reason for revocation.

On the switch, NVOS uses CRLs in the following cases:

  • mTLS, when an application runs as a server: NVOS uses the CRL to validate client certificates.

  • TLS, when an application runs as a client: NVOS uses the CRL to validate peer server certificates.

NVOS supports CRLs in PEM format. Features that use CRLs include NMX, gNMI, and nginx.

Import CRL

The following example imports a CRL file to the switch. The syntax is the same as for certificate import:

Bash
# Local import of a CRL
admin@nvos:~$ nv action import system security crl crl_1 uri file:///tmp/crl3/demoCA/crl/client_ca.crl
# Remote import of a CRL
admin@nvos:~$ nv action import system security crl crl_1 uri scp://user:pass@1.2.3.4:/tmp/crl3/demoCA/crl/client_ca.crl

Last updated: