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 credentials for the Bindplane agent
To authenticate the Bindplane agent to Google SecOps, choose one of the following methods:
- New deployments: Use the Chronicle API (Option 1).
- Legacy deployments: Continue using the ingestion authentication file (Option 2) until the Ingestion API is discontinued on July 20, 2027.
Option 1: Create a service account for the Chronicle API (recommended)
- Sign in to the Google Cloud console and select the Google Cloud project that is linked to your Google SecOps instance.
- Go to IAM & Admin > Service Accounts.
- Click Create service account.
- Provide the following configuration details:
- Service account name: Enter a name for the account (for example,
bindplane-ingest). - Service account description: Enter a description (for example,
Bindplane agent log ingestion).
- Service account name: Enter a name for the account (for example,
- Click Create and continue.
- In the Grant this service account access to project section, click Select a role and select Chronicle Editor.
- Click Continue, and then click Done.
- Click the service account you created, and then go to the Keys tab.
- Click Add key > Create new key.
- Select JSON and click Create. The key file is downloaded to your computer.
- Save the key file as
ingestion-auth.jsonin the Bindplane collector directory (/opt/observiq-otel-collector/ingestion-auth.jsonon Linux orC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.jsonon Windows), or updatecreds_file_pathinconfig.yamlto match the path where you save it. - Go to IAM & Admin > Settings and copy the Project number. You'll need it for the exporter configuration.
Option 2: Download the ingestion authentication file (legacy)
- 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 the Bindplane agent 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 /opt/observiq-otel-collector/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: protocol: https # Region of your instance, for example us, europe, asia-southeast1 location: <LOCATION> # Project number of the Google Cloud project linked to the instance project: '<PROJECT_NUMBER>' compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: 'your-customer-id-here' endpoint: chronicle.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 service account JSON key file (Option 1):- Linux:
/opt/observiq-otel-collector/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
customer_id: Your Google SecOps customer ID.location: Replace<LOCATION>with the region of your Google SecOps instance (for example,us,europe, orasia-southeast1). The exporter prefixeschronicle.googleapis.comwith this value. See Regional Endpoints for the complete list.project: Replace<PROJECT_NUMBER>with the project number from IAM & Admin > Settings.endpoint: Keep set tochronicle.googleapis.com.ingestion_labels: Optional labels in YAML format (for example,env: production).
Legacy ingestion API exporter
If you use the ingestion authentication file from Option 2, replace the
exportersblock with the following. Setcreds_file_pathto the path to the ingestion authentication file, and if your instance is outside the US, replacemalachiteingestion-pa.googleapis.comwith your regional endpoint (for example,europe-malachiteingestion-pa.googleapis.com).exporters: chronicle/vault: compression: gzip creds_file_path: '/opt/observiq-otel-collector/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
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 RFC 3339 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. | |
response.auth.metadata.username |
event.idm.read_only_udm.target.user.userid |
Mapped from changelog |
appname |
event.idm.read_only_udm.target.application |
Mapped from changelog |
priority |
event.idm.read_only_udm.security_result.priority_details |
Mapped from changelog |
proc_id |
event.idm.read_only_udm.observer.process.pid |
Mapped from changelog |
auth.policies |
event.idm.read_only_udm.additional.fields |
Mapped from changelog |
auth.token_policies |
event.idm.read_only_udm.additional.fields |
Mapped from changelog |
request.policy_override |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
response.data.admin_password |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
response.data.admin_token |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
response.data.admin_user |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
response.data.certificate |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
response.data.check_url |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
response.data.keystore |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
response.data.keystore_password |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
response.data.private_key |
event.idm.read_only_udm.target.resource.attribute.labels |
Mapped from changelog |
type |
event.idm.read_only_udm.additional.fields |
Mapped from changelog |
auth.identity_policies |
event.idm.read_only_udm.additional.fields |
Mapped from changelog |
request.data |
event.idm.read_only_udm.additional.fields |
Mapped from changelog |
facility |
event.idm.read_only_udm.additional.fields |
Mapped from changelog |
task |
event.idm.read_only_udm.additional.fields |
Mapped from changelog |
jsonPayload.auth.policy_results.granting_policies.type", "jsonPayload.auth.policy_results.granting_policies.name", and "jsonPayload.auth.policy_results.granting_policies.namespace_id |
additional.fields |
Mapped from changelog |
jsonPayload.request.namespace.id |
target.namespace |
Mapped from changelog |
jsonPayload.cos.googleapis.com/container_id", "jsonPayload.cos.googleapis.com/container_name", "jsonPayload.cos.googleapis.com/stream |
additional.fields |
Mapped from changelog |
resource.labels.instance_id |
principal.resource.product_object_id |
Mapped from changelog |
principal.resource.attribute.cloud.availability_zone |
resource.labels.zone |
Mapped from changelog |
logName |
security_result.category_details |
Mapped from changelog |
resource.labels.namespace_name |
target.namespace |
Mapped from changelog |
resource.labels.pod_name", "resource.labels.container_name |
additional.fields |
Mapped from changelog |
resource.labels.project_id |
target.cloud.project.name |
Mapped from changelog |
resource.labels.location |
target.location.name |
Mapped from changelog |
insertId |
metadata.product_log_id |
Mapped from changelog |
labels.k8s-pod/app_kubernetes_io/instance", "labels.k8s-pod/app_kubernetes_io/name", "labels.k8s-pod/component", "labels.k8s-pod/helm_sh/chart", "labels.k8s-pod/controller-revision-hash", "labels.k8s-pod/vault-initialized", "labels.k8s-pod/vault-version", "labels.k8s-pod/vault-sealed", "labels.k8s-pod/vault-perf-standby", and "labels.k8s-pod/vault-active |
target.resource.attribute.labels |
Mapped from changelog |
labels.compute.googleapis.com/resource_name |
target.resource.name |
Mapped from changelog |
status |
network.http.response_code |
Mapped from changelog |
runner |
principal.user.userid |
Mapped from changelog |
job_id", "job_status |
additional.fields |
Mapped from changelog |
host |
observer.hostname |
Mapped from changelog |
cluster |
observer.resource.name |
Mapped from changelog |
cluster |
observer.resource.resource_type |
Mapped from changelog |
Change Log
View the Change Log for this parser
Need more help? Get answers from Community members and Google SecOps professionals.