审计日志记录与合规性
了解审计日志与运维日志的区别、可信审计跟踪的构成,以及可观测性如何支持合规要求。
审计日志记录与合规性 是 CoddyKit 上的免费 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课时。 这是第 4 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课程共包含 4 节课。
本课时的部分内容尚未翻译,以英文显示。
What Is an Audit Log?
An audit log records who did what, when, and to which resource. Unlike debug logs, it exists to answer accountability and compliance questions.
Audit vs Operational Logs
Operational logs help engineers debug; audit logs prove what happened for security and regulators.
- Operational: verbose, short-lived
- Audit: structured, long-retained, tamper-evident
The Five Ws
Every audit event should capture the essentials clearly.
{
"who": "user:alice",
"action": "delete",
"resource": "invoice/8821",
"when": "2026-05-29T10:14:02Z",
"outcome": "success"
}Immutability
Audit logs must be tamper-evident. Write them to append-only storage so records cannot be silently altered or deleted.
Separation of Duties
Those who can act on a system should not be able to edit its audit log. Store audit data in a separate, restricted store.
Retention Requirements
Compliance frameworks dictate how long audit logs must be kept, often years. Lifecycle policies must respect these minimums, not just cost.
- PCI DSS, SOC 2, GDPR set retention rules
Sensitive Data Handling
Audit logs must avoid storing secrets or excessive personal data. Record identifiers and actions, not passwords or full payloads.
log: user_id, action // yes
log: password, full PII // noIntegrity Verification
Hashing or signing log batches lets you prove later that records were not modified, strengthening the audit trail.
entry_hash = sha256(prev_hash + entry)Centralizing Audit Logs
Ship audit events to a dedicated index with strict access controls, separate from noisy operational logs, so queries and reviews stay clean.
Alerting on Audit Events
Observability adds value by alerting on suspicious audit patterns, like privilege escalations or mass deletions, in real time.
alert: action=delete AND count > 100 in 1mAudit and Compliance Together
A complete program defines what to audit, secures and retains the records, verifies integrity, and reviews them regularly to satisfy auditors.
Quick Check
Pick the property essential to audit logs.
Recap
You learned that audit logs record who did what to which resource and when, that they must be tamper-evident, access-controlled, and retained per compliance rules, and that they should exclude secrets. Integrity verification and real-time alerting on suspicious events let observability strengthen security and compliance.
用 AI 导师学习 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) — 免费
在浏览器中编写并运行真实代码,获得全天候 AI 导师的即时帮助,并在网页或应用中继续学习。
- 课程
- 12
- 课程
- 48
常见问题解答
「审计日志记录与合规性」课时是免费的吗?
是的 — 「审计日志记录与合规性」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课程的其余内容,请升级到 CoddyKit PRO。 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课程共包含 4 节课。
「审计日志记录与合规性」这节课中我会学到什么?
了解审计日志与运维日志的区别、可信审计跟踪的构成,以及可观测性如何支持合规要求。 你通过在浏览器中直接运行的动手代码来练习 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry),全天候 AI 导师会在你学习这节课的过程中回答你的问题。
学习 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 需要有经验吗?
无需任何先前经验。CoddyKit 上的 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 4 节课,共 4 节。
「审计日志记录与合规性」课时需要多长时间?
大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。
我能在这节 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课中编写并运行代码吗?
能。每节 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。
此课程中的所有课时
- 使用可观测性保障安全
- 性能监控与调优
- 可观测性成本优化
- 审计日志记录与合规性