To replace the signed client certificate for machine to machine communication, send the following request:
POST https://<IA_IP_address>:<port_number>/config/v1/auth/x509/client/cert
Note
To use this request, your user account must have sudo access.
Required headers:
Cookie: px=<token> X-Username: <user> X-Role: <role>
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/cert
Required headers:
Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx X-Username: wheel X-Role: wheel
Replace signed client certificate: Response
HTTP/1.1 [Response Code] [Response Message] Server: [Server] Date: [Date] Content-Type: [Content Type] Content-Disposition: inline; filename="cert.crt" -----BEGIN CERTIFICATE----- <cert> -----END CERTIFICATE-----
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 Date: Fri, 16 Aug 2019 11:33:14 GMZ Content-Disposition: inline; filename="cert.crt" -----BEGIN CERTIFICATE----- MIID+TCCAeECAQEwDQYJKoZIhvcNAQEFBQAwgYcxCzAJBgNVBAYTAlVTMQswCQYD VQQIDAJWQTEPMA0GA1UEBwwGUmVzdG9uMRAwDgYDVQQKDAdGaXJlRXllMQswCQYD VQQLDAJFRjESMBAGA1UEAwwJbG9jYWxob3N0MScwJQYJKoZIhvcNAQkBFhhyb2Jl cnQucGVycnlAZmlyZWV5ZS5jb20wHhcNMTkwMTMxMTUwNTU3WhcNMjAwMTMxMTUw NTU3WjCBgDELMAkGA139LCMCVVMxCzAJBgNVBAgMAlZBMQ88BBYDVQQHDAZSZXN0 b24xEDAOBgNVBAoMB0ZpcmVFeWUxCzAJBgNVBAsMAkVGMQswCQYDVQQDDAJtZTEn MCUGCSqGSIb3DQEJARYYcm9iZXJ0LnBlcnJ5QGZpcmVleWUuY29tMIGfMA0GCSqG SIb3DQEBAQUAA4GNADCBiQKBgQDAcIIbunGrTd1oo16rq6MCvk+zE2p+SS93tAUf aYreHcAlwwiFxV0aMNPEZHsOgtJctitEihjL4ts8qQXujfoz1PlNNvDePcXbBIkd cIO9dOnYF1RRPEzjtrxnns8XPYqa/yJoxtXjQumFmcueWepr8iwpDQklQ4foSHU9 99jtiwIDAQABMA0GCSqGSIb3DQEBBQUAA4ICAQAbc2ffJmi4VqEFI0I2ctYavsRh HYGR0sAokoJOFDYFa+V9uOFyAClj2pyHCRVnz+9eC0jMtGSXTRk8imQXaazh7ftn 1h7V2Itu2Ed285obBBozuM+b21Ifq9/1dvqfFTlHVJgzTlaYZGJz6VNHy66G/1A9 KHIb/M7WsaKGgr1naqb5u91hqi7ZfEc3AJ9sKjq0uEJ2kQAn7zUaLGpJvNZ0TOky KRFNpIMmht6y9qqhuXtePzW91uSL5NxyJob7v6lQY+qjHyX2gcugzX8qZCpQsKfh 0URVTwhi7HJBYaO8Uz8gG+Nef4P6ijVml0CU6wnS8Yvfbo3c0L+Kn+RCUBkxpHn2 vtmGVZicoK5gw5dxfJ+tLfJIkh7jpjpP7H0OFOiR05TnoxPM8sP5xVbzcmId9Lua MVrYzh3/4dBib5zwdGzENyBtcV6ozFksVp+ry5tbWRt4AO9bCu3/bLh4R2Ry+aQ1 i32XppkXos1Sma64dOUp+F/Qa7OhbZNWXJJWsBeKYJkJGfZW60iyoQ7OgAeioDas A/CJPyD6Fp/NfrBwcZamcXifNYxJSLzGzgsWD676WYTEQA2uX28wpbO673rB/LPK xXebSFhfO9pz1kqiJi9GG3nyGRWzT5OMa/banM6wtpUNaO/FaTckH67uOxSubD+x mrlRZhyDtihYm4FiEA== -----END CERTIFICATE-----
cURL code sample: Replace signed client 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/cert -F "f=@/path/to/cert.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/cert—The certificate request URL. Replacexxx.xxx.xxx.xxxwith the IP address of your NDR appliance.-F "f=@/path/to/cert.crt"—Specifies the certificate file.
Results
This example replaces the signed client certificate.