Collect HashiCorp Vault audit logs

Supported in:

This document explains how you can ingest HashiCorp Vault audit logs to Google Security Operations using Bindplane.

HashiCorp Vault is a secrets management and data protection platform that provides secure storage, dynamic secrets generation, data encryption, and identity-based access control. Vault produces audit logs that record all requests and responses to Vault, including authentication, secret access, and policy changes. These audit logs can be forwarded using syslog to a SIEM for security monitoring and compliance.

Before you begin

Make sure you have the following prerequisites:

  • A Google SecOps instance.
  • Windows Server 2016 or later, or Linux host with systemd .
  • Network connectivity between the Bindplane agent and the HashiCorp Vault server.
  • If running behind a proxy, ensure firewall ports are open per the Bindplane agent requirements.
  • Privileged access to the HashiCorp Vault server (root token or sufficient policy permissions to enable audit devices).

Get Google SecOps ingestion authentication file

  1. Sign in to the Google SecOps console.
  2. Go to SIEM Settings > Collection Agents.
  3. Download the Ingestion Authentication File.
  4. Save the file securely on the system where Bindplane will be installed.

Get Google SecOps customer ID

  1. Sign in to the Google SecOps console.
  2. Go to SIEM Settings > Profile.
  3. Copy and save the Customer IDfrom the Organization Detailssection.

Install the Bindplane agent

Install the Bindplane agent on your Windows or Linux operating system according to the following instructions.

Windows installation

  1. Open Command Promptor PowerShellas an administrator.
  2. Run the following command:

      msiexec 
      
     / 
     i 
      
     "[https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi](https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi)" 
      
     / 
     quiet 
     
    
  3. Wait for the installation to complete.

  4. Verify the installation by running:

     sc query observiq-otel-collector 
    

The service should show as RUNNING.

Linux installation

  1. Open a terminal with root or sudo privileges.
  2. Run the following command:

     sudo  
    sh  
    -c  
     " 
     $( 
    curl  
    -fsSlL  
     [ 
    https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh ]( 
    https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh ) 
     )" 
      
    install_unix.sh 
    
  3. Wait for the installation to complete.

  4. Verify the installation by running:

     sudo  
    systemctl  
    status  
    observiq-otel-collector 
    

The service should show as active (running).

Additional installation resources

For additional installation options and troubleshooting, see the Bindplane agent installation guide .

Configure the Bindplane agent to ingest syslog and send to Google SecOps

Locate the configuration file

  • Linux:

     sudo  
    nano  
    /etc/bindplane-agent/config.yaml 
    
  • Windows:

     notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml" 
    

Edit the configuration file

  • Replace the entire contents of config.yaml with the following configuration:

      receivers 
     : 
      
     tcplog 
     : 
      
     listen_address 
     : 
      
     "0.0.0.0:1514" 
     exporters 
     : 
      
     chronicle/vault 
     : 
      
     compression 
     : 
      
     gzip 
      
     creds_file_path 
     : 
      
     '/etc/bindplane-agent/ingestion-auth.json' 
      
     customer_id 
     : 
      
     'your-customer-id-here' 
      
     endpoint 
     : 
      
     malachiteingestion-pa.googleapis.com 
      
     log_type 
     : 
      
     HASHICORP 
      
     raw_log_field 
     : 
      
     body 
      
     ingestion_labels 
     : 
      
     env 
     : 
      
     production 
     service 
     : 
      
     pipelines 
     : 
      
     logs/vault_to_chronicle 
     : 
      
     receivers 
     : 
      
     - 
      
     tcplog 
      
     exporters 
     : 
      
     - 
      
     chronicle/vault 
     
    

Configuration parameters

Replace the following placeholders:

  • Receiver configuration:

    • listen_address : IP address and port to listen on. Use 0.0.0.0 to listen on all interfaces. Port 1514 is recommended to avoid requiring root privileges on Linux.
  • Exporter configuration:

    • creds_file_path : Full path to the ingestion authentication file:
      • Linux: /etc/bindplane-agent/ingestion-auth.json
      • Windows: C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id : Your Google SecOps customer ID.
    • endpoint : Regional endpoint URL:
      • US: malachiteingestion-pa.googleapis.com
      • Europe: europe-malachiteingestion-pa.googleapis.com
      • Asia: asia-southeast1-malachiteingestion-pa.googleapis.com
      • See Regional Endpoints for the complete list.
    • ingestion_labels : Optional labels in YAML format (for example, env: production ).

Save the configuration file

After editing, save the file:

  • Linux: Press Ctrl+O , then Enter , then Ctrl+X
  • Windows: Click File > Save

Restart the Bindplane agent to apply the changes

To restart the Bindplane agent in Linux:

  1. Run the following command:

     sudo  
    systemctl  
    restart  
    observiq-otel-collector 
    
  2. Verify the service is running:

     sudo  
    systemctl  
    status  
    observiq-otel-collector 
    
  3. Check logs for errors:

     sudo  
    journalctl  
    -u  
    observiq-otel-collector  
    -f 
    

