githubEdit

key-skeletonAPI Key Management

The API Key Management endpoints provide the ability to list, create, update, and delete reusable provider API keys within your workspaces. These keys enable you to decouple credentials from individual storage units or AI models, facilitating better credential rotation, sharing, and centralized management.

Overview

Provider API Keys act as a centralized vault for your cloud and AI provider credentials. Instead of entering your AWS access key or OpenAI secret directly into every storage bucket or AI LLM configuration, you can save them once as a Provider API Key and reference that key across multiple resources.

Key Characteristics

  • Workspace-Scoped: Each API key is associated with a specific workspace, governing who can view and use it.

  • Reusable: A single API key can be linked to multiple Storage Units and AI LLMs.

  • Encrypted Storage: Secrets (like AWS Secret Keys or API tokens) are encrypted before being stored in the database.

  • Safe Deletion: An API key cannot be deleted if it is still actively being used by any Storage Unit or AI LLM.

Supported Providers

Provider API keys can be created for any provider type supported by Flashback, including:

  • AWS - Amazon Web Services (S3, Bedrock)

  • GCP - Google Cloud Platform (GCS, Vertex AI)

  • AZURE - Microsoft Azure (Blob Storage, Azure OpenAI)

  • OPENAI - OpenAI

  • ANTHROPIC - Anthropic

  • And any other supported ProviderType.

API Key Management Calls

Key Management

Method
API Reference
Description

GET /apikeys

List available API keys for a workspace.

POST /apikeys

Create a new provider API key.

PUT /apikeys/{uuid}

Update an existing API key's properties.

DELETE /apikeys/{uuid}

Delete a provider API key.

Common Use Cases

1. Centralized Credential Creation

Create an API key once and use it to configure multiple buckets.

2. Monitoring Key Usage

Determine how many resources are relying on a specific credential before attempting to rotate or delete it.

3. Credential Rotation

Update the credentials without having to individually update every single bucket or AI model that uses them.

Security Best Practices

1. Principle of Least Privilege

Ensure your provider API keys only have the permissions necessary in the target cloud (e.g., scoped IAM roles in AWS or GCP).

2. Understand Workspace Isolation

API keys belong to workspaces. Ensure you create keys in the appropriate workspace so that only authorized team members can utilize those credentials to provision resources.

3. Safe Deletion Protocol

The Flashback platform protects you from accidental deletions by blocking the removal of any API key that is actively linked to a bucket or AI model. Before deleting a key, you must first migrate or delete the dependent resources.

Error Handling

Common error scenarios and how to handle them:

400 Bad Request (Deletion Constraint)

Cause: Attempting to delete an API key that is still in use.

403 Forbidden

Cause: User doesn't have read/write access to the workspace the API key belongs to.

Next Steps

  1. Review your existing Storage Units and consider migrating them to use centralized API keys.

  2. Update your provisioning scripts to utilize POST /apikeys before creating new resources.

Last updated

Was this helpful?