ModSecurity icon indicating copy to clipboard operation
ModSecurity copied to clipboard

Implement a SharedMemory mechanism as Collection backend on libmodsecurity

Open zimmerle opened this issue 10 years ago • 7 comments

ModSecurity version 3 architecture allow the utilization of multiple backends, including a shared memory one. The support should be implemented. The interface is available here:

https://github.com/SpiderLabs/ModSecurity/blob/libmodsecurity/headers/modsecurity/collection/collection.h

zimmerle avatar May 05 '16 02:05 zimmerle

As of: 833089eb70f6049c73db5ce9394e765594e43e9e collections can be saved using LMDB. LMDB support the access from multiprocess. Further info about LMDB: https://github.com/LMDB/lmdb

zimmerle avatar Jul 08 '16 13:07 zimmerle

Hi,

How to configure mod_security to use this LMDB? Could someone please post config sample, thanks a lot!

ghost avatar Feb 26 '17 08:02 ghost

Any update on how to configure it?

ghost avatar Feb 01 '18 22:02 ghost

@HOSTED-POWER Hi, If you have lmdb installed, you could enable it by passing --with-lmdb to modsecurity configure script. Good luck

Roger-Man avatar Nov 01 '18 10:11 Roger-Man

Hey Roger-Man,

Thanks a lot for your feedback! Just pass it and it will use it? :)

Any idea about redis by coincidence?

ghost avatar Nov 01 '18 20:11 ghost

Hi @HOSTED-POWER,

Redis is not yet supported. Check #1139.

zimmerle avatar Nov 01 '18 21:11 zimmerle

Hi @HOSTED-POWER

Hi just pass it and the configure script uses it. But, Hey just don't pass it. Its so buggy and ends up in nginx worker process to crash and exit. This result in user session termination with empty responses. The logs complain about

double free or corruption

May be thats why no one including @zimmerle answered you how to configure it for a long time. I know he actively replies the posts.

Roger-Man avatar Nov 20 '18 18:11 Roger-Man