Configuration settings for individual networks can be changed by using a PUT command for the networks endpoint. Specify the new configuration settings in the body of the command, referencing individual networks by their network GUID (that you have obtained using a GET command).
Example:
PUT https://192.168.0.1/networks
{
"AB233237-986B-4A6E-99AC-9B5D21AF4817": {
"probes":{
"wmi": {
"enabled": true,
"method": "network",
"credentials": [{
"user": "user",
"password": "password"
}]
}
}
},
"BDDEE0CA-E615-49BB-9E13-356D308207BB": {
"probes":{
"wmi": {
"enabled": true,
"method": "network",
"credentials": [{
"user": "user",
"password": "password"
}]
}
}
}
}
Here we enable WMI probing for two networks and also set the access credentials to be used.
The method field can have the values network and global. Setting the value global will make Asset Discovery use the global access credentials for the respective protocol in the respective network; in this case the credentials field will be ignored.
Setting credentials is not limited to WMI. Example:
PUT https://192.168.0.1/networks
{
"AB233237-986B-4A6E-99AC-9B5D21AF4817": {
"ssh": {
"credentials": [{
"user": "SSH user name",
"password": "SSH password",
"port": "22"
},
{
"user": "Other SSH user name",
"password": "Other SSH password",
"port": "2222"
}]
}
"snmp": {
"credentials": [{
"version": 1,
"community": "Public community",
},
{
"version": 2,
"community": "Public community"
},
{
"version": 3,
"user": "SNMP user",
"authProtocol": "SNMP auth protocol",
"authKey": "",
"privProtocol": "SNMP priv protocol",
"privKey": "",
}]
}
}
Key | Possible Values |
---|---|
SNMP auth protocol | 'none', 'md5', 'sha', 'sha224', 'sha256', 'sha384', 'sha512' |
SNMP priv protocol | 'none', 'des', '3desede', 'aescfbB128', 'aescfb192', 'aescfb256', 'aesblumenthal192', 'aesblumenthal256' |
You can only set all configuration settings at once. For security reasons, there is no way to retrieve the current credentials.
Removing all access credentials
You can remove all access credentials by using an empty list:
PUT https://192.168.0.1/networks
{
"AB233237-986B-4A6E-99AC-9B5D21AF4817": {
"probes":{
"wmi": {
"enabled": true,
"method": "global",
"credentials": []
}
}
}
}
Setting IP address ranges
IP address ranges can be specified for a network by providing start and end IP address lists using the probeRanges list:
PUT https://192.168.0.1/networks
{
"AB233237-986B-4A6E-99AC-9B5D21AF4817": {
"probeRanges":[{
"first": "192.168.10.10",
"last": "192.168.10.19"
}, {
"first": "192.168.10.30",
"last": "192.168.10.39"
}]
}
}
Comments
0 comments
Please sign in to leave a comment.