ISO/IEC 27001

⌘K
  1. Home
  2. Docs
  3. ISO/IEC 27001
  4. Other Doc
  5. Security Log Retention Standard

Security Log Retention Standard

1. Purpose

The Security Log Retention Standard defines how security and operational logs are retained, protected, reviewed, and disposed of so that the organization can:

  • Detect and investigate security events and incidents.
  • Support incident response and digital investigations.
  • Maintain evidence required for audits and assessments.
  • Monitor unauthorized access and security-control activity.
  • Support business, contractual, legal, regulatory, and customer requirements.
  • Maintain sufficient historical information for trend analysis and forensic investigation.
  • Prevent unnecessary retention of sensitive information.

The objective is not to retain every log indefinitely. Logs should be retained for a defined period based on security value, risk, investigation requirements, contractual obligations, and applicable legal or regulatory requirements.


2. Scope

This standard applies to security-relevant logs generated by:

  • Cloud infrastructure
  • AWS accounts and services
  • Identity and access management systems
  • SSO and MFA systems
  • Firewalls and network security devices
  • VPN and remote-access systems
  • Endpoint security tools
  • Servers and operating systems
  • Applications and APIs
  • Databases
  • SaaS applications
  • Email and collaboration platforms
  • Web applications and WAF
  • Security monitoring and SIEM platforms
  • Vulnerability and security tools
  • CI/CD and source-code platforms
  • Backup and recovery systems
  • Administrative activity
  • Security incidents and investigations
  • Third-party and supplier systems where logs are contractually or operationally available

The standard applies to production, corporate, development, testing, and other environments where security-relevant logging is enabled.


3. Log Retention Principles

The organization should follow these principles:

3.1 Retain Logs Based on Risk

Retention periods should reflect the importance of the system, information, business process, and potential security impact.

3.2 Protect Logs From Unauthorized Modification

Security logs should be protected against unauthorized deletion, alteration, or tampering.

3.3 Separate Operational and Security Retention

Some logs may be retained for operational troubleshooting for a shorter period, while security logs may require longer retention.

3.4 Preserve Investigation Evidence

When an incident, investigation, audit, legal matter, or other defined requirement requires preservation, relevant logs must not be deleted according to the normal retention schedule.

3.5 Minimize Sensitive Information

Logs should not unnecessarily contain passwords, authentication secrets, API keys, private keys, session tokens, or other sensitive information.

3.6 Maintain Time Synchronization

Systems generating security logs should use reliable time synchronization so that events can be correlated accurately.

3.7 Review Retention Periods

Retention periods should be reviewed periodically and when business, technology, threat, contractual, legal, or regulatory requirements change.


4. Security Log Categories

The organization should identify logs according to their security value.

Log CategoryExamplesSecurity Purpose
AuthenticationLogin, logout, MFA, failed loginDetect unauthorized access
AuthorizationPermission changes, access deniedDetect privilege misuse
Privileged ActivityAdmin actions, role changesMonitor high-risk activity
Cloud ActivityAWS CloudTrail, cloud configuration changesInvestigate cloud activity
NetworkFirewall, VPN, DNS, VPC Flow LogsInvestigate network activity
EndpointEDR, malware, process activityDetect endpoint compromise
ApplicationLogin, API, security eventsInvestigate application activity
DatabaseAuthentication, administrative actions, queries where appropriateInvestigate database access
WAFBlocked/allowed requests, attack signaturesInvestigate web attacks
Security ToolsSIEM, IDS/IPS, GuardDuty, vulnerability alertsDetect threats
CI/CDDeployment, repository, pipeline, secret-related eventsInvestigate development compromise
Data AccessSensitive-data access eventsInvestigate unauthorized access
BackupBackup creation, deletion, restoreDetect backup manipulation
ConfigurationSecurity configuration changesDetect control weakening
IncidentIncident actions and response eventsSupport investigation and audit

5. Log Retention Requirements

The following baseline may be adopted by the organization and adjusted based on risk and applicable requirements.

