Duo Security + Steampipe
Steampipe is an open-source zero-ETL engine to instantly query cloud APIs using SQL.
Duo Security provides cloud-based two-factor authentication services.
Example query:
select username, is_enrolled, last_loginfrom duo_userorder by username;
+----------+-------------+---------------------------+| username | is_enrolled | last_login |+----------+-------------+---------------------------+| dwight | true | 2022-04-17T07:36:34-04:00 || jim | true | 2022-04-17T09:36:34-04:00 || michael | false | <null> || pam | true | 2022-04-17T08:55:34-04:00 |+----------+-------------+---------------------------+
Documentation
Get started
Install
Download and install the latest Duo plugin:
steampipe plugin install duo
Configuration
Installing the latest duo plugin will create a config file (~/.steampipe/config/duo.spc
) with a single connection named duo
:
connection "duo" { plugin = "duo" api_hostname = "api-28bcd3da.duosecurity.com" integration_key = "DINXR28B7BSL5NB362QR" secret_key = "Xo8ZbvGLOLkw8iFowK34Mp2LOqQEh7cxeMmDoHSO"}
api_hostname
- Unique API endpoint for your account, learn more.integration_key
- Integration key for your account, learn more.secret_key
- Secret key, learn more.
Environment variables are also available as an alternate configuration method:
DUO_API_HOSTNAME
DUO_INTEGRATION_KEY
DUO_SECRET_KEY
Postgres FDW
This plugin is available as a native Postgres FDW. Unlike Steampipe CLI, which ships with an embedded Postgres server instance, the Postgres FDW can be installed in any supported Postgres database version.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_postgres_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/postgres.sh)" -- duo
The installer will prompt you for the plugin name and version, download and install the appropriate files for your OS, system architecture, and Postgres version.
To configure the Postgres FDW, you will create an extension, foreign server, and schema and import the foreign schema.
CREATE EXTENSION IF NOT EXISTS steampipe_postgres_duo;CREATE SERVER steampipe_duo FOREIGN DATA WRAPPER steampipe_postgres_duo OPTIONS (config '<your_config>');CREATE SCHEMA duo;IMPORT FOREIGN SCHEMA duo FROM SERVER steampipe_duo INTO duo;
SQLite Extension
This plugin is available as a SQLite Extension, making the tables available as SQLite virtual tables.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_sqlite_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/sqlite.sh)" -- duo
The installer will prompt you for the plugin name, version, and destination directory. It will then determine the OS and system architecture, and it will download and install the appropriate package.
To configure the SQLite extension, load the extension module and then run the steampipe_configure_duo
function to configure it with plugin-specific options.
$ sqlite3sqlite> .load ./steampipe_sqlite_extension_duo.sosqlite> select steampipe_configure_duo('<your_config>');
Export
This plugin is available as a standalone Export 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)" -- duo
You can pass the configuration to the command with the --config
argument:
steampipe_export_duo --config '<your_config>' <table_name>