Skip to main content

Getting Started

Make sure to first set up your PlanetScale developer environment. Once you’ve installed the pscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.

The oidc-trust command

Create, list, update, and delete OIDC trusts. An OIDC trust lets workflows from a trusted identity provider exchange an OIDC token for a short-lived service token. See PlanetScale API with OpenID Connect for how the exchange works. Usage:

Available sub-commands

Sub-command flags

update changes only the fields you pass. To clear a list, pass its flag with an empty value, such as --condition=.

Available flags

Global flags

Examples

Inspecting a provider

Command:
This shows the provider’s issuer and the claims in its tokens, and marks which claims a trust must match. Use providers list to find provider names.

Creating an OIDC trust

Command:
This creates a trust that grants read_branch on one database to workflows matching both conditions. Required claims for the provider must be set as conditions. The output includes the trust ID. Pass it as oidc-trust to planetscale/auth-action.

Updating an OIDC trust

Command:

Deleting an OIDC trust

Command:

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.