steampipe plugin install pipes

Table: pipes_token - Query Pipes Tokens using SQL

Pipes Tokens are resources in the Pipes service that represent unique identifiers for authenticated sessions. They contain information about the token's creation, expiration, and the associated user. Pipes Tokens are essential for managing access and authentication within the Pipes service.

Table Usage Guide

The pipes_token table provides insights into the authentication tokens within the Pipes service. As a Security Engineer, explore token-specific details through this table, including token ID, creation time, and expiration time. Utilize it to manage token lifecycle, monitor token usage, and ensure proper access controls are in place.

Examples

Basic info

Explore which user ID is linked with a specific ID, and gain insights into their status and last four digits of their token. This can be useful in understanding user activity and token usage patterns.

select
id,
user_id,
status,
last4
from
pipes_token;
select
id,
user_id,
status,
last4
from
pipes_token;

List inactive tokens

Discover the segments that contain inactive tokens to help maintain system security by ensuring outdated or unused tokens are identified and managed appropriately. This can be particularly useful in preventing unauthorized access or detecting potential system vulnerabilities.

select
id,
user_id,
status,
last4
from
pipes_token
where
status = 'inactive';
select
id,
user_id,
status,
last4
from
pipes_token
where
status = 'inactive';

List tokens older than 90 days

Identify instances where tokens have been active for more than 90 days. This could be useful for auditing purposes, ensuring tokens are not being used beyond a certain lifespan for security reasons.

select
id,
user_id,
status,
created_at,
last4
from
pipes_token
where
created_at <= (current_date - interval '90' day);
select
id,
user_id,
status,
created_at,
last4
from
pipes_token
where
created_at <= date('now', '-90 day');

Schema for pipes_token

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
created_attimestamp with time zoneThe token's creation time.
idtext=The unique identifier for the token.
last4textLast 4 digit of the token.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextThe token status.
updated_attimestamp with time zoneThe token's last updated time.
user_idtext=, !=, ~~, ~~*, !~~, !~~*The user ID.
version_idbigintThe version ID of the token.

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)" -- pipes

You can pass the configuration to the command with the --config argument:

steampipe_export_pipes --config '<your_config>' pipes_token