Red Hat Directory Server LDAP 로그 수집

다음에서 지원:

이 문서에서는 Bindplane 에이전트를 사용하여 Red Hat Directory Server LDAP 로그를 Google Security Operations로 수집하는 방법을 설명합니다.

Red Hat Directory Server는 개방형 표준을 기반으로 빌드된 엔터프라이즈급 LDAP 디렉터리 서비스로, Linux 및 UNIX 환경에 중앙 집중식 사용자 ID 관리, 인증, 액세스 제어를 제공합니다. 디렉터리 서버는 /var/log/dirsrv/slapd-instance_name/ 디렉터리에 액세스, 오류, 감사, 감사 실패, 보안 로그를 저장하여 클라이언트 연결, LDAP 작업, 구성 변경사항, 실패한 작업, 인증 시도 및 승인 문제와 같은 보안 이벤트를 기록합니다.

시작하기 전에

다음 기본 요건이 충족되었는지 확인합니다.

  • Google SecOps 인스턴스
  • systemd가 설치된 Linux 호스트
  • Bindplane 에이전트와 Red Hat 디렉터리 서버 호스트 간의 네트워크 연결
  • 프록시 뒤에서 실행하는 경우 Bindplane 에이전트 요구사항에 따라 방화벽 포트가 열려 있는지 확인합니다.
  • Red Hat Directory Server 호스트에 대한 루트 또는 sudo 액세스
  • Red Hat Directory Server 11 이상이 설치되어 실행 중이어야 합니다.
  • 디렉터리 서버 호스트에 설치되어 실행 중인 rsyslog 서비스

Google SecOps 수집 인증 파일 가져오기

  1. Google SecOps 콘솔에 로그인합니다.
  2. SIEM 설정 > 수집 에이전트로 이동합니다.
  3. 데이터 수집 인증 파일을 다운로드합니다.
  4. Bindplane이 설치될 시스템에 파일을 안전하게 저장합니다.

Google SecOps 고객 ID 가져오기

  1. Google SecOps 콘솔에 로그인합니다.
  2. SIEM 설정 > 프로필로 이동합니다.
  3. 조직 세부정보 섹션에서 고객 ID를 복사하여 저장합니다.

Bindplane 에이전트 설치

다음 안내에 따라 Linux 운영체제에 Bindplane 에이전트를 설치합니다.

Linux 설치

  1. 루트 또는 sudo 권한으로 터미널을 엽니다.
  2. 다음 명령어를 실행합니다.

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    
  3. 설치가 완료될 때까지 기다립니다.

  4. 다음을 실행하여 설치를 확인합니다.

    sudo systemctl status observiq-otel-collector
    

    서비스가 active (running)으로 표시됩니다.

추가 설치 리소스

추가 설치 옵션 및 문제 해결은 Bindplane 에이전트 설치 가이드를 참조하세요.

syslog를 수집하고 Google SecOps로 전송하도록 Bindplane 에이전트 구성

구성 파일 찾기

  • Linux:

    sudo nano /opt/observiq-otel-collector/config.yaml
    

구성 파일 설정

  • config.yaml의 전체 콘텐츠를 다음 구성으로 바꿉니다.

    receivers:
        udplog:
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/redhat_ds:
            compression: gzip
            creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
            customer_id: '<customer_id>'
            endpoint: malachiteingestion-pa.googleapis.com
            log_type: REDHAT_DIRECTORY_SERVER
            raw_log_field: body
    
    service:
        pipelines:
            logs/redhat_ds:
                receivers:
                    - udplog
                exporters:
                    - chronicle/redhat_ds
    

구성 매개변수

다음 자리표시자를 바꿉니다.

  • 수신기 구성:

    • udplog: 프로토콜에 따른 수신자 유형:
      • UDP syslog의 udplog
      • tcplog(TCP syslog)
      • RFC 3164/5424 syslog의 syslog
    • 0.0.0.0: 리슨할 IP 주소입니다.
      • 0.0.0.0: 모든 인터페이스에서 수신 대기 (권장)
      • 하나의 인터페이스에서 수신 대기할 특정 IP 주소
    • 514: 수신 대기할 포트 번호 (예: 514, 1514, 6514)
  • 내보내기 도구 구성:

    • <customer_id>: 이전 단계의 고객 ID
    • malachiteingestion-pa.googleapis.com: 지역 엔드포인트 URL:
      • 미국: malachiteingestion-pa.googleapis.com
      • 유럽: europe-malachiteingestion-pa.googleapis.com
      • 아시아: asia-southeast1-malachiteingestion-pa.googleapis.com
      • 전체 목록은 리전 엔드포인트를 참고하세요.
    • 플랫폼에 따라 creds_file_path를 조정합니다.
      • Linux: /etc/bindplane-agent/ingestion-auth.json

