summaryrefslogtreecommitdiffstats
path: root/db_structure.xml
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-07-20 18:36:15 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-07-20 22:08:56 +0200
commitba4f12baa02dfb55ec8822687896d643261440c4 (patch)
tree5dc95ab54a2ae169951693a43ba7aa6920d6f36a /db_structure.xml
parent7cdf6402ff9a0e07866ca8bcfcffd0e0897b646a (diff)
downloadnextcloud-server-ba4f12baa02dfb55ec8822687896d643261440c4.tar.gz
nextcloud-server-ba4f12baa02dfb55ec8822687896d643261440c4.zip
Implement brute force protection
Class Throttler implements the bruteforce protection for security actions in Nextcloud. It is working by logging invalid login attempts to the database and slowing down all login attempts from the same subnet. The max delay is 30 seconds and the starting delay are 200 milliseconds. (after the first failed login)
Diffstat (limited to 'db_structure.xml')
-rw-r--r--db_structure.xml78
1 files changed, 78 insertions, 0 deletions
diff --git a/db_structure.xml b/db_structure.xml
index 1127f0d82d4..04c91ea494f 100644
--- a/db_structure.xml
+++ b/db_structure.xml
@@ -1166,6 +1166,84 @@
<table>
<!--
+ List of usernames, their display name and login password.
+ -->
+ <name>*dbprefix*bruteforce_attempts</name>
+
+ <declaration>
+ <field>
+ <name>id</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <autoincrement>1</autoincrement>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>action</name>
+ <type>text</type>
+ <default></default>
+ <notnull>true</notnull>
+ <length>64</length>
+ </field>
+
+ <field>
+ <name>occurred</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>ip</name>
+ <type>text</type>
+ <default></default>
+ <notnull>true</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>subnet</name>
+ <type>text</type>
+ <default></default>
+ <notnull>true</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>metadata</name>
+ <type>text</type>
+ <default></default>
+ <notnull>true</notnull>
+ <length>255</length>
+ </field>
+
+ <index>
+ <name>bruteforce_attempts_ip</name>
+ <field>
+ <name>ip</name>
+ <sorting>ascending</sorting>
+ </field>
+ </index>
+ <index>
+ <name>bruteforce_attempts_subnet</name>
+ <field>
+ <name>subnet</name>
+ <sorting>ascending</sorting>
+ </field>
+ </index>
+
+ </declaration>
+
+ </table>
+
+ <table>
+
+ <!--
List of tags (category) + a unique tag id (id) per user (uid) and type.
-->
<name>*dbprefix*vcategory</name>