chore(grants): SELECT on report.inquiry for the TS Webservice (#1003) - #72
Merged
Merged
Conversation
/v4/product/facade_scan and /v4/product/foundation-research join report.inquiry onto report.inquiry_sample. fundermaps_webservice held SELECT on inquiry_sample but not on inquiry, so both endpoints returned 500 "permission denied for table inquiry" for every request — live and broken on ws-staging since #22 shipped. Production drift, not a schema gap: sql/init/grants.sql already grants SELECT on ALL TABLES in report, but prod never ran init_db.sh and only incident + inquiry_sample carry the grant. Same pattern as #997. Applied to prod 2026-07-29; both endpoints verified returning 200 with data and 404 no_data_available where no fresh report exists. Co-Authored-By: Claude Opus 5 (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.
The
/v4/product/facade_scanand/v4/product/foundation-researchendpoints joinreport.inquiryontoreport.inquiry_sample.fundermaps_webserviceheld SELECT oninquiry_samplebut not oninquiry, so both endpoints returned 500 for every request — live and broken onws-stagingsince Webservice #22 shipped.Production drift, not a schema gap:
sql/init/grants.sqlalready grants SELECT on ALL TABLES inreport, but prod never raninit_db.shand onlyincident+inquiry_samplecarry the grant. Same pattern as #997 (application.contractor).Scoped to
inquiryonly —recovery,recovery_sampleanddossier_eventstay ungranted since no v4 endpoint reads them, and this is a billable internet-facing role.Already applied to prod (2026-07-29). Verified after:
facade_scan/NL.IMBAG.PAND.0243100001309617facadeScanRisk: a,validUntil: 2029-07-28foundation-research/NL.IMBAG.PAND.0599100000665418overallQuality: good,enforcementTerm: term25facade_scan/0758200000029064(no scan)no_data_availableFound while auditing v4 readiness for the NWWI v3→v4 cutover.
🤖 Generated with Claude Code