Production Image#
The production image is provided for production environments with high security demands. It requires an external etcd key-value store which is connected through an encrypted connection. The NetHSM process can be executed with hardware-based separation (KVM) and device-specific encryption. The image is distributed as OCI image and can be run locally with a compatible executor such as Docker and Podman.
Salīdzinot ar NetHSM aparatūru, programmatūras konteinera REST API nav īstenotas šādas funkcijas:
Network configuration
Factory reset
Reboot
Software update
The NetHSM production container is a product for paying customers only and can be purchased here. The image can be obtained from Nitrokey NetHSM registry using the credentials provided after purchase.
Brīdinājums
The security of the NetHSM software container strongly depends on the platform’s security. A compromised platform could easily compromise a NetHSM software container it executes. In addition the TRNG is not existent so that the entropy used and provided by the NetHSM depends on the platform’s entropy.
Tagging Policy#
The images in the repository are tagged with the Git commit hash and the version of the release.
The latest image is tagged with latest
.
Modes of Operation#
The image can be run in two modes of operation, i.e. Unix process or unikernel.
The Unix process mode runs NetHSM as a process on top of the operating system.
The unikernel mode runs NetHSM as a guest in a KVM based virtual machine and provides strong separation from the host operating system.
This mode is only available on Linux and requires access to the /dev/tun
and /dev/kvm
device nodes and the NET_ADMIN
capability.
Svarīgi
For security choose to run the container in the unikernel mode.
The mode can be set with the environment variable MODE
(see next chapter Configuration).
Konfigurācija#
The container can be configured with the following environment variables.
Environment variable |
Apraksts |
---|---|
|
Enables extended logging for NetHSM. |
|
A set unlock passphrase automatically unlocks the container during start. |
|
The mode accepts the values unix or unikernel, defaults to unix. |
|
The URL/IP address of the host running the etcd service. |
|
The port running the etcd service, defaults to 2379. |
|
The path to the certificate of the CA (Certificate Authority) which signed the client certificate. |
|
The path to the certificate for the client authentication. |
|
The path to the secret key for the client authentication. |
The container runtime secrets such as certificates and private keys need to be set with the secrets feature of Docker or Podman.
Secret variable |
Apraksts |
---|---|
|
CA certificate which signed the client certificate and server certificate. |
|
Client certificate for authentication of the NetHSM process with the key-value store. |
|
Client key for authentication of the NetHSM process with the key-value store. |
|
Server certificate for the API of the key-value store. |
|
Server key for the API of the key-value store. |
|
Device key of the NetHSM process. To learn more about the device key refer to chapter Terminology and Conventions in the system design. |
Lietošana#
The production container supports two modes of operation. The following chapters describe how to run the container with the provided compose files or with the _run_ command.
Unix Mode#
You can obtain a provided compose file here. Make sure you have the necessary files for the secrets, mentioned in the compose file, available.
To run the container without the compose file you need to provide an external etcd yourself. Here you find the recommended container image for etcd. Make sure to pass the configuration options, as described in chapter Configuration.
Konteineru var izpildīt šādi.
$ docker run -ti --rm -p 8443:8443 registry.git.nitrokey.com/distribution/nethsm:latest
$ podman run -ti --rm -p 8443:8443 registry.git.nitrokey.com/distribution/nethsm:latest
Tas palaidīs NetHSM kā Unix procesu konteinerā un atklās REST API portu 8443, izmantojot HTTPS protokolu.
Svarīgi
Konteinerā tiek izmantots pašparakstīts TLS sertifikāts. Lai izveidotu savienojumu, pārliecinieties, vai tiek izmantoti pareizi savienojuma iestatījumi. Lai uzzinātu vairāk, skatiet NetHSM ievads nodaļu.
Unikernel Mode#
You can obtain a provided compose file here. Make sure you have the necessary files for the secrets, mentioned in the compose file, available.
To run the container without the compose file you need to provide an external etcd yourself. Here you find the recommended container image for etcd. Make sure to pass the configuration options, as described in chapter Configuration.
Konteineru var izpildīt šādi.
$ docker run -ti --rm -p 8443:8443 --device /dev/net/tun --device /dev/kvm --cap-add=NET_ADMIN -e "MODE=unikernel" registry.git.nitrokey.com/distribution/nethsm:latest
$ podman run -ti --rm -p 8443:8443 --device /dev/net/tun --device /dev/kvm --cap-add=NET_ADMIN -e "MODE=unikernel" registry.git.nitrokey.com/distribution/nethsm:latest
Tādējādi NetHSM tiks palaists kā unikernel KVM virtuālajā mašīnā. Konteiners atklās REST API, izmantojot HTTPS protokolu, saskarnē tap200 ar IP adresi 192.168.1.100 un portu 8443.
Svarīgi
Konteinerā tiek izmantots pašparakstīts TLS sertifikāts. Lai izveidotu savienojumu, pārliecinieties, vai tiek izmantoti pareizi savienojuma iestatījumi. Lai uzzinātu vairāk, skatiet NetHSM ievads nodaļu.