Log TypeRecommended Minimum RetentionPriority
Privileged/Admin Activity12 monthsHigh
Authentication & MFA12 monthsHigh
Cloud Control-Plane Logs12 monthsHigh
Security Alerts12 monthsHigh
Firewall/WAF/Security Logs6–12 monthsHigh
Endpoint Security Logs6–12 monthsHigh
Application Security Logs6–12 monthsHigh
Database Security Logs6–12 monthsHigh
VPN/Remote Access Logs6–12 monthsHigh
CI/CD Security Logs6–12 monthsHigh
Vulnerability Scanner Results12 monthsMedium/High
Configuration Change Logs12 monthsHigh
Backup Activity Logs12 monthsHigh
General Application Logs30–180 daysMedium
Debug/Performance Logs7–90 daysLow/Medium
Security Incident LogsPer incident/evidence retention requirementCritical
Forensic EvidencePer investigation/legal requirementCritical

These are organizational baseline recommendations, not universal ISO 27001 retention periods. Actual retention should be determined using the organization’s risk assessment and applicable requirements.


6. Critical Security Logs

The organization should identify a minimum set of logs that must receive enhanced protection and retention.

For a SaaS startup, these normally include:

  • Identity-provider authentication logs
  • MFA activity
  • Privileged account activity
  • AWS CloudTrail
  • AWS IAM changes
  • Security-group and network configuration changes
  • S3 access and security-relevant activity
  • RDS administrative activity
  • ECS/EKS/compute administrative activity where applicable
  • Secrets-management activity
  • KMS/key-management activity
  • WAF security events
  • GuardDuty findings
  • Security Hub findings
  • Endpoint security alerts
  • CI/CD administrative activity
  • Production deployment activity
  • Source-code repository administrative activity
  • Security incident records

7. AWS SaaS Example

Consider a SaaS company running its production platform on AWS.

A minimum security logging architecture could include:

AWS Activity → CloudTrail → Central Log Storage → Access Control → Monitoring → Investigation → Retention/Deletion

Example

An administrator unexpectedly creates a new IAM role.

CloudTrail records:

  • Identity that performed the action
  • Timestamp
  • Source IP
  • API operation
  • AWS account
  • Resource
  • Result
  • Related request information

The organization retains the CloudTrail record according to the security-log retention schedule.

If the event later becomes part of an investigation, the relevant log is linked to:

Event → Incident → Evidence → Investigation → Root Cause → Corrective Action

The relevant evidence may then be placed under investigation-specific preservation rather than being deleted according to the normal retention schedule.


8. Log Protection

Security logs should be protected using appropriate technical and administrative controls.

Controls may include:

  • Least-privilege access
  • MFA for administrative access
  • Encryption at rest
  • Encryption in transit
  • Restricted deletion permissions
  • Centralized log storage
  • Immutable or tamper-resistant storage where appropriate
  • Access logging
  • Backup where justified
  • Integrity monitoring
  • Separation of log administration from ordinary system administration where practical
  • Alerting on unauthorized changes or deletion
  • Regular access review

For critical security logs, the organization should consider storage mechanisms that make unauthorized modification or deletion difficult.


9. Log Access Control

Access to security logs should be limited according to business and security requirements.

Typical access roles include:

RoleAccess
Security TeamInvestigation and monitoring
Incident Response TeamIncident-related investigation
Cloud/IT TeamOperational/security troubleshooting
System OwnerRelevant system logs
Internal AuditorRead-only evidence access where authorized
Compliance TeamAudit/compliance review
ManagementReporting and approved investigations
DevelopersLimited application logs required for their role

Users should not receive unrestricted access merely because they are administrators of the underlying system.


10. Log Integrity

The organization should implement reasonable measures to demonstrate that security logs have not been improperly altered.

Depending on risk, this may include:

  • Centralized collection
  • Write-protected storage
  • Immutable storage
  • Object-lock mechanisms
  • Access-control restrictions
  • Hashing for investigation-specific evidence
  • Integrity monitoring
  • Separate administrative roles
  • Monitoring of log deletion
  • Monitoring of logging configuration changes

For incident evidence, stronger evidence-preservation controls should be applied according to the Evidence Collection Procedure and Chain-of-Custody requirements.


11. Log Availability

Security logs should remain available for the required retention period.

The organization should consider:

  • Storage availability
  • Backup requirements
  • Cloud-region considerations
  • Disaster recovery
  • Log ingestion failures
  • Storage capacity
  • Searchability
  • Restoration capability
  • Security-tool dependencies

Critical security logs should not depend on a single storage location where such dependency creates unacceptable investigation risk.


12. Logging Failure

The organization should define how failures of critical logging are handled.

