審計

審計是一種 Alfresco 功能,允許使用者在 ECM 平臺使用期間跟蹤和記錄某些特定事件。

啟用稽核

要啟用稽核,你必須在 alfresco-global.properties 檔案中新增一些配置行,該檔案位於 tomcat/shared/classes/

audit.enabled = true
audit.alfresco-access.enabled=true

你必須儲存對 alfresco-global.properties 檔案的更改並重新啟動 Alfresco 伺服器才能啟用稽核。

稽核預設配置

這裡是可以覆蓋修改 alfresco-global.properties 檔案的配置屬性的完整列表:

# Audit configuration                                                                                                                                                                       
audit.enabled=true
audit.tagging.enabled=true
audit.alfresco-access.enabled=false
audit.alfresco-access.sub-actions.enabled=false
audit.cmischangelog.enabled=false
audit.dod5015.enabled=false

# Setting this flag to true will force startup failure when invalid audit configurations are detected                                                                                       
audit.config.strict=false

# Audit map filter for AccessAuditor - restricts recorded events to user driven events. In this case it neglect events issued by a System or a null user, the content or folder path is under /sys:archivedItem or under /ver: and the node type is not cm:folder, cm:content or st:site                                                                                                     
audit.filter.alfresco-access.default.enabled=false
audit.filter.alfresco-access.transaction.user=~System;~null;.*
audit.filter.alfresco-access.transaction.type=cm:folder;cm:content;st:site
audit.filter.alfresco-access.transaction.path=~/sys:archivedItem;~/ver:;.*

#The default to preserve all cm:auditable data on a node when the process is not directly driven by a user action                                                                                        
system.auditableData.preserve=${system.preserve.modificationData}

#Specific control of how the FileFolderService treats cm:auditable data when performing moves                                                                                                            
system.auditableData.FileFolderService=${system.auditableData.preserve}

#Specific control of whether ACL changes on a node trigger the cm:auditable aspect                                                                                                                       
system.auditableData.ACLs=${system.auditableData.preserve}   

像往常一樣,你必須儲存對 alfresco-global.properties 檔案的更改並重新啟動 Alfresco 伺服器,以便啟用這些修改。

稽核過濾器

審計過濾器是指定用於通過使用特定正規表示式來包含或排除事件來過濾審計事件的策略的屬性。自定義和預設稽核篩選器都可以新增為 alfresco-global.properties 配置檔案中的覆蓋。

審計過濾器屬性的解剖結構如下:

audit.filter.<data_producer>.<path>

其中 <data-producer> 是 Alfresco 內建資料生成器之一:

  1. alfresco-access:一組廣泛的高階事件,例如登入(成功和失敗),屬性更新,節點上的 CRUD,內容讀取/更新,方面新增和刪除,版本控制,簽入/簽出操作
  2. alfresco-node
  3. alfresco-api:通過呼叫低階 API 方法和服務發出的事件。例如,它可用於列出 SearchServices 搜尋列表引數,使用 PropertyServices 列出的屬性,使用 NodeServices 的節點上的操作等。

path 是要過濾的真實路徑值。

屬性名稱有一個 audit.filter。*字首並使用’。’ 作為分隔符,其中審計對映中的 rootPath 和鍵的元件使用’/’。

列表從左到右進行評估,如果列表末尾沒有匹配,則拒絕該值。如果沒有給定值的屬性或定義了空列表,則接受任何值。

列表中的每個正規表示式用分號(’;’)分隔。包含分號的表示式可以使用’‘進行轉義。

請注意,如果 audit.config.strict 標誌設定為 true,則在檢測到配置無效的情況下,Alfresco 啟動將失敗。

'~'開頭的表示式表示應拒絕任何匹配值。如果表示式的第一個字元需要是'~',則可以使用'\'進行轉義。

在過濾器末尾新增 .*將包括尚未明確排除的所有值

過濾器可以是以下之一:

transaction.user - 指定將/將不會稽核哪些使用者的操作。例如:將稽核除系統以外的所有使用者的操作

transaction.type - 將稽核針對指定文件型別執行的操作。

default.path - 將審計在指定路徑中的文件上發生的操作

transaction.action - 指定將稽核哪些操作,哪些操作不會被稽核。可以使用此屬性啟用或禁用的某些稽核事件包括:READ,MOVE,COPY,CHECK IN,CHECK OUT,CANCHEL CHECK OUT,CREATE VERSION,readContent,addNodeAspect,deleteNodeAspect,updateNodeProperties。

有關稽核篩選器的更多資訊:

https://github.com/tsgrp/OpenContent/wiki/Alfresco-Audit-Configuration

http://docs.alfresco.com/5.1/concepts/audit-example-filter.html