Collect HashiCorp Vault audit logs
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
- Sign in to the Google SecOps console.
- Go to SIEM Settings > Collection Agents.
- Download the Ingestion Authentication File.
- Save the file securely on the system where Bindplane will be installed.
Get Google SecOps customer ID
- Sign in to the Google SecOps console.
- Go to SIEM Settings > Profile.
- Copy and save the Customer ID from the Organization Details section.
Install the Bindplane agent
Install the Bindplane agent on your Windows or Linux operating system according to the following instructions.
Windows installation
- Open Command Prompt or PowerShell as an administrator.
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)" /quietWait for the installation to complete.
Verify the installation by running:
sc query observiq-otel-collector
The service should show as RUNNING.
Linux installation
- Open a terminal with root or sudo privileges.
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.shWait for the installation to complete.
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.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
Edit the configuration file
Replace the entire contents of
config.yamlwith 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. Use0.0.0.0to listen on all interfaces. Port1514is 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
- Linux:
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.
- US:
ingestion_labels: Optional labels in YAML format (for example,env: production).
Save the configuration file
After editing, save the file:
- Linux: Press
Ctrl+O, thenEnter, thenCtrl+X - Windows: Click File > Save
Restart the Bindplane agent to apply the changes
To restart the Bindplane agent in Linux:
Run the following command:
sudo systemctl restart observiq-otel-collectorVerify the service is running:
sudo systemctl status observiq-otel-collectorCheck logs for errors:
sudo journalctl -u observiq-otel-collector -f
To restart the Bindplane agent in Windows:
Choose one of the following options:
- Command Prompt or PowerShell as administrator:
net stop observiq-otel-collector && net start observiq-otel-collector- Services console:
- Press
Win+R, typeservices.msc, and press Enter. - Locate observIQ OpenTelemetry Collector.
- Right-click and select Restart.
- Press
Verify the service is running:
sc query observiq-otel-collectorCheck 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
- Open a terminal with access to the Vault CLI and a valid Vault token.
Run the following command to enable the syslog audit device:
vault audit enable syslog tag="vault" facility="AUTH"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
Create a new rsyslog configuration file:
sudo nano /etc/rsyslog.d/50-vault-forward.confAdd the following configuration:
# Forward Vault audit logs to Bindplane agent if $programname == 'vault' then @@BINDPLANE_IP:1514Replace
BINDPLANE_IPwith the IP address of the Bindplane agent host.Restart rsyslog:
sudo systemctl restart rsyslog
Option - syslog-ng configuration
Edit the syslog-ng configuration file:
sudo nano /etc/syslog-ng/conf.d/vault-forward.confAdd 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_IPwith the IP address of the Bindplane agent host.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:
Enable file audit device:
vault audit enable file file_path=/var/log/vault/audit.logConfigure rsyslog to monitor and forward the file:
sudo nano /etc/rsyslog.d/50-vault-file-forward.confmodule(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:1514Replace
BINDPLANE_IPwith the IP address of the Bindplane agent host.Restart rsyslog:
sudo systemctl restart rsyslog
Verify log forwarding
Perform a Vault operation (for example, login or read a secret):
vault login token=<YOUR_TOKEN>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_ACCESS for secret operations, USER_LOGIN for auth operations, GENERIC_EVENT otherwise. |
Need more help? Get answers from Community members and Google SecOps professionals.