JWT-mode anonymous/public API access — AppContextStrategy (KYTE-#229)#102
Draft
kennethphough wants to merge 1 commit into
Draft
JWT-mode anonymous/public API access — AppContextStrategy (KYTE-#229)#102kennethphough wants to merge 1 commit into
kennethphough wants to merge 1 commit into
Conversation
Server-side half of the two-repo change letting JWT-mode sites serve requireAuth=false controllers to anonymous visitors (public browsing before login) via x-kyte-appid only. - AppContextStrategy: strict header-only matches() (appid present, no Bearer/signature/identity → mutually exclusive with HMAC/JWT); preAuth resolves the app's account but NEVER a user and NEVER hasSession (the invariant that keeps requireAuth=true controllers at 403). Slotted in AuthDispatcher after Jwt, before Hmac. - Defense in depth: per-app opt-in Application.allow_public (default 0, migration 4.11.0_application_allow_public.sql) enforced in preAuth; ModelController restricts an app_context request to GET (read-only); AuthShadowHarness skips app_context (no legacy equivalent). - tests/AppContextStrategyTest.php (added to phpunit.xml.dist). Co-Authored-By: Claude Opus 4.8 (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.
Server-side half of #229: lets JWT-mode sites serve requireAuth=false controllers to anonymous visitors via x-kyte-appid only. New AppContextStrategy (strict matches, account-only/no-user/no-hasSession), per-app allow_public opt-in + migration, read-only enforcement, shadow-harness skip, tests. kyte-api-js anonymous fall-through ships alongside. Draft until dev QA.
🤖 Generated with Claude Code