turbot/scaleway
steampipe plugin install scaleway

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_id
from
scaleway_iam_api_key
select
access_key,
created_at,
user_id,
expires_at,
default_project_id
from
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 age
from
scaleway_iam_api_key
where
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 age
from
scaleway_iam_api_key
where
julianday('now') - julianday(created_at) > 90;

Schema for scaleway_iam_api_key

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
access_keytext=The access key of API key.
application_idtextID of application bearer.
created_attimestamp with time zoneCreation date and time of API key.
creation_iptextThe IP Address of the device which created the API key.
default_project_idtextThe default project ID specified for this API key.
descriptiontextDescription of API key.
editablebooleanWhether or not the API key is editable.
expires_attimestamp with time zoneThe expiration date and time of API key.
secret_keytextThe secret key of API Key.
updated_attimestamp with time zoneLast update date and time of API key.
user_idtextID 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