审计日志如何留存180天,不是把保存天数填个数字那么简单,它是一条从采集到防篡改的完整链路。
安企神对应的是采集、存储、防篡改、可检索这四个动作,任何一环断掉,整条链都不成立。

一、180天这个数字从哪来
《中华人民共和国网络安全法》第二十一条第(三)项要求,网络运营者应当采取监测、记录网络运行状态、网络安全事件的技术措施,并按照规定留存相关的网络日志不少于六个月。
六个月折算下来约一百八十天,这是合规底线,不是可以讨价还价的目标值。
理解这一点很重要:留存时长要按底线倒推存储方案,而不是先买硬盘再看能存多久。
前者是规划,后者是碰运气。
二、日志从哪里采集
四类日志的价值不同:终端和网络日志数量大、检索频繁;屏幕日志体积大、按需保留;账号日志条数少但不可缺。
规划存储时按这个差异分配配额,比平均用力更划算。

三、存储环节要解决的三个问题
这三个问题里,容量可以靠加硬件解决,完整性和可用性靠的是系统设计,后期很难补。
另外要提前考虑日志的增长速度。
业务扩张、终端增加、采集项变多,都会让日志量非线性地上升。
比较稳妥的做法是设置容量告警,在接近阈值之前扩容,而不是等写满了才发现。
#mermaid-svg-y9JTPw4Yj6ryerMx{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-y9JTPw4Yj6ryerMx .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-y9JTPw4Yj6ryerMx .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-y9JTPw4Yj6ryerMx .error-icon{fill:#552222;}#mermaid-svg-y9JTPw4Yj6ryerMx .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-y9JTPw4Yj6ryerMx .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-y9JTPw4Yj6ryerMx .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-y9JTPw4Yj6ryerMx .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-y9JTPw4Yj6ryerMx .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-y9JTPw4Yj6ryerMx .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-y9JTPw4Yj6ryerMx .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-y9JTPw4Yj6ryerMx .marker{fill:#333333;stroke:#333333;}#mermaid-svg-y9JTPw4Yj6ryerMx .marker.cross{stroke:#333333;}#mermaid-svg-y9JTPw4Yj6ryerMx svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-y9JTPw4Yj6ryerMx p{margin:0;}#mermaid-svg-y9JTPw4Yj6ryerMx .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-y9JTPw4Yj6ryerMx .cluster-label text{fill:#333;}#mermaid-svg-y9JTPw4Yj6ryerMx .cluster-label span{color:#333;}#mermaid-svg-y9JTPw4Yj6ryerMx .cluster-label span p{background-color:transparent;}#mermaid-svg-y9JTPw4Yj6ryerMx .label text,#mermaid-svg-y9JTPw4Yj6ryerMx span{fill:#333;color:#333;}#mermaid-svg-y9JTPw4Yj6ryerMx .node rect,#mermaid-svg-y9JTPw4Yj6ryerMx .node circle,#mermaid-svg-y9JTPw4Yj6ryerMx .node ellipse,#mermaid-svg-y9JTPw4Yj6ryerMx .node polygon,#mermaid-svg-y9JTPw4Yj6ryerMx .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-y9JTPw4Yj6ryerMx .rough-node .label text,#mermaid-svg-y9JTPw4Yj6ryerMx .node .label text,#mermaid-svg-y9JTPw4Yj6ryerMx .image-shape .label,#mermaid-svg-y9JTPw4Yj6ryerMx .icon-shape .label{text-anchor:middle;}#mermaid-svg-y9JTPw4Yj6ryerMx .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-y9JTPw4Yj6ryerMx .rough-node .label,#mermaid-svg-y9JTPw4Yj6ryerMx .node .label,#mermaid-svg-y9JTPw4Yj6ryerMx .image-shape .label,#mermaid-svg-y9JTPw4Yj6ryerMx .icon-shape .label{text-align:center;}#mermaid-svg-y9JTPw4Yj6ryerMx .node.clickable{cursor:pointer;}#mermaid-svg-y9JTPw4Yj6ryerMx .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-y9JTPw4Yj6ryerMx .arrowheadPath{fill:#333333;}#mermaid-svg-y9JTPw4Yj6ryerMx .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-y9JTPw4Yj6ryerMx .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-y9JTPw4Yj6ryerMx .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-y9JTPw4Yj6ryerMx .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-y9JTPw4Yj6ryerMx .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-y9JTPw4Yj6ryerMx .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-y9JTPw4Yj6ryerMx .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-y9JTPw4Yj6ryerMx .cluster text{fill:#333;}#mermaid-svg-y9JTPw4Yj6ryerMx .cluster span{color:#333;}#mermaid-svg-y9JTPw4Yj6ryerMx div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-y9JTPw4Yj6ryerMx .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-y9JTPw4Yj6ryerMx rect.text{fill:none;stroke-width:0;}#mermaid-svg-y9JTPw4Yj6ryerMx .icon-shape,#mermaid-svg-y9JTPw4Yj6ryerMx .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-y9JTPw4Yj6ryerMx .icon-shape p,#mermaid-svg-y9JTPw4Yj6ryerMx .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-y9JTPw4Yj6ryerMx .icon-shape .label rect,#mermaid-svg-y9JTPw4Yj6ryerMx .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-y9JTPw4Yj6ryerMx .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-y9JTPw4Yj6ryerMx .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-y9JTPw4Yj6ryerMx :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}
终端采集
服务端汇聚
加密存储
完整性校验
三维度检索
导出归档
四、防篡改为什么是硬要求
日志的证明力建立在它没被动过这个前提上。
一份可以被任意修改的日志,在争议场景里几乎等于没有。
因此日志系统需要做到三件事:写入后不可改写、访问有权限控制、查阅行为本身也留痕。
管理员的每一次检索和导出都应当被记录,审计链条不能对监督者留白。

五、留存期满之后怎么还能查到
想把日志留存做扎实,技术上的关键是采集要全、存储要稳、防篡改要硬、检索要快。
合规条文给出的是时长要求,真正决定这套日志有没有用的,是它能不能在需要的那一天被完整调出来。
责编:小赵
网硕互联帮助中心

评论前必须登录!
注册