Adds security tools, such as a rate limiter, IP block/allow, server logs (#1606)

* added ratelimiter
* Adds server logs to admin ui
* Added IP allow/ban list
* fixed remove ips
* Split rate limit number and unit
* security tab and background tasks for killswitch
* fix test for auditor api

---------

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Arc
2023-06-20 11:26:33 +02:00
committed by GitHub
co-authored by dni ⚡
parent 758a4ecaf6
commit 7e1f43933d
21 changed files with 963 additions and 123 deletions
+48 -1
View File
@@ -122,5 +122,52 @@ window.localisation.en = {
description: 'Description',
expiry: 'Expiry',
webhook: 'Webhook',
payment_proof: 'Payment Proof'
payment_proof: 'Payment Proof',
update_available: 'Update %{version} available!',
latest_update: 'You are on the latest version %{version}.',
notifications: 'Notifications',
no_notifications: 'No notifications',
notifications_disabled: 'LNbits status notifications are disabled.',
enable_notifications: 'Enable Notifications',
enable_notifications_desc:
'If enabled it will fetch the latest LNbits Status updates, like security incidents and updates.',
enable_killswitch: 'Enable Killswitch',
enable_killswitch_desc:
'If enabled it will change your funding source to VoidWallet automatically if LNbits sends out a killswitch signal. You will need to enable manually after an update.',
killswitch_interval: 'Killswitch Interval',
killswitch_interval_desc:
'How often the background task should check for the LNBits killswitch signal from the status source (in minutes).',
enable_watchdog: 'Enable Watchdog',
enable_watchdog_desc:
'If enabled it will change your funding source to VoidWallet automatically if your balance is lower than the LNbits balance. You will need to enable manually after an update.',
watchdog_interval: 'Watchdog Interval',
watchdog_interval_desc:
'How often the background task should check for a killswitch signal in the watchdog delta [node_balance - lnbits_balance] (in minutes).',
watchdog_delta: 'Watchdog Delta',
watchdog_delta_desc:
'Limit before killswitch changes funding source to VoidWallet [lnbits_balance - node_balance > delta]',
status: 'Status',
notification_source: 'Notification Source',
notification_source_label:
'Source URL (only use the official LNbits status source, and sources you can trust)',
more: 'more',
releases: 'Releases',
killswitch: 'Killswitch',
watchdog: 'Watchdog',
server_logs: 'Server Logs',
ip_blocker: 'IP Blocker',
security: 'Security',
security_tools: 'Security tools',
block_access_hint: 'Block access by IP',
allow_access_hint: 'Allow access by IP (will override blocked IPs)',
enter_ip: 'Enter IP and hit enter',
rate_limiter: 'Rate Limiter',
number_of_requests: 'Number of requests',
time_unit: 'Time unit',
minute: 'minute',
second: 'second',
hour: 'hour',
disable_server_log: 'Disable Server Log',
enable_server_log: 'Enable Server Log',
coming_soon: 'Feature coming soon'
}