구성 파일 저장

  • 수정 후 파일을 저장합니다.
    • Linux: Ctrl+O, Enter, Ctrl+X를 차례로 누릅니다.

Bindplane 에이전트를 다시 시작하여 변경사항을 적용합니다.

  • Linux에서 Bindplane 에이전트를 다시 시작하려면 다음 명령어를 실행합니다.

    sudo systemctl restart observiq-otel-collector
    
    1. 서비스가 실행 중인지 확인합니다.

      sudo systemctl status observiq-otel-collector
      
    2. 로그에서 오류를 확인합니다.

      sudo journalctl -u observiq-otel-collector -f
      

Red Hat 디렉터리 서버에서 감사 및 감사 실패 로깅 사용 설정

기본적으로 Red Hat Directory Server는 액세스, 오류, 보안 로깅을 사용 설정하지만 감사 및 감사 실패 로깅은 사용 중지합니다. 모든 디렉터리 변경사항과 실패한 작업을 캡처하려면 이 로그를 사용 설정하세요.

  1. 디렉터리 서버 호스트에서 루트 또는 sudo 권한으로 터미널을 엽니다.
  2. 다음 명령어를 실행하여 감사 로그를 사용 설정합니다.

    dsconf -D "cn=Directory Manager" instance_name config replace nsslapd-auditlog-logging-enabled=on
    
  3. 다음 명령어를 실행하여 감사 실패 로그를 사용 설정합니다.

    dsconf -D "cn=Directory Manager" instance_name config replace nsslapd-auditfaillog-logging-enabled=on
    
  4. 모든 로그 유형이 사용 설정되어 있는지 확인합니다.

    dsconf -D "cn=Directory Manager" instance_name config get nsslapd-accesslog-logging-enabled nsslapd-errorlog-logging-enabled nsslapd-auditlog-logging-enabled nsslapd-auditfaillog-logging-enabled nsslapd-securitylog-logging-enabled
    
  5. 로그 디렉터리에 로그 파일이 있는지 확인합니다.

    ls -la /var/log/dirsrv/slapd-instance_name/
    

선택사항: 웹 콘솔을 사용하여 로깅 사용 설정

  1. Red Hat Directory Server 웹 콘솔에 로그인합니다.
  2. 인스턴스를 선택합니다.
  3. 서버 > 로깅으로 이동합니다.
  4. 사용 설정할 로그 유형 (예: 감사 로그)을 선택합니다.
  5. 선택한 로그 유형의 로깅 전환 버튼을 사용 설정합니다.
  6. 로그 설정 저장을 클릭합니다.

디렉터리 서버 로그를 Bindplane 에이전트로 전달하도록 rsyslog 구성

Red Hat Directory Server는 로그를 syslog에 직접 쓰지 않고 /var/log/dirsrv/slapd-instance_name/의 파일에 씁니다. rsyslog imfile 모듈을 사용하여 이러한 로그 파일을 모니터링하고 항목을 Bindplane 에이전트로 전달합니다.

  1. 디렉터리 서버 로그 전달을 위한 새 rsyslog 구성 파일을 만듭니다.

    sudo nano /etc/rsyslog.d/rhds-forward.conf
    
  2. 구성 파일에 다음 콘텐츠를 추가합니다.

    # Load the imfile module to read log files
    module(load="imfile" PollingInterval="10")
    
    # Monitor the access log
    input(type="imfile"
        File="/var/log/dirsrv/slapd-instance_name/access"
        Tag="dirsrv-access"
        Severity="info"
        Facility="local6")
    
    # Monitor the error log
    input(type="imfile"
        File="/var/log/dirsrv/slapd-instance_name/errors"
        Tag="dirsrv-errors"
        Severity="err"
        Facility="local6")
    
    # Monitor the audit log
    input(type="imfile"
        File="/var/log/dirsrv/slapd-instance_name/audit"
        Tag="dirsrv-audit"
        Severity="info"
        Facility="local6")
    
    # Monitor the security log
    input(type="imfile"
        File="/var/log/dirsrv/slapd-instance_name/security"
        Tag="dirsrv-security"
        Severity="info"
        Facility="local6")
    
    # Forward all Directory Server logs to the Bindplane agent
    local6.* @BINDPLANE_IP:514
    
  3. rsyslog 구성 문법을 확인합니다.

    sudo rsyslogd -N1
    
  4. rsyslog 서비스를 다시 시작하여 변경사항을 적용합니다.

    sudo systemctl restart rsyslog
    
  5. Bindplane 에이전트 로그를 확인하여 디렉터리 서버 로그가 전달되고 있는지 확인합니다.

    sudo journalctl -u observiq-otel-collector -f
    

UDM 매핑 테이블

로그 필드 UDM 매핑 로직
attrs_label about.labels 병합됨
cn_label about.labels 병합됨
conn_label about.labels 병합됨
csn_label about.labels 병합됨
err_label about.labels 병합됨
etime_label about.labels 병합됨
fd_label about.labels 병합됨
filter_label about.labels 병합됨
label about.labels 병합됨
method_label about.labels 병합됨
msgid_label about.labels 병합됨
name_label about.labels 병합됨
nentries_label about.labels 병합됨
offset_label about.labels 병합됨
op_label about.labels 병합됨
optime_label about.labels 병합됨
org_label about.labels 병합됨
ou_label about.labels 병합됨
scope_label about.labels 병합됨
slot_label about.labels 병합됨
tag_label about.labels 병합됨
targetop_label about.labels 병합됨
version_label about.labels 병합됨
wtime_label about.labels 병합됨
desc metadata.description 직접 매핑됨
creationDate metadata.event_timestamp UNIX_MS로 파싱됨
recordDate metadata.event_timestamp UNIX_MS로 파싱됨
time metadata.event_timestamp dd/MMM/yyyy:HH:mm:ss Z로 파싱됨
ts metadata.event_timestamp MMM d HH:mm:ss로 파싱됨
operation metadata.product_event_type 직접 매핑됨
mrId metadata.product_log_id 직접 매핑됨
properties._ecs_agent_version metadata.product_version 직접 매핑됨
host principal.asset.hostname 직접 매핑됨
oid principal.asset.product_object_id 직접 매핑됨
host principal.hostname 직접 매핑됨
client_ip principal.ip 병합됨
namespace principal.namespace 직접 매핑됨
user principal.user.userid 직접 매핑됨
sec_result security_result 병합됨
properties._hostname target.asset.hostname 직접 매핑됨
properties.host target.asset.hostname 직접 매핑됨
properties._hostname target.hostname 직접 매핑됨
properties.host target.hostname 직접 매핑됨
target_ip target.ip 병합됨
properties.country target.location.country_or_region 직접 매핑됨
properties._file_path target.process.file.full_path 직접 매핑됨
properties._file_size target.process.file.size 이름이 변경됨/매핑됨
discipline_label target.resource.attribute.labels 병합됨
document_type_label target.resource.attribute.labels 병합됨
environment_label target.resource.attribute.labels 병합됨
hostgroup_label target.resource.attribute.labels 병합됨
platform_label target.resource.attribute.labels 병합됨
product_label target.resource.attribute.labels 병합됨
project_label target.resource.attribute.labels 병합됨
base target.user.group_identifiers 병합됨
dn target.user.group_identifiers 병합됨
해당 사항 없음 metadata.event_type 상수: NETWORK_CONNECTION
해당 사항 없음 metadata.product_name 상수: REDHAT_DIRECTORY_SERVER
해당 사항 없음 metadata.vendor_name 상수: REDHAT
해당 사항 없음 target.platform 상수: LINUX
properties._file_inode event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
properties._file_offset event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
conn event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
op event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
err event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
tag event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
nentries event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
wtime event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
optime event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
etime event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
csn event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
cn event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
ou event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
filter event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
attrs event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
scope event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
o event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
targetop event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
msgid event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
method event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
version event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
fd event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
slot event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
name event.idm.read_only_udm.additional.fields 변경 로그에서 매핑됨
properties.discipline" ,"properties.document_type" ,"properties.environment" ,"properties.hostgroup" ,"properties.platform" ,"properties.product target.resource.attribute.labels 변경 로그에서 매핑됨

변경 로그

이 파서의 변경 로그 보기

도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가에게 문의하여 답변을 받으세요.