Examples include:

  • CloudTrail stops generating events.
  • SIEM ingestion fails.
  • WAF logs are no longer received.
  • Authentication logs are unavailable.
  • Endpoint security logs stop reporting.
  • Central log storage becomes inaccessible.

For critical systems, logging failures should generate an alert or ticket where practical.

The responsible team should:

  1. Identify the failure.
  2. Assess security impact.
  3. Determine the affected period.
  4. Restore logging.
  5. Investigate whether relevant activity occurred during the gap.
  6. Document the event.
  7. Assess whether additional monitoring is required.
  8. Record corrective action where appropriate.

13. Log Review

Retention alone does not provide effective monitoring.

Security-relevant logs should be reviewed or monitored based on risk.

Examples:

  • Repeated failed privileged logins
  • MFA changes
  • New privileged accounts
  • Permission changes
  • Security-control disabling
  • Unexpected geographic access
  • Unusual API activity
  • Large data downloads
  • Public storage changes
  • Security-group changes
  • Creation of unexpected cloud resources
  • Log deletion attempts
  • Unexpected production deployments

Automated detection may be used where appropriate.


14. Incident-Related Log Preservation

When an event becomes a formal incident or investigation, normal log deletion schedules may no longer apply to relevant evidence.

The Incident Response Team should identify:

  • Relevant systems
  • Relevant accounts
  • Relevant time period
  • Relevant log sources
  • Relevant cloud resources
  • Relevant application activity
  • Relevant security alerts
  • Relevant communications

Relevant logs should then be preserved according to the organization’s evidence-preservation requirements.

Example

Normal retention:

AWS CloudTrail → 12 months

Incident preservation:

Security incident identified → relevant CloudTrail records preserved → evidence ID assigned → integrity verified where appropriate → linked to investigation → retained according to investigation requirements.


15. Log Retention Exceptions

An exception may be required when:

  • A customer contract requires longer retention.
  • A legal or regulatory requirement applies.
  • An active investigation requires preservation.
  • An insurance requirement applies.
  • An audit requires additional historical evidence.
  • A critical security investigation requires extended retention.
  • A business requirement justifies a longer period.

Exceptions should document:

  • Reason
  • Log source
  • Required retention period
  • Risk
  • Owner
  • Approval
  • Review date
  • Disposal date where applicable

16. Legal Hold / Investigation Hold

Where an authorized legal, regulatory, investigative, or incident-preservation requirement exists, relevant logs must be protected from routine deletion.

The responsible owner should document:

  • Hold reason
  • Scope
  • Relevant systems
  • Date range
  • Log sources
  • Responsible person
  • Approval
  • Release/closure condition

The normal retention schedule should resume only after the hold is formally released, where applicable.


17. Log Disposal

At the end of the approved retention period, logs should be securely deleted or otherwise disposed of according to the organization’s information-disposal requirements.

Before disposal, the owner should verify:

  • Retention period has expired.
  • No investigation hold exists.
  • No legal/regulatory requirement requires continued retention.
  • No active incident depends on the logs.
  • No contractual requirement requires continued retention.
  • Disposal is authorized.

Where technically and operationally appropriate, automated lifecycle rules may be used.


18. Log Retention Register

The organization should maintain a central register for important log sources.

FieldDescription
Log IDUnique identifier
Log SourceSystem/service generating logs
Log TypeAuthentication, cloud, application, etc.
System OwnerResponsible owner
EnvironmentProduction/Corporate/Development
Information SensitivityClassification
Security CriticalityLow/Medium/High/Critical
Collection MethodSIEM/API/agent/cloud service
Storage LocationApproved repository
Retention PeriodApproved duration
ProtectionEncryption/immutability/access controls
MonitoringMonitoring method
BackupRequired/not required
Investigation HoldYes/No
Disposal MethodDeletion/lifecycle rule
Last ReviewReview date
Next ReviewPlanned date
ApprovalAuthorized owner

19. Log Retention Review

The Security or ISMS function should periodically review:

  • Whether required logs are being generated.
  • Whether critical logs are being collected.
  • Whether retention periods remain appropriate.
  • Whether logs can be retrieved.
  • Whether access is appropriately restricted.
  • Whether log integrity controls remain effective.
  • Whether logging gaps occurred.
  • Whether incidents required extended retention.
  • Whether legal, regulatory, customer, or contractual requirements changed.
  • Whether storage costs remain reasonable.
  • Whether unnecessary logs can be removed.

