wrappers icon indicating copy to clipboard operation
wrappers copied to clipboard

Cannot query Stripe FDW using client sdk

Open julian-hecker opened this issue 5 months ago • 0 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Cannot query data from the Stripe FDW using client sdk. I have tried several different ways but have not managed to do this successfully. Not even using the service role key.

To Reproduce

  1. Go to the Supabase Dashboard Settings > Database > Wrappers and set up Stripe FDW. Create the foreign tables in the public schema.
  2. Attempt to query the tables from the client sdk, any key - anon or service_role
const { data } = await supabase.from('public.stripe_products').select().throwOnError();
  1. Produces the following error message:
permission denied for schema vault

I have also reproduced the issue this way:

  1. Go to Supabase Dashboard Settings > Database > Wrappers and setup Stripe FDW, but this time create the foreign tables in a private schema named stripe.
  2. Create a view in the public schema which displays the data from the foreign table.
create or replace view public.products as select * from stripe.products;
  1. Attempt to query the view from the client sdk, use any key: anon or service_role
const { data } = await supabase.from('public.products').select().throwOnError();
  1. Same error message is produced
permission denied for schema vault

Expected behavior

I expected to be able to query the data that is visible in the public schema. I am trying to use stripe to store product data which should be visible to customers.

Related Issues

  • https://github.com/supabase/wrappers/issues/246

julian-hecker avatar Sep 06 '24 00:09 julian-hecker