Table: algolia_api_key - Query Algolia API Keys using SQL
Algolia is a powerful search-as-a-service solution that allows you to build fast and relevant search into your applications. It provides you with the ability to index and search large amounts of data, and to deliver search results to your users in an instant. Algolia API Keys are used to authenticate requests to Algolia's API and manage permissions for different types of operations.
Table Usage Guide
The algolia_api_key
table provides insights into API keys within Algolia's search service. As a DevOps engineer, explore key-specific details through this table, including permissions, validity, and associated metadata. Utilize it to uncover information about keys, such as those with unrestricted permissions, the validity period of keys, and the verification of permission settings.
Examples
List all API Keys
Explore the list of all API keys to manage access control, monitor usage, and enhance security measures. This allows you to identify potential vulnerabilities or misuse, ensuring the integrity and confidentiality of your data.
select *from algolia_api_key;
select *from algolia_api_key;
Access keys more than 90 days old
Discover the segments that have access keys older than 90 days. This is useful to identify potential security risks and ensure timely key rotation.
select key, created_at, descriptionfrom algolia_api_keywhere age(created_at) > interval '90 days';
select key, created_at, descriptionfrom algolia_api_keywhere julianday('now') - julianday(created_at) > 90;
Access keys with permission to add objects
Analyze the settings to understand which access keys have the capability to add new objects. This is beneficial in managing access control and ensuring only authorized keys can modify your data.
select key, acl, descriptionfrom algolia_api_keywhere acl ? 'addObject'
Error: SQLite does not support the '?' operator for JSON objects.
Schema for algolia_api_key
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
acl | jsonb | List of permissions the key contains. | |
created_at | timestamp with time zone | The date at which the key has been created. | |
description | text | Description of the key. | |
indexes | jsonb | The list of targeted indices, if any. | |
key | text | = | API key value. |
max_hits_per_query | bigint | Maximum number of hits this API key can retrieve in one call. | |
max_queries_per_ip_per_hour | bigint | Maximum number of API calls allowed from an IP address per hour. | |
query_parameters | text | Parameters added to all searches with this key. | |
referers | jsonb | ||
validity | timestamp with time zone | Timestamp of the date at which the key expires. (0 means it will not expire automatically). |
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)" -- algolia
You can pass the configuration to the command with the --config
argument:
steampipe_export_algolia --config '<your_config>' algolia_api_key