Add a blacklist entry for an IP and/or login. Note that netmask and ip parameters are mutually exclusive.
Provide IP and/or login
expire_secs | integer |
ip | string |
login | string |
netmask | string |
reason | string |
{- "expire_secs": 3600,
- "ip": "127.0.0.1",
- "netmask": "2001:503:ba3e::/64",
- "reason": "Too many bad passwords"
}
{- "status": "ok"
}
Query whether a login should be allowed
Login Tuple for allow command
object (LTAttrs) | |
device_id | string |
login required | string |
protocol | string Enum: "http" "imap" "pop" "smtp" "mobileapi" |
pwhash required | string |
remote required | string |
tls | boolean |
{- "attrs": {
- "foo": "bar"
}, - "login": "joe.bloggs",
- "protocol": "http",
- "pwhash": "cc04",
- "remote": "192.168.1.2",
- "success": true,
- "tls": true
}
{- "msg": "string",
- "r_attrs": {
- "two_factor_required": true
}, - "status": 0
}
Extensible mechanism allows custom REST endpoints to be defined - this is an example
Arguments to custom REST endpoint
required | object (LTAttrs) |
{- "attrs": {
- "key”:”value": null
}
}
{- "r_attrs": {
- "two_factor_required": true
}, - "success": true
}
Delete a blacklist entry for an IP and/or login. Note that netmask and ip parameters are mutually exclusive.
Provide IP and/or login
ip | string |
login | string |
netmask | string |
{- "ip": "127.0.0.1",
- "netmask": "2001:503:ba3e/64"
}
{- "status": "ok"
}
{- "bl_entries": [
- {
- "ip": [
- {
- "expiration": "2002-Jan-01 10:00:01",
- "login": "joe.bloggs",
- "reason": "Too many invalid login attempts from greylisted countries"
}
], - "iplogin": [
- {
- "expiration": "2002-Jan-01 10:00:01",
- "login": "joe.bloggs",
- "reason": "Too many invalid login attempts from greylisted countries"
}
], - "login": [
- {
- "expiration": "2002-Jan-01 10:00:01",
- "login": "joe.bloggs",
- "reason": "Too many invalid login attempts from greylisted countries"
}
]
}
]
}
Get the db stats for an IP and/or login
Provide IP and/or login
ip | string |
login | string |
{- "ip": "127.0.0.1"
}
{- "blacklisted": true,
- "key_name": "string",
- "stats": {
- "db_name": {
- "countLogins": 239,
- "diffPassword": 10
}
}
}
Creates a new report about a login (successful or unsuccessful)
Login Tuple for report command
object (LTAttrs) | |
device_id | string |
login required | string |
policy_reject | boolean |
protocol | string Enum: "http" "imap" "pop3" "smtp" "mobileapi" |
pwhash required | string |
remote required | string |
success required | boolean |
tls | boolean |
{- "login": "joe.bloggs",
- "pwhash": "cc04",
- "remote": "192.168.1.2",
- "success": true
}
{- "status": "ok"
}
Reset the stats and any blacklist entry for an IP and/or login
Provide IP and/or login
ip | string |
login | string |
{- "ip": "127.0.0.1"
}
{- "status": "ok"
}