During a security incident the first questions are always the same: what happened, when, to which accounts and through which systems? Without good logs the honest answer is “we don’t know”, which is a bad position with customers and regulators. In India, CERT-In’s directions also require logs of ICT systems to be kept for 180 days.
What to log
- Sign-ins, failed sign-ins, and password and MFA changes
- Permission and role changes, and admin actions
- Access to sensitive records, and bulk exports
- API errors and authorisation failures
- Changes to infrastructure, configuration and deployments
What never to log
Passwords, full card numbers, authentication tokens and unnecessary personal data should never reach your logs. Mask them at the source and test the masking, because logs are copied to many places and kept for a long time.
Make logs usable
Use structured logs with consistent fields, such as user, account, request ID and timestamp, send them to a central system and keep clocks synchronised. Alert on a short list of high-value signals, such as many failed sign-ins or a sudden bulk export, rather than on everything.
Our engineers and consultants write about what they see in real projects. Have a question about your own systems?





