User Guide Nshield Container Option Pack 1.1.1
User Guide Nshield Container Option Pack 1.1.1
1
User Guide
Version: 1.1.1
Date: 6 May 2021
Copyright in this document is the property of nCipher Security Limited. It is not to be reproduced modified,
adapted, published, translated in any material form (including storage in any medium by electronic means
whether or not transiently or incidentally) in whole or in part nor disclosed to any third party without the prior
written permission of nCipher Security Limited neither shall it be used otherwise than for the purpose for which
it is supplied.
Words and logos marked with ® or ™ are trademarks of nCipher Security Limited or its affiliates in the EU and
other countries.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States
and/or other countries.
Information in this document is subject to change without notice.
nCipher Security Limited makes no warranty of any kind with regard to this information, including, but not
limited to, the implied warranties of merchantability and fitness for a particular purpose. nCipher Security
Limited shall not be liable for errors contained herein or for incidental or consequential damages concerned
with the furnishing, performance or use of this material.
Where translations have been made in this document English is the canonical language.
nCipher Security Limited
Registered Office: One Station Square,
Cambridge, CB1 2GA, United Kingdom
Registered in England No. 11673268
Copyright in this document is the property of nCipher Security Limited. It is not to be reproduced, modified,
adapted, published, translated in any material form (including storage in any medium by electronic means
whether or not transiently or incidentally) in whole or in part nor disclosed to any third party without the prior
written2 permission
Page of 16 of nCipher Security Limited neither shall it be used otherwise
nShieldthan for the purpose
Container for which
Option Pack v1.1.1
it is supplied.
Contents
1 Introduction ...................................................................................................................................4
2 Software Prerequisites .................................................................................................................5
3 Installation .....................................................................................................................................7
3.1 Install the nShield Container Option Pack ..............................................................................7
3.2 Uninstall the nShield Container Option Pack ..........................................................................7
4 Deployment Architecture..............................................................................................................8
5 The Hardserver Container ............................................................................................................9
The nShield Container Option Pack is installed on top of your existing Security World Software
installation, allowing you to continue using your existing Security World and keys.
When you are using podman on RedHat Enterprise Linux, you should install podman-
docker to provide the Docker alias. nSCOP has been tested with podman-docker
v1.6.4.
nShield application containers have been tested with the following base images:
CentOS 6, 7, and 8
Apline (frolvlad/alpine-glibc)
Nginx 1.18
Apache 2.4.43
Other base images may work but are untested.
Before you can begin using nSCOP you must complete the following steps:
1. Set up the HSM(s). For instructions, see the Installation Guide of your HSM(s).
2. Using its IP address, configure your container host machine as a client of the HSM(s).
The container host machine is the machine on which you will run the nShield hardserver and
application containers.
3. To access and use cryptographic keys from a Security World, load or create a Security World
on the HSM, and map the key management data folder (kmdata) from your container host
machine into the running application containers.
All users who will use the nShield Container Option Pack scripts need execute permission to
the installed scripts and need to be able to run Docker.
Script Purpose
make-nshield-hwsp Makes an nShield hardserver Docker image.
make-nshield-hwsp-config Generates a hardserver configuration file for an nshield-hwsp
container.
make-nshield-application Creates a new Docker image with the nShield support
software installed.
extend-nshield-application Installs the nShield support software to an existing Docker
image.
You should remove any built Docker images or containers from your system if they are no longer
needed. For instructions on how to delete Docker images and containers, see the documentation for
Docker.
The nshield-hwsp container runs the hardserver. It is supplied with configuration to connect to one
or more network HSMs. It exposes the hardserver via an AF_UNIX socket.
Application instances are any containers that include applications that use the nShield software stack.
They are supplied with the socket used to connect to the hardserver and access to the key
management data files to use the World and associated cryptographic keys.
The key management data files, including encrypted copies of keys, are located in kmdata. A container
mounting kmdata as a volume will be able to spoof the HSM client. Therefore, access to files in
kmdata must be controlled and restricted to trusted users.
For example:
$ mkdir SecWorld-12.70.4
$ sudo mount -o loop SecWorld_Lin64-12.70.4.iso SecWorld-12.70.4
mount: /dev/loop0 is write-protected, mounting read-only
$ make-nshield-hwsp SecWorld-12.70.4
[...]
Successfully tagged nshield-hwsp:12.70.4
The default base image for nShield hardserver containers is RedHat UBI7. The default tag reflects the
version of nShield Security World software that the container was built from.
If you want to use a different base image, or specify a different tag, use the --from and –tag options.
See make-nshield-hwsp --help for more information.
Running the following example requires the nShield support software installed on the host. You can
also create the configuration file based on the template below by filling in the remote_esn,
remote_ip, remote_port, and keyhash values in the nethsm_imports section.
For example:
[nethsm_imports]
local_module=1
remote_esn=1111-2222-3333
remote_ip=192.168.0.10
remote_port=9004
keyhash=000102030405060708090a0b0c0d0e0f10111213
privileged=0
Key hash values are retrieved from remote HSMs without any trust. The generated
configuration file should be compared against values recorded from the front panel, or some
other trusted path.
This makes the hardserver of nshield-hwsp available via the sockets in the Docker volume
socket1. If the nShield support software is installed, this can be tested from the host.
First obtain the mount point for the Docker volume and use this for the NFAST_SERVER environment
variable:
Create an nShield base container, and derive application containers from it.
Derive a container with nShield Security World software from an existing application container.
$ make-nshield-application SecWorld-12.70.4
[...]
Successfully tagged nshield-ubi7:12.70.4
Supply a kmdata folder, if you want to perform operations that require a Security World.
Different application containers can use different kmdata folders. For example, you could create a new
folder:
$ mkdir –p /opt/nscop/app1/kmdata/local
You can then copy the desired Security world and module files for your application into this folder.
Using this folder and the Docker volume created for the hardserver container in section 5.3, this
container can be run directly:
If you want to use a different base image, or specify a different tag, use the --from and --tag
options. See make-nshield-application --help for more information.
The set of supported APIs is appended to the nShield software version in the container tag.
Example Description
nfkminfo Simple example of running an nShield application in an
application container that was created using make-
nshield-application.
javaenquiry Example Java application in which the application container
is derived from the nShield Java container using make-
nshield-application.
nfkmverify Example in which the application container is extended from
an existing container to add nShield Container using
extend-nshield-application.
nfweb Example web server that exposes basic information about
the connected nShield modules.
Search: nCipherSecurity