20. Minimum Security Log Review Checklist

Before closing a review, confirm:

  • Critical systems have identified security logs.
  • Log sources are documented.
  • Retention periods are defined.
  • Retention periods are risk-based.
  • Critical logs are protected against unauthorized deletion.
  • Access is restricted.
  • Logs are encrypted where required.
  • Time synchronization is configured.
  • Critical logging failures are detected.
  • Security alerts are monitored.
  • Incident-related logs can be preserved.
  • Investigation holds can override normal deletion.
  • Disposal is controlled.
  • Retention register is current.
  • Log access is periodically reviewed.
  • Retention requirements are periodically reassessed.

21. Startup Implementation

A startup does not need a complicated SIEM architecture on day one.

A practical implementation could be:

Identity Provider
→ Authentication/MFA Logs

AWS
→ CloudTrail + Security Findings + Relevant Service Logs

Production Application
→ Application/API Security Logs

Endpoint
→ EDR/Security Logs

Central Repository
→ Protected Log Storage

Monitoring
→ Security Alerts

Incident Response
→ Investigation + Evidence Preservation

Retention
→ Automated Lifecycle Rules

The important objective is not the number of security tools. It is the ability to answer:

Who did what, when, from where, against which system, and what happened afterward?


22. Relationship With Other ISMS Documents

This standard should operate as part of the wider ISMS.

DocumentRelationship
Logging & Monitoring StandardDefines what should be logged and monitored
Access Control PolicyDefines access to systems and logs
Incident Response ProcedureUses logs during incident response
Security Event Assessment ProcedureUses logs to validate events
Evidence Collection ProcedureDefines collection of investigation evidence
Evidence RegisterTracks preserved evidence
Digital Forensics ProcedureSupports forensic examination
Incident Investigation ReportUses logs as investigation evidence
Incident TimelineUses timestamps and log records
Root Cause AnalysisUses logs to establish cause
Corrective Action TrackerTracks improvements resulting from findings
Risk RegisterRecords material security risks
ISMS Improvement LogTracks systemic improvements
Business Continuity/DRUses logs for recovery and investigation

23. ISO 27001 Alignment

This standard supports the organization’s implementation of ISO/IEC 27001:2022 controls related to areas such as:

  • Event logging
  • Monitoring activities
  • Information security event assessment
  • Incident management
  • Access control
  • Privileged access
  • Configuration management
  • Protection of information
  • Backup and recovery
  • Evidence preservation
  • Security monitoring

The exact controls and implementation should be determined through the organization’s risk assessment and Statement of Applicability (SoA).

The retention periods in this document are organizational standards; ISO 27001 does not prescribe one universal retention period for every type of security log.


24. Audit Evidence

Typical evidence demonstrating implementation includes:

  • Security Log Retention Standard
  • Log Retention Register
  • AWS CloudTrail configuration
  • Identity-provider logs
  • MFA logs
  • WAF/security logs
  • SIEM/log-management configuration
  • Log retention configuration
  • Storage access-control configuration
  • Immutable-storage configuration where applicable
  • Log monitoring alerts
  • Logging failure alerts
  • Log access review records
  • Incident-related preserved logs
  • Evidence Collection Forms
  • Evidence Register
  • Chain-of-Custody records where applicable
  • Retention review records
  • Log disposal records
  • Exceptions and approvals
  • Internal audit observations
  • Corrective actions

25. Example Audit Trail

Log Source Identified
→ Security Value Assessed
→ Retention Requirement Defined
→ Retention Period Approved
→ Log Collection Enabled
→ Central Storage Configured
→ Access Restricted
→ Integrity Protection Implemented
→ Monitoring Enabled
→ Retention Period Monitored
→ Investigation Hold Applied When Required
→ Relevant Incident Logs Preserved
→ Retention Reviewed
→ Disposal Authorized
→ Logs Securely Disposed
→ Record Updated


26. Final Principle

A security log is useful only if the organization can generate it, protect it, retain it long enough, retrieve it when needed, understand its context, and preserve it when it becomes evidence.

Log → Protect → Retain → Monitor → Retrieve → Preserve → Investigate → Dispose Securely

The objective is not “keep everything forever.”

The objective is:

Keep the right logs + for the right period + with the right protection + with the ability to use them when security matters.

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *