Edit Managed Credentials

If you edit managed credentials, Tenable Vulnerability Management uses the updated credentials data in every scan using those managed credentials.

To edit managed credentials:

  1. Determine the UUID of the credentials you want to edit.
  2. (Optional) Review the current settings for the managed credentials you want to edit.
  3. (Optional) Use the POST /credentials/files endpoint to upload any file needed for a specific setting (for example, a private key file for SSH credentials). Be sure to retain the fileuploaded value from the response message to use in the credentials creation request.
  4. Construct a request for the PUT /credentials/{uuid} endpoint.

Example Request Body: Windows Credentials

The following is an example of JSON request body for editing Windows host credentials:

{
    "name": "Standard Windows",
    "description": "Template Windows credentials for Columbia, MD office devices",
    "ad_hoc": "false",
    "settings": {
        "domain": "",
        "username": "[email protected]",
        "auth_method": "Password",
        "password": "aJ^deq34Rc"
    },
    "permissions": [
        {
            "grantee_uuid": "1976508a-4f3c-49d6-91a7-075f2a08e481",
            "type": "user",
            "permissions": 64,
            "name": "[email protected]"
        }
    ]
}

Example Request Body: SSH Credentials

The following is an example of JSON request body for editing SSH certificate credentials.

In this example, the fileuploaded values from the POST /credentials/files response messages you submitted are ssh_user_cert and ssh_private_key.

{
    "name": "Standard SSH",
    "description": "Template SSH credentials for Columbia, MD office devices",
    "ad_hoc": "false",
    "settings": {
    	"auth_method": "certificate",
        "username": "[email protected]",
        "user_cert": "ssh_user_cert",
        "private_key": "ssh_private_key",
    },
    "permissions": [
        {
            "grantee_uuid": "1976508a-4f3c-49d6-91a7-075f2a08e481",
            "type": "user",
            "permissions": 64,
            "name": "[email protected]"
        }
    ]
}