[codex] Fix Snowflake gzip payload parsing and auth handling - #11
shadimoudallal wants to merge 5 commits into
Conversation
Code Review — gzip parsing & bearer-token authThanks for the fixes — the gzip handling and 🔴 Critical — sensitive data is being written to CloudWatch
console.log('Raw event.body length:', String(bodyStr).length);
console.log('Raw event.body first 200 chars:', String(bodyStr).substring(0, 200));
console.log('Raw event.body (full):', bodyStr);For Snowflake tokenize, Same concern, slightly smaller blast radius, in Suggested action: these look like debugging breadcrumbs left over from the issue you were chasing. Before merge, please either remove them or gate them behind something like 🟠 Bug — deploy script allows env-only credentials but only wires up
|
PR Review — Snowflake gzip parsing, bearer token auth, deploy improvementsThanks for this — the gzip parsing fix in particular addresses a real Snowflake/API Gateway interop gap. Overall the changes are well-scoped. A few notes below organized by category. Strengths
Issues & Suggestions1. Deploy auth precedence silently changed (potential regression)Before: if [ -n "$API_KEY" ] && [ -n "$CLIENT_ID" ]; then
echo -e "${YELLOW}Warning: both API key and JWT credentials found; using API key${NC}"
fi2. Dead code in
|
Review: Snowflake gzip payload parsing and auth handlingOverall this is a focused, well-scoped fix for a real interop problem (Snowflake delivers external function payloads as gzip+base64) and the auth/deploy improvements are reasonable. The new Bugs / correctness
Security
Test coverageThe three
Style / conventions
PerformanceNothing concerning. Gzip decompression is sync but Lambda is single-request-per-instance, and the parser sits on the same hot path it already did. The added log fields per request are negligible. SummaryThe core fix is correct and the test for it is appropriate. Main asks before merging: (1) decide on a single place to handle |
Code ReviewNice, focused PR. The gzip/base64 fix is the right call for Snowflake — Snowflake compresses external function payloads above a threshold and AWS API Gateway in REST mode delivers them base64-encoded, so the previous Things that look good
Potential issues / suggestions
Security
Test coverage
Overall: the fix is well-targeted and the body parser is a tidy abstraction. The bearer-token changes are the larger conceptual addition — clearer documentation around expiry/redeploy is the main thing I'd want before this lands in front of users who treat it as a first-class auth mode. 🤖 Generated with Claude Code |
Summary
Validation