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, last4from pipes_token;
select id, user_id, status, last4from 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, last4from pipes_tokenwhere status = 'inactive';
select id, user_id, status, last4from pipes_tokenwhere 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, last4from pipes_tokenwhere created_at <= (current_date - interval '90' day);
select id, user_id, status, created_at, last4from pipes_tokenwhere created_at <= date('now', '-90 day');
Schema for pipes_token
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
created_at | timestamp with time zone | The token's creation time. | |
id | text | = | The unique identifier for the token. |
last4 | text | Last 4 digit of the token. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | The token status. | |
updated_at | timestamp with time zone | The token's last updated time. | |
user_id | text | =, !=, ~~, ~~*, !~~, !~~* | The user ID. |
version_id | bigint | The 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