databunker icon indicating copy to clipboard operation
databunker copied to clipboard

ValidateNewApp limits tables created

Open jpadilla06 opened this issue 4 years ago • 3 comments

Given the line here, https://github.com/securitybunker/databunker/blob/master/src/userapps_api.go#L28 with implementation here: https://github.com/securitybunker/databunker/blob/bd6af1443b35445fc5a7a0c4f4f4c6837c7f020f/src/storage/mysql-storage.go#L871

Does databunker limit the number of tables that can be created for users given the hardcoded 100 for SQL and 10 for SQLite? We seem to be encountering the 405 db limitation error after a while which gets fixed when databunker is re-upped. Can we get clarity on the purpose of the limit? Thank you!

jpadilla06 avatar Nov 08 '21 07:11 jpadilla06

Hi,

There is no real need for this limitation.

I will remove it and publish an updated version later today.

stremovsky avatar Nov 08 '21 09:11 stremovsky

I fixed the code and updated the docker containers.

https://github.com/securitybunker/databunker/commit/bdd7a28b66f1134e53837639b7cd0d36ae2b015f

stremovsky avatar Nov 08 '21 18:11 stremovsky

I created a new patch to support multiple apps in 1 table. https://github.com/securitybunker/databunker/commit/4876cfe8aa436f356e909318ffe20b87e003cb42

The generic.use_separate_app_tables variable can be configured to use multiple tables (the old way) or use only 1 table for all apps (the default new way).

This patch was done in order to remove the requirement to have higher database permissions. Those permissions were required to create additional application tables.

stremovsky avatar Nov 20 '21 19:11 stremovsky