To restart the Bindplane agent in Windows:

  1. Choose one of the following options:

    • Command Prompt or PowerShell as administrator:
     net stop observiq-otel-collector && net start observiq-otel-collector 
    
    • Services console:
      1. Press Win+R , type services.msc , and press Enter.
      2. Locate observIQ OpenTelemetry Collector.
      3. Right-click and select Restart.
  2. Verify the service is running:

     sc query observiq-otel-collector 
    
  3. Check logs for errors:

      type 
      
     "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log" 
     
    

Configure HashiCorp Vault audit log forwarding via syslog

Vault audit devices log all requests and responses. You can enable a syslog audit device to forward audit logs to the Bindplane agent.

Enable syslog audit device

  1. Open a terminal with access to the Vault CLI and a valid Vault token.
  2. Run the following command to enable the syslog audit device:

     vault  
    audit  
     enable 
      
    syslog  
     tag 
     = 
     "vault" 
      
     facility 
     = 
     "AUTH" 
     
    
  3. Verify the audit device is enabled:

     vault  
    audit  
    list 
    

The output should show the syslog audit device as enabled.

Configure syslog forwarding to Bindplane agent

After enabling the Vault syslog audit device, configure the system syslog daemon (rsyslog or syslog-ng) to forward Vault audit logs to the Bindplane agent.

Option - rsyslog configuration

  1. Create a new rsyslog configuration file:

     sudo  
    nano  
    /etc/rsyslog.d/50-vault-forward.conf 
    
  2. Add the following configuration:

     # Forward Vault audit logs to Bindplane agent
    if $programname == 'vault' then @@BINDPLANE_IP:1514 
    

    Replace BINDPLANE_IP with the IP address of the Bindplane agent host.

  3. Restart rsyslog:

     sudo  
    systemctl  
    restart  
    rsyslog 
    

Option - syslog-ng configuration

  1. Edit the syslog-ng configuration file:

     sudo  
    nano  
    /etc/syslog-ng/conf.d/vault-forward.conf 
    
  2. Add the following configuration:

     destination d_bindplane {
        network("BINDPLANE_IP" port(1514) transport("tcp"));
    };
    
    filter f_vault {
        program("vault");
    };
    
    log {
        source(s_src);
        filter(f_vault);
        destination(d_bindplane);
    }; 
    

    Replace BINDPLANE_IP with the IP address of the Bindplane agent host.

  3. Restart syslog-ng:

     sudo  
    systemctl  
    restart  
    syslog-ng 
    

Alternative - file-based audit with log forwarder

If syslog audit is not preferred, you can enable a file audit device and forward the file contents:

  1. Enable file audit device:

     vault  
    audit  
     enable 
      
    file  
     file_path 
     = 
    /var/log/vault/audit.log 
    
  2. Configure rsyslog to monitor and forward the file:

     sudo  
    nano  
    /etc/rsyslog.d/50-vault-file-forward.conf 
    
     module(load="imfile")
    input(type="imfile"
        File="/var/log/vault/audit.log"
        Tag="vault-audit"
        Severity="info"
        Facility="auth")
    
    if $syslogtag == 'vault-audit' then @@BINDPLANE_IP:1514 
    

    Replace BINDPLANE_IP with the IP address of the Bindplane agent host.

  3. Restart rsyslog:

     sudo  
    systemctl  
    restart  
    rsyslog 
    

Verify log forwarding

  1. Perform a Vault operation (for example, login or read a secret):

     vault  
    login  
     token 
     = 
    <YOUR_TOKEN> 
    
  2. Check the Bindplane agent logs to confirm logs are being received.

For more information, see the HashiCorp Vault audit devices documentation .

UDM mapping table

Log Field UDM Mapping Logic
auth.client_token
network.session_id Value taken from auth.client_token (hashed).
auth.display_name
principal.user.user_display_name Value taken from auth.display_name .
auth.metadata.role_name
principal.user.attribute.roles.name Value taken from auth.metadata.role_name .
auth.policies
principal.user.attribute.permissions.name Values taken from auth.policies array.
auth.token_type
additional.fields Value taken from auth.token_type and added with key token_type .
request.id
metadata.product_log_id Value taken from request.id .
request.operation
metadata.product_event_type Value taken from request.operation .
request.path
target.resource.name Value taken from request.path .
request.remote_address
principal.ip Value taken from request.remote_address .
request.namespace.id
target.namespace Value taken from request.namespace.id .
response.auth.client_token
network.session_id Value taken from response client_token (hashed).
type
metadata.product_event_type Appended to operation (for example, request or response ).
time
metadata.event_timestamp Parsed as RFC3339 timestamp.
error
security_result.description Value taken from error if present.
metadata.vendor_name Set to HashiCorp.
metadata.product_name Set to Vault.
metadata.event_type Set to USER_RESOURCE_ACCESSfor secret operations, USER_LOGINfor auth operations, GENERIC_EVENTotherwise.

Need more help? Get answers from Community members and Google SecOps professionals.

Design a Mobile Site
View Site in Mobile | Classic
Share by: