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

Enable JWT verification when serving all functions #1005

Merged
merged 9 commits into from
Apr 10, 2023
Merged

Conversation

laktek
Copy link
Contributor

@laktek laktek commented Apr 10, 2023

What kind of change does this PR introduce?

  • Updates edge-runtime to 1.2.12 (the latest release).
  • Provide a main function script as required by the newer release of edge-runtime.
  • Enable JWT verification for functions via the main function.

What is the current behavior?

No JWT verification when serving all functions via supabase function serve.

What is the new behavior?

Serving all functions will default to verify JWT unless --no-verify-jwt flag is passed.

Additional context

Fixes #873.

Also, the new version of edge-runtime should include Deno.errors (as mentioned in the ticket supabase/edge-runtime#211)

Tested supabase start and it also seems to work.

@laktek laktek requested a review from a team as a code owner April 10, 2023 00:03
@coveralls
Copy link

coveralls commented Apr 10, 2023

Pull Request Test Coverage Report for Build 4655797259

  • 20 of 22 (90.91%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 60.689%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/functions/serve/serve.go 20 22 90.91%
Totals Coverage Status
Change from base Build 4654309727: 0.06%
Covered Lines: 4159
Relevant Lines: 6853

💛 - Coveralls

internal/functions/serve/templates/main.ts Outdated Show resolved Hide resolved
internal/functions/serve/templates/main.ts Outdated Show resolved Hide resolved
internal/functions/serve/serve.go Outdated Show resolved Hide resolved
@laktek
Copy link
Contributor Author

laktek commented Apr 10, 2023

Thanks for fixing those @soedirgo. Shall we merge this and do a follow up PR for per function configs?

@soedirgo
Copy link
Member

Yea sounds good.

@laktek laktek merged commit bb0ef6a into main Apr 10, 2023
@laktek laktek deleted the use-edge-runtime-1.2 branch April 10, 2023 09:21
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.

Serving multiple functions (with edge-runtime) removes the authorization header requirement
4 participants