auth icon indicating copy to clipboard operation
auth copied to clipboard

fix: define search path in auth functions

Open kangmingtay opened this issue 1 year ago • 3 comments

What kind of change does this PR introduce?

  • Revert https://github.com/supabase/auth/pull/1634
  • Also, updates the definition of the auth.uid() and auth.role() function to account for the change in postgres 14, which made this impossible: current_setting(request.jwt.claim.my-claim, true) (thus always returning null), so we need to also include current_setting('request.jwt.claims', true), '')::jsonb ->> 'sub' (note the s in claims)

kangmingtay avatar Jun 25 '24 08:06 kangmingtay

Also @kangmingtay can we run an inspection script to see if people have changed grants on these functions. If we do create or replace AFAIK the grants are gone and it may break something in those customer projects.

hf avatar Jun 25 '24 08:06 hf

Pull Request Test Coverage Report for Build 9659049953

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 57.674%

Totals Coverage Status
Change from base Build 9648353678: 0.0%
Covered Lines: 8699
Relevant Lines: 15083

💛 - Coveralls

coveralls avatar Jun 25 '24 08:06 coveralls

Pull Request Test Coverage Report for Build 9659133962

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 57.674%

Totals Coverage Status
Change from base Build 9648353678: 0.0%
Covered Lines: 8699
Relevant Lines: 15083

💛 - Coveralls

coveralls avatar Jun 25 '24 08:06 coveralls

@kangmingtay is this something we still want to do, or can we close it?

cstockton avatar Apr 02 '25 17:04 cstockton