mirror of
https://github.com/itflow-org/itflow
synced 2026-11-30 16:19:00 +00:00
Audit logs stage 3: failed sign-ins say why and are logged against the account they were for - wrong password, no account with that email, disabled, archived or invited account, client archived, portal turned off, a wrong MFA or two-step code after the right password - with failed Microsoft 365 portal sign-ins logged too and marked Their account in the audit log; the IP lockout counts portal failures as well; the first sign-in from an IP address is badged New IP in the audit lists and quick look; new Admin > Sign-ins under Access with People and IP addresses views, search, date filter, sortable columns and paging; admins get a notification and an email on a run of failed sign-ins or turned-away API calls from one address or against one account, set in Settings > Security (10 to start, 5, 20, 50 or never), each in the audit log Security view and in Mail > Previews; API calls counted per key, day and endpoint, with a 30-day calls column and last IP on API Keys and a usage window, expired-key calls logged against the key, and usage deleted with the key and after the log retention; database 3.3.2 drops the unused auth_logs table and adds settings.config_login_alert_failures and api_key_usage; new functions/sign_in.php, admin/sign_ins.php and admin/modals/api/api_key_usage.php; the license template page no longer warns when view is missing
This commit is contained in:
@@ -112,6 +112,7 @@ if (isset($_GET['delete_api_key'])) {
|
||||
}
|
||||
|
||||
mysqli_query($mysqli, "DELETE FROM api_keys WHERE api_key_id = " . intval($row['api_key_id']));
|
||||
mysqli_query($mysqli, "DELETE FROM api_key_usage WHERE api_key_usage_key_id = " . intval($row['api_key_id']));
|
||||
|
||||
logAudit("API Key", "Delete", "$session_name deleted API key " . escapeSql($row['api_key_name']), 0, $row['api_key_id']);
|
||||
|
||||
@@ -132,6 +133,7 @@ if (isset($_POST['bulk_delete_api_keys'])) {
|
||||
continue;
|
||||
}
|
||||
mysqli_query($mysqli, "DELETE FROM api_keys WHERE api_key_id = $api_key_id");
|
||||
mysqli_query($mysqli, "DELETE FROM api_key_usage WHERE api_key_usage_key_id = $api_key_id");
|
||||
logAudit("API Key", "Delete", "$session_name deleted API key " . escapeSql($row['api_key_name']), 0, $api_key_id);
|
||||
$count++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user