Install KeyHippo Extension
Step-by-step guide to installing the KeyHippo PostgreSQL extension in your Supabase database
KeyHippo’s PostgreSQL extension is the core component that enables API key management and authentication in your Supabase database. This guide will walk you through the installation process.
Prerequisites
Before installing KeyHippo, ensure you have:
- An active Supabase project
- Admin access to your Supabase database
- Familiarity with SQL and database management
Installation Steps
1. Connect to Your Supabase Database
First, connect to your Supabase database using the SQL Editor in the Supabase dashboard or your preferred PostgreSQL client.
2. Install the Extension
Run the following SQL commands to install the KeyHippo extension:
Replace ‘0.0.33’ with the latest version number if a newer version is available. Check the KeyHippo GitHub repository for the most recent version.
3. Verify Installation
To verify that the extension has been installed correctly, you can run:
If the installation was successful, this query should return a row with details about the KeyHippo extension.
Post-Installation Setup
After installing the extension, KeyHippo automatically sets up necessary schemas, tables, and functions. However, you may want to perform some additional steps:
1. Set Up Vault Secrets
KeyHippo uses Supabase Vault for storing sensitive information. The installation process should have automatically set up the required secrets, but you can verify this:
If these secrets are not present, you may need to run the setup function manually:
2. Grant Necessary Permissions
Ensure that the authenticated
and anon
roles have the necessary permissions to use KeyHippo functions:
Troubleshooting
If you encounter any issues during installation:
- Version Conflicts: Ensure you’re using a compatible version of Supabase and PostgreSQL.
- Permission Errors: Verify that you have the necessary admin privileges in your Supabase project.
- Extension Not Found: Make sure your Supabase project is up to date and supports custom extensions.
If problems persist, consult the KeyHippo GitHub issues or reach out to Supabase support.
Updating KeyHippo
To update KeyHippo to a newer version:
Always check the changelog before updating to ensure compatibility with your current setup.
Next Steps
With the KeyHippo extension installed, you’re ready to start implementing API key authentication in your Supabase project. Next, you’ll want to:
- Configure your client application to use KeyHippo
- Create your first API key
- Implement RLS policies that utilize KeyHippo functions
Configure Client
Learn how to set up the KeyHippo client in your application.