REST API  4.0.0
REST API for SafeNet Network HSMs
POST /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/login

POST /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/login

Logs in to the partition.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

partitionid

The partition identifier of interest

Use: Required

JSON Schema:

   Object
   type: string

password

The password for authentication if password-based partition

Use: Required

JSON Schema:

   Object
   type: string

ped

Indicator of whether the HSM uses PED-based ("1") or password-based ("0") authentication

Use: Required

JSON Schema:

   Object
   type: string

role

The security function to login on the partition

Use: Required

JSON Schema:

   Object
   type: string

Responses

204

Success

Location

"Location" is the URL to the partition role logged onto and is returned in the server response. You can use "Location" to form a GET resource to query the partition role.

see GET /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/roles/{roleid}


For PED-based partitions, "Location" is the URL to the task spawned to log into the partition.

400

Unexpected error

404

HSM or partition does not exist.

Example Request

   POST 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/352170252337/login
   {"ped": "1", "role": "so"}

Example Result

password-based HSM:
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/api/lunasa/hsms/154704/partitions/352170252337/login/so/3', 'Content-Length': '2', 'Access-Control-Allow-Credentials': 'true'}

PED-based HSM
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/tasks/2', 'Content-Length': '712', 'Access-Control-Allow-Credentials': 'true'}

{}