참고
- 이 기능
M0클러스터 및Flex클러스터에서는 사용할 수 없습니다.
You can use Atlas Kubernetes Operator to configure audit logs. To learn more, see Set Up Database Auditing.
관리자는 데이터베이스 감사를 통해 다중 사용자가 있는 배포 시스템의 활동을 추적할 수 있습니다. Atlas 관리자는 감사할 조치, 데이터베이스 사용자, Atlas 역할, LDAP 그룹을 선택할 수 있습니다. Atlas는 문서화된 시스템 이벤트 작업의 대다수에 대한 감사를 지원합니다. 단, 다음과 같은 제한이 적용됩니다.
When an Atlas user performs an action in the Atlas UI on a cluster, both the audit logs and
mongodb.logfile log themms-automationdatabase user as the user performing the auditable action. However, the Project Activity Feed logs the actual username of the Atlas user responsible for the action.이 작업은 Atlas의
admin데이터베이스에서 직접 수행됩니다. 따라서 Atlas 감사 로그는 사용자 생성 또는 수정 이벤트를 추적하지 않습니다.
authCheck 이벤트 조치는 프로젝트의 cluster 내 데이터베이스에서 읽거나 데이터베이스에 하는 작성하려는 사용자의 권한 부여를 기록합니다. Atlas는 다음과 같은 특정 명령어를 감사합니다.
authCheck Reads | authCheck Writes |
|---|---|
| [1] | (1, 2, 3) MongoDB versions 4.2 and later don't support these commands. |
Atlas는 authCheck 이벤트 작업을 다음의 네 가지 개별 작업으로 구현합니다.
이벤트 조치 | 설명 |
|---|---|
|
|
|
경고: auditAuthorizationSuccess 를 활성화 하면 클러스터 성능에 심각한 영향 을 미칠 수 있습니다. 이 옵션은 주의해서 활성화하세요. |
|
|
|
경고: auditAuthorizationSuccess 를 활성화 하면 클러스터 성능에 심각한 영향 을 미칠 수 있습니다. 이 옵션은 주의해서 활성화하세요. |
To learn about how MongoDB writes audit events to disk, see Audit Guarantee in the MongoDB Manual.
필요한 액세스 권한
To configure audit logs, you must have Project Owner access to the project that you want to update or Organization Owner access to the organization that contains the project that you want to update.
감사 로그 활성화
참고
임시 데이터베이스 사용자의 작업을 감사하는 권장사항에 대해 학습하려면 임시 데이터베이스 사용자 감사를 참조하세요.
감사 로그를 활성화 하려면 true AtlasProject Custom Resource(사용자 지정리소스) 에서 spec.auditing.enabled 를(으)로 설정하십시오.
예시:
cat <<EOF | kubectl apply -f - apiVersion: atlas.mongodb.com/v1 kind: AtlasProject metadata: name: my-project spec: name: TestAuditing connectionSecretRef: name: my-atlas-key projectIpAccessList: - cidrBlock: "0.0.0.0/1" comment: "Everyone has access. For test purposes only." - cidrBlock: "128.0.0.0/1" comment: "Everyone has access. For test purposes only." auditing: enabled: true EOF
To retrieve the audit logs in Atlas, see MongoDB Logs. To retrieve the audit logs using the API, see Logs.
사용자 지정 감사 필터 구성
참고
- 이 기능
M0클러스터 및Flex클러스터에서는 사용할 수 없습니다.
Atlas는 JSON 형식의 감사 필터를 지정하여 MongoDB 감사를 맞춤 설정하는 것을 지원합니다.
Custom audit filters lets users forgo the managed Atlas UI auditing filter builder in favor of hand-tailored granular control of event auditing. Atlas checks only that the custom filter uses valid JSON syntax, and doesn't validate or test the filter's functionality.
감사 필터 문서는 감사 이벤트 메시지의 필드의 하나 이상과 일치하는 쿼리로 해석되어야 합니다. 필터 문서는 쿼리 작업자 와 동일 조건의 조합을 사용하여 원하는 감사 메시지를 일치시킬 수 있습니다.
To view example auditing filters, see Example Auditing Filters. To learn more about configuring MongoDB auditing filters, see Configure Audit Filter.
중요
Atlas uses a rolling update strategy for enabling or updating audit configuration settings across all clusters in the Atlas project. Rolling updates require at least one election per replica set.
To learn more about testing application resilience to replica set elections, see /tutorial/test-resilience/test-primary-failover. To learn more about how Atlas provides high availability, see Atlas High Availability.
사용자 지정 감사 필터하다 구성하려면 AtlasProject Custom Resource(사용자 지정 리소스)에서 spec.auditing.auditFilter 설정을 지정합니다. 이 설정의 값을 지정하려면 spec.auditing.enabled 를 true(으)로 설정해야 합니다.
예시:
cat <<EOF | kubectl apply -f - apiVersion: atlas.mongodb.com/v1 kind: AtlasProject metadata: name: my-project spec: name: TestAuditing connectionSecretRef: name: my-atlas-key projectIpAccessList: - cidrBlock: "0.0.0.0/1" comment: "Everyone has access. For test purposes only." - cidrBlock: "128.0.0.0/1" comment: "Everyone has access. For test purposes only." auditing: enabled: true auditFilter: "{"atype": "authenticate"}" EOF
To learn more about the configuration parameters available from the API, see the Atlas Auditing.