Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: define search path in auth functions #1636

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kangmingtay
Copy link
Member

What kind of change does this PR introduce?

  • Revert fix: revert define search path in auth functions #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 kangmingtay requested a review from a team as a code owner June 25, 2024 08:26
Copy link
Contributor

@darora darora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't inspected it in detail, but can we have a test making sure we're not breaking things the same way as the last time this was attempted?

@hf
Copy link
Contributor

hf commented Jun 25, 2024

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.

@coveralls
Copy link

coveralls commented Jun 25, 2024

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
Copy link

coveralls commented Jun 25, 2024

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

@kangmingtay kangmingtay changed the title fix: search path fix: define search path in auth functions Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants