Update CA certificate: Request

Prev Next

To change the CA certificate, send the following request:

POST https://<IA_IP_address>:<port_number>/config/v1/auth/x509/client/ca

Note

To use this request, your user account must have sudo access.

Required headers:

Cookie: px=<token>
X-Username: <user>
X-Role: <role>

Request body:

-----BEGIN CERTIFICATE-----
MIIC9zCB4AIBATANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMCVVMxCzAJBgNV
BAgMAlZBMQ8wDQYDVQQHDAZSZXN0b24xEDAOBgNVBAoMB0ZpcmVFeWUxCzAJBgNV
BAsMAkVGMRIwEAYDVQQDDAlsb2NhbGhvc3QxJzAlBgkqhkiG9w0BCQEWGHJvYmVy
dC5wZXJyeUBmaXJlZXllLmNvbRcNMTkwMjA1MTQ1MzI0WhcNMTkwMzA3MTQ1MzI0
WjAUMBICAQEXDTE5MDIwSHrxNTAxOFqgDjAMMAoGA1UdFAQDAgEAMA0GCSqGSIb3
DQEBBQUAA4ICAQA4TlqUoBR8baJ7KkYMC0lvfIO/QOB89NguiKmRVYngwVWD3Pqj
tbGwWr4FI8ueXJp/3LFhP+1PvmMTGS3m3dsZQt+xW8syKK5ZFMe60e3wcrdCZCnD
lwggbauCIJkdI/YkzsGwc6I4vQyyKhDLF6HvbYxYVG04yEHWwz5Qr6k0fVfY2HPp
5+mpTz4gaIIXnFY38dnjvq5I7FJvsjoyuT8ys4GrhD/Jafq72+eGR3xaGA850zcc
v9rU9MZGJJkor9dAxDncoaKnrS+Tm4ayPytEQaa/j8PcinV/HXkKbtX11XpypLBL
JZoi6RN44X+ge3lD9XqPPcEtShrx0Hu4TfQNkdJYypB4e43epLqwvIw4A/cM6Rih
ni+qk906EiS+o5Rv1PtyaA9sRROD5O1oXY6Fq/hb/3v/Jwauz8nAcoxDA8MYABK+
ww9NFZXPzOyljcKpqBtspA0W3S/0cUwHplFgh3wbUsyVw7m2FAN3E1d4dDwBeukr
bJcUTfNo4l4paadj3JApEK3CYnTLeBTbYAYn9C91gcO5Wd7xSI10hOmWPdKMyLYm
CBx1+l60CvvGtsT1RnRx+YmkjrIsdwu+Zc1XInbsSqG0YxaXkgxxufYnHsrdiHy0
gfOZArHzSTFRTsnkMwSmMNqKuHXCDBMPRNXRx5QipGiTWWt9nS/4/7RQOA==
-----END CERTIFICATE-----

Options

  • IA_IP_address—The IP address of the NDR appliance running the NDR API.

  • port_number—The port number of the NDR appliance running the NDR API.

  • token—This token authenticates the session. By default, the session times out after 24 hours.

  • user—The user ID.

  • role—The user's role.

Example

POST https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/client/ca

Required headers:

Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-Username: wheel
X-Role: wheel

Update CA certificate: Response

HTTP/1.1 [Response Code] [Response Message]				
Server: [Server]
Date: [Date]				
Content-Type: [Content Type]
Response fields
  • Response code—A standard HTTP response code.

    • 200—Request successful; the configuration was successful.

  • Response message—A standard HTTP response message.

    • OK—Request successful; the configuration was successful.

  • Server—The server being used.

  • Date—Standard HTML date format.

  • Content type—The response format.

Example
HTTP/1.1 200 OK
Server: nginx
Content-Type: application/x-pem-file; charset=utf-8

cURL code sample: Update CA certificate

curl -k -X POST --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
-H "X-Username: wheel" -H "X-Role: wheel" 
https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/client/ca-F 'f=@/path/to/ca.crt'

This cURL sample includes the following options:

  • -k—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate.

  • -X POST—Specifies using the POST method.

  • --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This option specifies the authentication token for this session.

  • -H "X-Username: wheel"—User name.

  • -H "X-Role: wheel"—User role.

  • https://xxx.xxx.xxx.xxx:443/config/v1/auth/x509/client/ca—The CA certificate file request URL. Replace xxx.xxx.xxx.xxx with the IP address of your NDR appliance.

  • -F 'f=@/path/to/ca.crt'—Specifies the path to the file containing the request body.

Results

This example updates the CA certificate.