Table: onepassword_item_file - Query OnePassword File Items using SQL
OnePassword is a password management service that stores sensitive information, including File Items, in a secure and encrypted format. File Items in OnePassword include any files that users have uploaded and stored in their OnePassword vaults for safekeeping. This includes a variety of file types, such as images, documents, and more, all of which are securely encrypted and only accessible to authorized users.
Table Usage Guide
The onepassword_item_file
table provides insights into File Items within OnePassword. As a security analyst, explore file-specific details through this table, including the file's unique identifier, its associated vault, and other metadata. Utilize it to uncover information about stored files, such as their creation and modification dates, to assist in auditing and compliance checks.
Important Notes
- You must specify the
item_id
in thewhere
clause to query this table.
Examples
Basic info
Explore the details of a specific item in a password management system. This allows you to understand the size and location of the item, which can be useful for managing storage and organization within the system.
select id, name, item_id, vault_id, content_path, sizefrom onepassword_item_filewhere item_id = 'kvmaoszyhzbvze6g5t6vr6qg2a1';
select id, name, item_id, vault_id, content_path, sizefrom onepassword_item_filewhere item_id = 'kvmaoszyhzbvze6g5t6vr6qg2a1';
List all files of a particular vault
This example allows you to identify all the files associated with a specific vault in the 1Password service. It's particularly useful for auditing purposes, ensuring you have a comprehensive list of all files stored in a particular vault.
select f.id as file_id, f.name as file_name, i.title as item_title, content_path, sizefrom onepassword_item_file as f, onepassword_item as i, onepassword_vault as vwhere f.item_id = i.id and f.vault_id = v.id and v.name = 'Venu-SteampipeTest';
select f.id as file_id, f.name as file_name, i.title as item_title, content_path, sizefrom onepassword_item_file as f, onepassword_item as i, onepassword_vault as vwhere f.item_id = i.id and f.vault_id = v.id and v.name = 'Venu-SteampipeTest';
Show file contents of all items
Explore the contents of all items in a system, helping you gain insights into data organization and identify potential areas for cleanup or reorganization. This could be particularly useful for auditing purposes or data management initiatives.
select f.name as file_name, i.title as item_title, content_path, jsonb_pretty(content) as contentfrom onepassword_item_file as f, onepassword_item as iwhere f.item_id = i.id;
select f.name as file_name, i.title as item_title, content_path, contentfrom onepassword_item_file as f, onepassword_item as iwhere f.item_id = i.id;
Schema for onepassword_item_file
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
content | jsonb | The Base64-encoded contents of the file, if inline_files is set to true. | |
content_path | text | The path to download the contents of the file. | |
id | text | = | The UUID of the file. |
item_id | text | = | The UUID of the item. |
name | text | The name of the file. | |
section | jsonb | An object containing the UUID of a section in the item. | |
size | bigint | The size of the file in bytes. | |
title | text | The title of the file. | |
vault_id | text | = | The UUID of the vault the file is in. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- onepassword
You can pass the configuration to the command with the --config
argument:
steampipe_export_onepassword --config '<your_config>' onepassword_item_file