![]() |
REST API
17
REST API for Luna Network HSMs
|
Logs in to the partition.
The serial number of the HSM of interest.
Use: Required
JSON Schema:
Object type: integer format: int64 minimum: 1 maximum: 9999999999
The partition identifier of interest
Use: Required
JSON Schema:
Object type: integer format: int64 minimum: 1000000 maximum: 99999999999999999
The password for authentication if password-based partition. Optional for both of Password and Password based HSM. Optional in case of indirect Login.
Use: Not Required
JSON Schema:
Object
type: string
format: password
minLength: 8
maxLength: 255
pattern: ^([a-zA-Z0-9_!#$%'()*+,./:=? @[]^{}~-]*)$
Optional for both of Password and PED based HSM with default value "0". Only applicable for PED-based HSM. Indicator of whether the HSM uses PED-based ("1") or password-based ("0") authentication.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 1 pattern: ^(?:$|0|1)$
The security function to login on the partition. Optional in case of indirect Login.
Use: Required
JSON Schema:
Object minLength: 2 maxLength: 3 pattern: ^(so|co|cu|lco)$
The response to provide to the partition for indirect login.
Use: Not Required
JSON Schema:
Object
type: string
format: byte
description: Base64-encoded data
minLength: 4
maxLength: 10240
pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$
Success
"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.
Returned when the input data does not conform to the required validation schema.
HSM or partition does not exist.
POST https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/352170252337/login
{
"password": "password",
"role": "so"
}
POST https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/352170252337/login
{
"ped": "1",
"role": "so"
}
POST https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/352170252337/login
{
"response": "qlpLRuWfzCpyYkji4YguJSlpkvr9ZTq/NB5ymFPnLxc="
}
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'}
{}