stash-supabase

Integrate CipherStash field-level encryption with Supabase using the @cipherstash/stack/supabase wrapper.

156|6|Updated Nov 14, 2024
One-click install
npx skills add https://github.com/cipherstash/stack --skill stash-supabase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stash-supabase
Source: https://github.com/cipherstash/stack/tree/main/skills/stash-supabase
Command: npx skills add https://github.com/cipherstash/stack --skill stash-supabase

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @cipherstash/stack, @supabase/supabase-js, and includes references (resource) components.

What problem does it solve?

This Skill enables robust field-level encryption for your Supabase database, ensuring sensitive data remains protected at rest and in transit while still allowing for powerful querying.

Core Features & Use Cases

  • Transparent Encryption/Decryption: Automatically encrypts data on insert/update and decrypts on select, seamlessly integrating with your Supabase workflow.
  • Encrypted Querying: Supports a wide range of query filters (eq, like, gt, in, or, match) on encrypted columns.
  • Identity-Aware Encryption: Allows tying encryption contexts to specific user JWTs for enhanced security.
  • Use Case: Securely store user PII like email addresses and personal details in your Supabase application, while still being able to search and filter by these fields.

Quick Start

Use the stash-supabase skill to integrate CipherStash encryption with your Supabase project by following the setup and usage examples provided in the documentation.

Frequently Asked Questions about stash-supabase

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I encrypt sensitive columns in a Supabase database while still allowing queries?

Field-level encryption in Supabase is achieved by wrapping the client with a specialized library that automatically encrypts data on insert and decrypts on select, storing encrypted columns as JSONB. This allows seamless querying on encrypted data using standard filters.

Can I use equality and range filters on encrypted data in Supabase?

Encrypted querying supports a wide range of filters including equality (eq), text search (like, match), range comparisons (gt), and set checks (in, or) directly on encrypted columns. This functionality ensures you can filter sensitive data without exposing plaintext to the database.

Does Supabase support identity-aware encryption tied to user JWTs?

Identity-aware encryption allows tying the encryption context to specific user JWTs in Supabase. This enhances security by ensuring encrypted data is strictly scoped and accessible only within the correct user identity context.

What is the best way to secure user PII in a Supabase TypeScript application?

Using a field-level encryption wrapper provides transparent encryption and decryption for mutations and selects, securing user PII like emails and personal details. Sensitive data remains protected at rest and in transit while still allowing powerful search queries.

Are there limitations when searching encrypted JSONB columns in Supabase?

Encrypted querying supports specific filters like eq, like, gt, in, or, and match on encrypted JSONB columns. Complex analytical queries or custom plaintext operations outside these supported filters may not be possible on the encrypted data.