PROJ-427: temporary CF Access diagnostic logging#131
Merged
Conversation
Live production 401s persist after PROJ-427's reload fix, even for users with a single, correctly-scoped CF_Authorization cookie mid- session. Log the exact failure reason (decode error, alg/exp/aud/iss mismatch, or signature-invalid-with-which-keys) at each early-return in validateCfAccessJwt so the next repro tells us which check is actually failing, instead of guessing further. Temporary — to be reverted once the root cause is confirmed. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018DjSCvRampBsoXiqUwyQGx
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.
Summary
Temporary diagnostic-only change: logs the exact reason
validateCfAccessJwtrejects a token (decode error, alg/exp/aud/iss mismatch, or signature-invalid + which key IDs were tried). The user is still seeing 401s in production after the PROJ-427 reload fix, even mid-session with a single correctly-scopedCF_Authorizationcookie — need real evidence from a live repro to find the actual root cause rather than guessing further.To be reverted once we've captured a repro via
wrangler tail.PROJ-427
Test plan
pnpm --filter api test— 824 passedpnpm turbo type-check --filter=@projektor/apibiome checkclean🤖 Generated with Claude Code
https://claude.ai/code/session_018DjSCvRampBsoXiqUwyQGx