Robusta fork: gate JWT exp requirement behind env var#1
Open
RoiGlinik wants to merge 2 commits into
Open
Conversation
Self-host customers' existing ANON_KEY/SERVICE_ROLE_KEY JWTs predate the
upstream realtime hard-requirement on the 'exp' claim. To avoid forcing
every customer to rotate keys on upgrade, this fork makes 'exp' optional
when the new env var JWT_REQUIRE_EXP=false is set.
Default (JWT_REQUIRE_EXP=true) matches upstream behavior exactly.
Changes:
* config/runtime.exs:
read JWT_REQUIRE_EXP env var into :realtime, :jwt_require_exp app env
* channels_authorization.ex:
toggle required = ["role", "exp"] vs ["role"] based on the flag
* jwt_verification.ex:
add token_config(opts), omit exp validator when flag off AND token
has no exp claim. Expired tokens still rejected when exp is present.
* Dockerfile:
reuse prebuilt supabase/realtime:v2.96.0 image for pgdelta artifacts
instead of running the heavy bun-based pgdelta-builder stage.
* .github/workflows/robusta-build.yml:
manual + push-triggered build pipeline targeting GCP Artifact Registry
and (opt-in) Docker Hub.
Adds an arm64 matrix entry running on ubuntu-24.04-arm so a multi-arch fork image is available (pushed as :<tag>-arm64) for local testing on Apple Silicon. Native runner avoids QEMU emulation, which is slow and flaky for Elixir/Erlang builds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self-host customers' existing ANON_KEY/SERVICE_ROLE_KEY JWTs predate the upstream realtime hard-requirement on the 'exp' claim. To avoid forcing every customer to rotate keys on upgrade, this fork makes 'exp' optional when the new env var JWT_REQUIRE_EXP=false is set.
Default (JWT_REQUIRE_EXP=true) matches upstream behavior exactly.
Changes: