Audit logs need a purpose and a life cycle
A national customer portal records logins, password resets, administrative actions, exports and failed access attempts. Its logs are scattered across identity services, cloud infrastructure, application databases and external monitoring. The security team wants long retention for investigations; the privacy team questions indefinite storage of IP addresses, identity attributes and detailed user behaviour. Both concerns are legitimate. Retention should be set by the purpose and risk of each log category, not by an accidental storage default or a single blanket number.
Start by asking what decisions the records must support: investigating account takeover, proving a consent or access change, resolving a disputed transaction, detecting abuse, or meeting applicable records obligations. A national portal may have statutory and agency-specific retention duties that differ from ordinary commercial services. Those need legal and records-management review rather than a generic cybersecurity recommendation copied into the schedule.
Classify events before assigning retention
A login event may need time, user pseudonym, result, application, session identifier, source context and device signal. It usually does not need a copy of the password, full access token or sensitive form contents. An administrative export event may need the target dataset and approving role but not the full downloaded document. Define a schema for each high-value event and document which fields are required for correlation. Standardise clocks and time zones so cross-provider timelines are reconstructable.
Separate high-volume diagnostic traces from security audit records. A debug log that captures API request bodies can contain personal or financial information even when a vendor labels it operational telemetry. Apply minimisation and filtering at collection, not only after data has been indexed. Where sensitive values are needed for a specific investigation, use controlled preservation rather than leaving all verbose logging permanently enabled.
Work backwards from plausible investigations
Conduct a tabletop account takeover in which the user reports suspicious access several weeks after the first anomalous login. Determine whether identity-provider events, application decisions and administrative changes can be correlated across that period. A second case might concern a staff member exporting customer records before leaving. A third may involve a delayed complaint about an unauthorised address change. For each, identify the earliest event needed and how quickly the security team would know it must preserve records.
If a supplier retains logs only briefly, the portal operator may need a secure export pipeline or a more frequent collection schedule. Make the decision on actual log availability, query access and incident-response lead times. Saving everything forever is not the only answer to missing evidence. Appropriate storage tiers, access controls and preservation holds can support investigations while limiting everyday exposure.
Prove integrity and access restrictions
A log that can be edited by the same administrator whose actions it records may provide weak evidence. Review write permissions, separation of duties, protection against deletion, clock synchronisation and detection of ingestion gaps. Store audit records in an environment where authorised investigators can retrieve them but ordinary application operators cannot silently alter them. Use integrity features supported by the logging platform, while acknowledging that a checksum alone does not prove the original event was truthful.
Test the ability to retrieve a specific user’s relevant events within the required investigative window. Verify that a legitimate search returns appropriately scoped results and that unrelated customer data is not exposed through broad log access. Investigators should record purpose, search criteria, approvals and exports. Pseudonymisation can reduce routine exposure, but the re-identification mechanism and lawful purpose need clear ownership.
Separate retention from preservation
A published schedule should state normal retention and deletion rules for each log category. An incident, dispute or valid legal hold may require narrowly scoped preservation beyond the ordinary period. Establish who can authorise the hold, how records are isolated, how long the hold remains necessary and when it is released. Do not apply a permanent global freeze to all portal logs because one case is under review.
Deletion must include secondary destinations. A SIEM index may expire records while its export bucket, investigation notebook or vendor support package retains a copy. Review backups and archives according to their documented lifecycle. Keep evidence of retention policy execution, but avoid constructing another indefinite log of every personal event merely to prove that older logs were deleted.
A retention exercise with two conflicting cases
Case one: a user reports fraudulent access to their portal account six weeks after an unknown device logged in. The investigator needs identity-provider sign-in records, application session decisions, administrative changes and relevant export history. If one cloud provider retains the identity logs for only a short period, the portal may lose the ability to reconstruct the event even though the application itself keeps records for longer. The response should identify the missing source and consider a controlled central export process for the event types genuinely needed.
Case two: a customer requests an explanation of why old login metadata is still held years after leaving the service. If the portal cannot state the purpose, retention authority and expiry of the records, indefinite security logging creates unnecessary privacy exposure. The records-management officer and privacy adviser should review the applicable obligations and whether aggregated metrics or pseudonymised signals can support the residual security purpose with less personal information.
Build a defensible field-level schedule
For each event class, define identity elements, sensitivity, collection reason, storage system, access role, normal retention, preservation-hold trigger and deletion mechanism. Some event classes need complete timestamps and associated transaction identifiers; others do not require client IP addresses after a short analysis period. Be explicit about which fields can identify an individual and who is allowed to reverse a pseudonymisation scheme. If a SaaS SIEM retains copies in another region, address that data flow in the privacy assessment.
Do not simply assign the same retention period to raw debug logs and authoritative security audit events. An application may generate millions of verbose request traces containing query parameters, while a smaller immutable-enough audit stream records significant access and configuration changes. Turning off sensitive request-body logging at source can reduce both privacy and breach consequences without eliminating necessary incident evidence.
Retrieval and hold demonstration
Ask an independent analyst to reconstruct a synthetic compromise timeline from a defined date. Confirm that the search is possible within the incident-response target and that user, device and application events correlate reliably. Then place a narrow test preservation hold on selected records and allow neighbouring non-held records to reach their normal deletion time. The test passes only if held evidence remains protected and unrelated data is not frozen without authority.
After releasing the hold, verify the deletion or expiry process at each destination. Check incident notebooks, external monitoring exports and archived investigation copies. A retention policy applied to the primary SIEM does not necessarily control ad hoc spreadsheets created during casework. The audit should document these secondary routes and assign ownership.
Security, privacy and budget decisions
Longer retention can improve investigations, but it also expands the data available to a malicious insider or compromised analyst. Reduce access through investigation-purpose approval, role separation, encryption and monitoring of sensitive queries. Reassess the schedule after major identity or portal changes. Costs should be visible, yet the cheapest tier is not necessarily the correct one if authorised investigators cannot retrieve evidence when needed. The acceptance decision should state why the chosen periods support both operational and legal requirements, with uncertainty flagged for specialist advice.
Measure effectiveness without collecting more than necessary
Useful measures include ingestion completeness, delay to search availability, percentage of critical event types mapped to an owner, time to fulfil an authorised evidence request and rate of improper audit access. Treat the storage bill as an operational signal rather than the main reason to shrink the retention window. A cheap archive that investigators cannot search during an incident fails its purpose.
The policy should be revisited after identity-provider changes, new portal functions, major incidents and privacy-law updates. Acceptance means the portal can reconstruct defined incidents within the agreed window, protect logs against unauthorised access and alteration, and delete or preserve records according to documented authority. Retention is a deliberate balance of investigative usefulness, privacy risk and legal duty—not a default number chosen by the cloud provider.
Sources and further reading
- https://www.oaic.gov.au/privacy/australian-privacy-principles/australian-privacy-principles-guidelines/chapter-11-app-11-security-of-personal-information
- https://csrc.nist.gov/pubs/sp/800/61/r3/final
How Next Defence can help
Customer-portal access logs need a retention decision that covers investigation, privacy minimisation, secure deletion and accessible incident evidence. Next Defence can help structure that decision through Governance, Risk & Compliance, subject to legal review and controlled access to representative records.