The Importance of Logging
24 April, 2019
Today’s topic: The Importance of Logging
One of the biggest security issues is called insufficient logging. This allows attackers to attacks systems without being detected so that they can tamper, extract or destroy data because either logging doesn’t exist or it’s not up to par. With most breaches that have happened in the past, the time to detect a breach is about 200 days! It’s also typically detected externally by security teams rather than internal monitoring.
To combat this, you want to have proper logging and monitoring setup for your app. Logging helps to get information about your system especially how users use your service/web app. If something goes wrong or if you see something suspicious, you can take a look and see what’s going on and possibly prevent an attacks.
Logging is a complex issue, you need to find the balance between logging too much information and not logging enough. You need to keep enough to be able to detect issues but not too much that it’s too difficult to go through (there are other apps to help with this. Ex. Elasticsearch). You also need to make sure that your logs don’t get into the wrong hands because that will reveal a lot of information.
If you are using NodeJS, take a look at the packages Winston or Morgan that will help you get logging and monitoring setup.