Table: scaleway_iam_api_key - Query Scaleway IAM API Keys using SQL
Scaleway IAM API Keys are unique identifiers associated with a Scaleway account. These keys are used to authenticate and authorize actions in the Scaleway API. They can be created, deleted, and managed through the Scaleway console or API.
Table Usage Guide
The scaleway_iam_api_key
table provides insights into IAM API keys within Scaleway Identity and Access Management (IAM). As a security analyst, explore key-specific details through this table, including key states, creation and expiration dates, and associated user information. Utilize it to monitor and manage the lifecycle of API keys, ensuring they are rotated regularly and expired keys are deleted, enhancing the security posture of your Scaleway environment.
Important Notes
- This table requires the
organization_id
config argument to be set.
Examples
Basic info
Explore which Scaleway IAM API keys have been created, when they were made, and their expiration dates. This allows for efficient management of API keys, ensuring none are expired or unused.
select access_key, created_at, user_id, expires_at, default_project_idfrom scaleway_iam_api_key
select access_key, created_at, user_id, expires_at, default_project_idfrom scaleway_iam_api_key
List API keys older than 90 days
Determine the areas in which API keys are older than 90 days to manage and update them as necessary. This helps in maintaining security and ensuring all keys are up-to-date.
select access_key, created_at, user_id, expires_at, default_project_id, extract( day from current_timestamp - created_at ) as agefrom scaleway_iam_api_keywhere extract( day from current_timestamp - created_at ) > 90;
select access_key, created_at, user_id, expires_at, default_project_id, julianday('now') - julianday(created_at) as agefrom scaleway_iam_api_keywhere julianday('now') - julianday(created_at) > 90;
Schema for scaleway_iam_api_key
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
access_key | text | = | The access key of API key. |
application_id | text | ID of application bearer. | |
created_at | timestamp with time zone | Creation date and time of API key. | |
creation_ip | text | The IP Address of the device which created the API key. | |
default_project_id | text | The default project ID specified for this API key. | |
description | text | Description of API key. | |
editable | boolean | Whether or not the API key is editable. | |
expires_at | timestamp with time zone | The expiration date and time of API key. | |
secret_key | text | The secret key of API Key. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
updated_at | timestamp with time zone | Last update date and time of API key. | |
user_id | text | ID of user bearer. |
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)" -- scaleway
You can pass the configuration to the command with the --config
argument:
steampipe_export_scaleway --config '<your_config>' scaleway_iam_api_key