REST API  4.0.0
REST API for SafeNet Network HSMs
PUT /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/roles/{roleid}

PUT /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/roles/{roleid}

Initializes the partition role.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

partitionid

The identifier of the partition of interest

Use: Required

JSON Schema:

   Object
   type: string

roleid

The identifier of the role of interest

Use: Required

JSON Schema:

   Object
   type: string

defaultChallenge

Indicates whether to create the partition role with a default challenge. If you create a password-based partition, set "defaultChallenge" to false. defaultChallenge is ignored when used on CO and CU roles if the partition type is PPSO. You must use another REST resource to set a secondary authentication default challenge on a PPSO partition role. See POST /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/roles/{roleid}/actions/{actionid}

Use: Required

JSON Schema:

   Object
   type: boolean
         false = do not use a default challenge
         true = use a default challenge

password

The password to be used to authenticate for the role. password is unused and should be blank ("") if using a PED-based partition.

Use: Required

JSON Schema:

   Object
   type: string

ped

The identifier of the PED of interest. '0' is local PED; 1 or greater is remote PED.

Use: Required

JSON Schema:

   Object
   type: string

Responses

204

Success

Location

"Location" is the URL to the role and is returned in the server response. You can use "Location" to form a PATCH resource to change the role password or to form a GET resource to query the role.

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


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

400

Unexpected error

404

HSM, partition or role does not exist.

Example Request

   PUT 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011784/roles/cuco
   { "ped": "0", "defaultChallenge": true, "password": "" }

Example Result

{
password-based partition:
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/api/lunasa/hsms/154704/partitions/273087011784/roles/cu', 'Content-Length': '2', 'Access-Control-Allow-Credentials': 'true'}

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