Collect 1Password audit logs
This document explains how to ingest 1Password audit logs to Google Security Operations using Bindplane. The parser transforms raw JSON formatted log data into a structured format compliant with the Google SecOps Unified Data Model (UDM). It specifically focuses on normalizing and enriching events related to user sign-in attempts, extracting details about the user, their location, client information, and the outcome of the attempt.
Before you begin
Ensure that you have the following prerequisites:
- Google SecOps instance
- Windows 2016 or later or Linux host with systemd
- If running behind a proxy, firewall ports are open
- Privileged access to 1Password
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
Windows installation
- Open the 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" /quiet
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)" install_unix.sh
Additional installation resources
For additional installation options, consult the installation guide.
Configure the Bindplane agent to ingest Syslog and send to Google SecOps
- Access the configuration file:
- Locate the
config.yaml
file. Typically, it's in the/etc/bindplane-agent/
directory on Linux or in the installation directory on Windows. - Open the file using a text editor (for example,
nano
,vi
, or Notepad).
- Locate the
Edit the
config.yaml
file as follows:receivers: udplog: # Replace the port and IP address as required listen_address: "0.0.0.0:514" exporters: chronicle/chronicle_w_labels: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: <customer_id> endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization ingestion_labels: log_type: 'ONEPASSWORD_AUDIT_EVENTS' raw_log_field: body service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels
Replace the port and IP address as required in your infrastructure.
Replace
<customer_id>
with the actual customer ID.Update
/path/to/ingestion-authentication-file.json
to the path where the authentication file was saved in the Get Google SecOps ingestion authentication file section.
Restart the Bindplane agent to apply the changes
To restart the Bindplane agent in Linux, run the following command:
sudo systemctl restart bindplane-agent
To restart the Bindplane agent in Windows, you can either use the Services console or enter the following command:
net stop BindPlaneAgent && net start BindPlaneAgent
Get the 1Password API token
- Sign in to the 1Password web UI.
- Go to Integrations.
- Click Directory at the top of the page.
- Enter a name for the token and set the token expiration.
- In Events Reporting, click Other.
- Select Audit events from Event Types.
- Click Issue Token to generate the access token key.
- Click Save in 1Password and select which vault to save your token to.
- Click View Integration Details to view the token.
Configure a Linux host to run the following command
Run the following command:
import datetime import requests import os import socket import json # For more information, check out the support page: https://support.1password.com/events-reporting api_token = os.environ.get('EVENTS_API_TOKEN') url = "https://events.1password.com" if not api_token: print("Please set the EVENTS_API_TOKEN environment variable.") exit(1) start_time = datetime.datetime.now() - datetime.timedelta(hours=24) # Define the bindplane agent details syslog_server_ip = <ip-address> # Replace with your Bindplane IP syslog_server_port = <port-number> # Replace with your Bindplane port headers = { "Content-Type": "application/json", "Authorization": f"Bearer {api_token}" payload = { "limit": 20, "start_time": start_time.astimezone().replace(microsecond=0).isoformat() # Alternatively, use the cursor returned from previous responses to get any new events # payload = { "cursor": cursor } try: r = requests.post(f"{url}/api/v1/signinattempts", headers=headers, json=payload) r.raise_for_status() # Raise an exception if the request fails if r.status_code == requests.codes.ok: # Send the response to the bindplane server syslog_message = f"{json.dumps(r.json())}" with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: sock.connect((syslog_server_ip, syslog_server_port)) sock.sendall(f"{syslog_message}\n".encode()) else: print(f"Error getting sign-in attempts: status code {r.status_code}") except requests.exceptions.RequestException as e: print(f"Request error: {e}") except Exception as e: print(f"Error during syslog logging: {e}")
Changes
2025-02-17
Enhancement:
- Fixed issue for parsing
aux_info
. - Mapped
item.timestamp
tometadata.event_timestamp
.
2024-11-06
- Newly created parser
Need more help? Get answers from Community members and Google SecOps professionals.