Table: planetscale_password - Query PlanetScale Passwords using SQL
PlanetScale is a database platform that allows developers to build applications on MySQL-compatible databases. It provides a scalable, resilient, and secure database service suitable for mission-critical applications. The PlanetScale Password resource represents the passwords associated with PlanetScale databases.
Table Usage Guide
The planetscale_password
table allows users to query and analyze the passwords associated with PlanetScale databases. As a Database Administrator or Security Analyst, you can use this table to gain insights into the configuration and status of these passwords. This can assist in identifying potential security vulnerabilities, ensuring compliance with password policies, and maintaining overall database security.
Important Notes
- You must specify the
database_name
in thewhere
clause to query this table.
Examples
List all passwords for a database
Identify all passwords associated with a specific database to enhance security monitoring and ensure proper access control. This is particularly useful in managing user permissions and maintaining database integrity.
select p.organization_name, p.database_name, p.branch_name, p.name, p.created_atfrom planetscale_passwordwhere database_name = 'test';
select p.organization_name, p.database_name, p.branch_name, p.name, p.created_atfrom planetscale_password pwhere p.database_name = 'test';
List all passwords for all databases & branches
Explore which passwords are associated with specific organizations, databases, and branches. This can be beneficial for managing and reviewing access control in a real-world scenario.
select p.organization_name, p.database_name, p.branch_name, p.name, p.created_atfrom planetscale_database as d join planetscale_password as p on d.name = p.database_name;
select p.organization_name, p.database_name, p.branch_name, p.name, p.created_atfrom planetscale_database as d join planetscale_password as p on d.name = p.database_name;
List all passwords more than 90 days old
Explore which passwords in your organization's database are more than 90 days old. This can be crucial for maintaining security standards, as it allows you to identify and update potentially vulnerable or outdated passwords.
select p.organization_name, p.database_name, p.branch_name, p.name, p.created_atfrom planetscale_database as d join planetscale_password as p on d.name = p.database_namewhere age(p.created_at) > interval '90 days';
select p.organization_name, p.database_name, p.branch_name, p.name, p.created_atfrom planetscale_database as d join planetscale_password as p on d.name = p.database_namewhere julianday('now') - julianday(p.created_at) > 90;
Schema for planetscale_password
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
branch_name | text | = | Name of the database branch. |
connection_strings | jsonb | Connection strings for the branch. | |
created_at | timestamp with time zone | When the password was created. | |
database_name | text | = | Name of the database. |
deleted_at | timestamp with time zone | When the password was deleted. | |
id | text | ID of the password. | |
name | text | = | Name of the password. |
organization_name | text | =, !=, ~~, ~~*, !~~, !~~* | Name of the organization. |
role | text | Role for the password. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. |
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)" -- planetscale
You can pass the configuration to the command with the --config
argument:
steampipe_export_planetscale --config '<your_config>' planetscale_password