“Add a blacklist entry for an IP and/or login“
Provide IP and/or login
expire_secs | integer |
ip | string |
login | string |
reason | string |
{- "expire": 3600,
- "ip": "127.0.0.1",
- "reason": "“Too many bad passwords”"
}
{- "status": "ok"
}
Query whether a login should be allowed
Login Tuple for allow command
object (LTAttrs) | |
login required | string |
pwhash required | string |
remote required | string |
{- "attrs": {
- "foo": "bar"
}, - "login": "joe.bloggs",
- "pwhash": "cc04",
- "remote": "192.168.1.2",
- "success": true
}
{- "msg": "string",
- "r_attrs": {
- "two_factor_required": true
}, - "status": 0
}
{- "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) | |
login required | string |
policy_reject | boolean |
pwhash required | string |
remote required | string |
success required | 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"
}