Getting Started

To use the REST API you must configure and enable the webserver on any SafeNet Luna Network HSMs you want to communicate with using the REST API, and install the SafeNet Luna client on any client workstation you want to use to communicate with a SafeNet Luna Network HSM using the REST API.

To configure and enable the webserver on a SafeNet Luna Network HSM

You must enable the web server on any SafeNet Luna Network HSMs you want to communicate with using the REST API.

1.Log in to the SafeNet Luna Network HSM as Admin.

2.Confirm that you have the correct REST API version installed. Refer to the CRN for the required version.

lunash:> webserver show

3.Set the REST API service to use a network port:

lunash:> webserver bind

4.Enable the web server with the command:

lunash:> webserver enable

5.Generate a certificate with the command:

lunash:> webserver certificate generate –keytype rsa

NOTE   It is recommended that you use the RSA algorithm for this cryptographic operation.

6.Configure the web server cipher suite, if necessary:

lunash:> webserver ciphers set -list <cipher_list>

7. Restart the webserver service and test that the REST API is operational:

lunash:> service start webserver

NOTE   You can also restart the web server using the -restart option of any webserver command.

8.You may now begin using the API.

To configure your client workstation

1.It is assumed that you have the SafeNet HSM client installed and configured at your workstation. If not, please refer to the SafeNet Network HSM Installation Guide.

2.Use a service like NTLS or STC to connect to your HSM or partition in order to perform administrative and transformative operations.

3.Install the sample client, if desired. The client tool's purpose is to showcase the basic functions of the REST API in an organized format. It is an easy-to-follow development tool that acts as an interactive API call repository for those getting to know the API. You can use the client by referring to the sample code provided to you in the client.zip file. See The REST API Sample Clients for more information.