BIT303 ยท 2082 ยท 5 marks
Define security policy. How do you implement logging function?
Define security policy. How do you implement logging function? [5]
Quick answer
A security policy is a formal set of rules, guidelines, and procedures that defines how an organization manages, protects, and distributes sensitive information and resources.
Security Policy and Logging Function Implementation
Definition of Security Policy
A security policy is a formal set of rules, guidelines, and procedures that defines how an organization manages, protects, and distributes sensitive information and resources. It specifies:
- What assets need to be protected
- Who is authorized to access those assets
- How the assets should be protected
- What actions are permitted or prohibited within a system
A security policy serves as the foundation for all security mechanisms in a system. It may include:
- Access control policies (who can access what)
- Authentication policies (how users prove their identity)
- Confidentiality policies (protecting data from unauthorized disclosure)
- Integrity policies (ensuring data is not tampered with)
- Availability policies (ensuring resources are accessible to authorized users)
Example: "Only authenticated administrators can read/write to the database; all other users have read-only access."
Implementation of Logging Function
Logging is the process of recording events, actions, and transactions that occur within a system for the purposes of auditing, monitoring, debugging, and security analysis.
Key Steps to Implement a Logging Function:
1. Define What to Log
Decide which events should be recorded:
- Login attempts (successful and failed)
- File access and modifications
- System errors and exceptions
- User actions and privilege changes
- Network connections
2. Design the Log Structure
Each log entry should contain:
| Field | Description |
|---|---|
| Timestamp | Date and time of the event |
| User ID | Who performed the action |
| Event Type | Type of event (login, access, error) |
| Resource | What was accessed or modified |
| Status | Success or failure |
| IP Address | Source of the request |
3. Basic Logging Function (Pseudocode)
function logEvent(userID, eventType, resource, status):
timestamp = getCurrentDateTime()
logEntry = timestamp + " | " + userID + " | " + eventType
+ " | " + resource + " | " + status
appendToLogFile(logEntry)
if status == "FAILURE":
triggerAlert(logEntry)
end function
4. Log Storage and Protection
- Store logs in a write-once or append-only file to prevent tampering
- Use encryption to protect log contents
- Maintain backup copies of logs
- Restrict access to log files (only administrators)
5. Log Management
- Implement log rotation to manage file size
- Set retention policies (e.g., keep logs for 90 days)
- Use centralized log servers (e.g., syslog) for distributed systems
6. Log Analysis and Auditing
- Regularly review logs for suspicious activity
- Use automated tools to detect anomalies
- Generate audit reports for compliance
Importance of Logging in Security
- Provides accountability by tracking user actions
- Helps in intrusion detection and incident response
- Supports forensic analysis after a security breach
- Ensures compliance with security policies and regulations
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.