REST API
15
REST API for Luna Network HSMs
|
Add/Replace the client certificate of an already registered client with or without certificate. The certificate could be self-signed or CA signed. In the case of a CA-signed certificate, a CA certificate should be added.
The resource works in three different ways to update client's certificate:
Users with the following role privileges can perform this command:
application/vnd.safenetinc.lunasa+octet-stream;version=
application/vnd.safenetinc.lunasa+json;version=
application/vnd.safenetinc.lunasa+json;version=
Specifies the name of the client.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 128 pattern: [A-Za-z0-9_.:-]
Specifies the name of the client.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 128 pattern: [A-Za-z0-9_.:-]
The PEM-encoded certificate for the client.
Use: Required
JSON Schema:
Object type: string minLength: 8 maxLength: 8192 pattern: [A-Za-z0-9+=/]
Specifies the name of the client.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 128 pattern: [A-Za-z0-9_.:-]
The name of the client's certificate to be added that is uploaded in the user's home directory.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 64 pattern: [a-zA-Z0-9_. -]
Success
If certificate is not valid.
If certificate is currently expired.
If client certificate update failed.
If user has not used octet-stream request for attaching file.
If any unexpected error occurs.
If user has provided restricted certificate filename.
If certificate provided does not exist.
If client provided does not exist.
The content type of the request needs to be application/vnd.safenetinc.luna+octet-stream to notify the server that it will be receiving a file. Attach the file with the request.
Header format:
headers = {'Content-Type': "application/vnd.safenetinc.lunasa+octet-stream;version="}
PUT https://1.2.3.4:8443/api/lunasa/ntls/clients/testClient { }
PUT https://1.2.3.4:8443/api/lunasa/ntls/clients/testClient { "certificate": "-----BEGIN CERTIFICATE-----\n...<certificate>...\n-----END CERTIFICATE-----" }
PUT https://1.2.3.4:8443/api/lunasa/ntls/clients/testClient { "file": "10.175.76.56.pem" }
{}