OpenConext / OpenConext-engineblock

OpenConext SAML 2.0 IdP/SP Gateway
14 stars 22 forks source link

Improve dumping attachments to syslog #71

Closed relaxnow closed 9 years ago

relaxnow commented 10 years ago

From issue #37 :

https://github.com/OpenConext/OpenConext-engineblock/blob/463af16091934bc72cf50945f27aa7c914ccd35a/library/EngineBlock/Log.php#L60

"Allocating huge blocks of memory like this may facilitate denial-of-service attacks? (and I think attachments should not be dumped to syslog :-)"

relaxnow commented 10 years ago

So I should give some backstory on why this approach was chosen as we didn't chose this lightly (though I also think giving every PHP process 256Mb of memory to dump an object is a mistake).

We chose to add the attachments to syslog because otherwise we would have to:

If you want to improve this I suggest investigating tools like LogStash, Splunk, Kibana, etc...

For more information see the RFC where we specified this behaviour: https://wiki.surfnet.nl/display/conextdocumentation/Error+Reporting+and+Logging

joostd commented 10 years ago

Let's leave the current practice intact then, and just reduce the 256mb memory block to a more conservative value