Skip to content

Epic JWT key: tolerate any PEM escaping (jwks.json was 500) - #16

Merged
ralyodio merged 1 commit into
masterfrom
fix/jwt-pem-escapes
Oct 12, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/jwt-pem-escapes

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

/.well-known/jwks.json and jwks-sandbox.json returned 500 (ERR_OSSL_PEM_NO_START_LINE) after the 2026-10-10 deploy recreated the container. app.env held CLIENT_JWT_PRIVATE_KEY with one escape level too many, so Compose produced lines ending in a backslash. Epic fetches this JWKS on every private_key_jwt token exchange, so the bug broke MyChart connects.

Hotfixed on dev2 by correcting app.env. This change collapses any run of backslashes before n or a newline, so the next vault sync can't break it again. Verified that a raw PEM and three escaped variants all parse.

🤖 Generated with Claude Code

The vault sync re-escaped CLIENT_JWT_PRIVATE_KEY, Compose turned it into
lines ending in a backslash, and /.well-known/jwks.json 500d after the
2026-10-10 deploy, breaking MyChart token exchange.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 08b0918 into master Oct 12, 2026
3 checks passed
@ralyodio
ralyodio deleted the fix/jwt-pem-escapes branch October 12, 2026 11:16
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.

1 participant