[{"data":1,"prerenderedAt":531},["ShallowReactive",2],{"navigation_docs":3,"-operations-security":134,"-operations-security-surround":526},[4,26,52,88,114],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":25},"Getting Started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,15,20],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-sparkles",{"title":16,"path":17,"stem":18,"icon":19},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F2.quickstart","i-lucide-play",{"title":21,"path":22,"stem":23,"icon":24},"Architecture & State","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F3.architecture","i-lucide-cpu",false,{"title":27,"icon":28,"path":29,"stem":30,"children":31,"page":25},"Serverless & Edge","i-lucide-zap","\u002Fserverless","2.serverless",[32,37,42,47],{"title":33,"path":34,"stem":35,"icon":36},"Serverless Architecture","\u002Fserverless\u002Foverview","2.serverless\u002F1.overview","i-lucide-globe",{"title":38,"path":39,"stem":40,"icon":41},"Minimal Client","\u002Fserverless\u002Fminimal-client","2.serverless\u002F2.minimal-client","i-lucide-code",{"title":43,"path":44,"stem":45,"icon":46},"Execution Modes","\u002Fserverless\u002Fexecution-modes","2.serverless\u002F3.execution-modes","i-lucide-list-tree",{"title":48,"path":49,"stem":50,"icon":51},"Timeouts & Retries","\u002Fserverless\u002Ftimeouts-and-retries","2.serverless\u002F4.timeouts-and-retries","i-lucide-alert-triangle",{"title":53,"icon":54,"path":55,"stem":56,"children":57,"page":25},"API Reference","i-lucide-terminal","\u002Fapi-reference","3.api-reference",[58,63,68,73,78,83],{"title":59,"path":60,"stem":61,"icon":62},"Protocol & Authentication","\u002Fapi-reference\u002Foverview","3.api-reference\u002F1.overview","i-lucide-key",{"title":64,"path":65,"stem":66,"icon":67},"Queries","\u002Fapi-reference\u002Fqueries","3.api-reference\u002F2.queries","i-lucide-database",{"title":69,"path":70,"stem":71,"icon":72},"Transactions","\u002Fapi-reference\u002Ftransactions","3.api-reference\u002F3.transactions","i-lucide-layers",{"title":74,"path":75,"stem":76,"icon":77},"Administration","\u002Fapi-reference\u002Fadministration","3.api-reference\u002F4.administration","i-lucide-settings",{"title":79,"path":80,"stem":81,"icon":82},"Scopes & Permissions","\u002Fapi-reference\u002Fscopes-permissions","3.api-reference\u002F5.scopes-permissions","i-lucide-shield",{"title":84,"path":85,"stem":86,"icon":87},"Errors & Diagnostics","\u002Fapi-reference\u002Ferrors","3.api-reference\u002F6.errors","i-lucide-alert-circle",{"title":89,"icon":90,"path":91,"stem":92,"children":93,"page":25},"Configuration","i-lucide-sliders","\u002Fconfiguration","4.configuration",[94,99,104,109],{"title":95,"path":96,"stem":97,"icon":98},"Gateway YAML","\u002Fconfiguration\u002Fgateway-yaml","4.configuration\u002F1.gateway-yaml","i-lucide-file-code",{"title":100,"path":101,"stem":102,"icon":103},"Connection Pools","\u002Fconfiguration\u002Fconnection-pools","4.configuration\u002F2.connection-pools","i-lucide-activity",{"title":105,"path":106,"stem":107,"icon":108},"Analytics & Observability","\u002Fconfiguration\u002Fanalytics","4.configuration\u002F3.analytics","i-lucide-bar-chart",{"title":110,"path":111,"stem":112,"icon":113},"Runtime Files & State","\u002Fconfiguration\u002Fruntime-files","4.configuration\u002F4.runtime-files","i-lucide-folder",{"title":115,"icon":116,"path":117,"stem":118,"children":119,"page":25},"Operations & Security","i-lucide-shield-check","\u002Foperations","5.operations",[120,125,129],{"title":121,"path":122,"stem":123,"icon":124},"Production Deployment","\u002Foperations\u002Fdeployment","5.operations\u002F1.deployment","i-lucide-server",{"title":126,"path":127,"stem":128,"icon":116},"Security Hardening","\u002Foperations\u002Fsecurity","5.operations\u002F2.security",{"title":130,"path":131,"stem":132,"icon":133},"Development & Contributing","\u002Foperations\u002Fdevelopment","5.operations\u002F3.development","i-lucide-code-2",{"id":135,"title":126,"body":136,"description":517,"extension":518,"links":519,"meta":520,"navigation":521,"path":127,"seo":522,"stem":128,"__hash__":525},"docs\u002F5.operations\u002F2.security.md",{"type":137,"value":138,"toc":503},"minimark",[139,144,148,151,156,159,205,207,211,261,263,267,272,279,310,314,333,335,339,377,379,383,386,479,481,485,488],[140,141,143],"h1",{"id":142},"security-hardening-guide","Security & Hardening Guide",[145,146,147],"p",{},"The gateway reduces direct database credential exposure, but it remains a critical SQL execution service. A secure deployment depends on network isolation, careful PostgreSQL grants, protected secrets, and conservative client retry policies.",[149,150],"hr",{},[152,153,155],"h2",{"id":154},"trust-model","Trust Model",[145,157,158],{},"The gateway operates under the following trust assumptions:",[160,161,162,179,185,195],"ul",{},[163,164,165,169,170,174,175,178],"li",{},[166,167,168],"strong",{},"Operators:"," Individuals with filesystem or environment access to ",[171,172,173],"code",{},"gateway.yaml"," and ",[171,176,177],{},".env"," are fully trusted.",[163,180,181,184],{},[166,182,183],{},"Admin Password Holders:"," Possess full cluster authority (can create databases, drop tables, issue keys). Must be tightly restricted.",[163,186,187,190,191,194],{},[166,188,189],{},"API Key Holders:"," Authenticated clients are trusted ",[166,192,193],{},"strictly within the PostgreSQL role scope"," assigned to their key.",[163,196,197,200,201,204],{},[166,198,199],{},"PostgreSQL Administrator:"," The role in ",[171,202,203],{},"DATABASE_URL"," is trusted to manage internal gateway tables and provision restricted logins.",[149,206],{},[152,208,210],{"id":209},"network-isolation","Network Isolation",[212,213,214,220,234,251],"ol",{},[163,215,216,219],{},[166,217,218],{},"Keep PostgreSQL and Redis Private:"," PostgreSQL and Redis must never be directly exposed to the public internet. Restrict them to the gateway host's private subnet or VPC security group.",[163,221,222,229,230,233],{},[166,223,224,225,228],{},"Restrict ",[171,226,227],{},"\u002Fadmin"," Routes:"," Admin endpoints should never be publicly reachable. Restrict ",[171,231,232],{},"\u002Fadmin\u002F*"," using firewall rules, a private VPC ingress, VPN, or reverse proxy IP allowlisting.",[163,235,236,239,240,243,244,247,248,250],{},[166,237,238],{},"Loopback Binding:"," When deployed behind a local reverse proxy on the same host, bind ",[171,241,242],{},"server.host"," to ",[171,245,246],{},"127.0.0.1"," in ",[171,249,173],{},".",[163,252,253,256,257,260],{},[166,254,255],{},"Trusted Proxies:"," Only configure trusted reverse proxies to forward ",[171,258,259],{},"X-Forwarded-For",". Accepting arbitrary forwarding headers allows callers to spoof client IPs and bypass rate limits.",[149,262],{},[152,264,266],{"id":265},"postgresql-least-privilege","PostgreSQL Least Privilege",[268,269,271],"h3",{"id":270},"_1-the-administrative-connection","1. The Administrative Connection",[145,273,274,275,278],{},"The administrator connection configured in ",[171,276,277],{},"database.url"," requires:",[160,280,281,291,297,304],{},[163,282,283,286,287,290],{},[171,284,285],{},"CONNECT"," and ownership rights on the ",[171,288,289],{},"http_postgres_gateway"," persistence schema.",[163,292,293,296],{},[171,294,295],{},"CREATEROLE"," privilege to create and configure scoped logins.",[163,298,299,300,303],{},"Session visibility on ",[171,301,302],{},"pg_stat_activity"," to verify query connection health.",[163,305,306,309],{},[171,307,308],{},"CREATE DATABASE"," privilege only if the database creation API is utilized.",[268,311,313],{"id":312},"_2-scoped-query-roles","2. Scoped Query Roles",[160,315,316,319,326],{},[163,317,318],{},"The gateway provisions separate PostgreSQL users with randomly derived passwords for each unique key scope.",[163,320,321,322,325],{},"Scoped roles must have ",[166,323,324],{},"no superuser privileges",", no elevated role memberships, and no access to databases other than their assigned targets.",[163,327,328,329,332],{},"Audit and revoke default ",[171,330,331],{},"PUBLIC"," connection rights on all sensitive databases.",[149,334],{},[152,336,338],{"id":337},"credential-file-handling","Credential & File Handling",[160,340,341,351,361,364],{},[163,342,343,344,346,347,350],{},"Store ",[171,345,203],{},", ",[171,348,349],{},"REDIS_URL",", and admin secrets in a secure secret manager (e.g., AWS Secrets Manager, HashiCorp Vault) rather than source control.",[163,352,353,354,357,358,250],{},"Protect ",[171,355,356],{},"data\u002Fdata.json",". It contains key metadata and the secret seeds used to derive database credentials for scoped roles. Set filesystem mode to ",[171,359,360],{},"0600",[163,362,363],{},"Never log raw API keys, passwords, or bound SQL parameter values.",[163,365,366,367,346,369,372,373,376],{},"Do not commit ",[171,368,177],{},[171,370,371],{},"data\u002F",", or ",[171,374,375],{},"logs\u002F"," to container images or git repositories.",[149,378],{},[152,380,382],{"id":381},"security-review-checklist","Security Review Checklist",[145,384,385],{},"Before opening the gateway to production traffic, verify each requirement:",[160,387,390,400,409,415,424,438,457,463,469],{"className":388},[389],"contains-task-list",[163,391,394,399],{"className":392},[393],"task-list-item",[395,396],"input",{"disabled":397,"type":398},true,"checkbox"," TLS 1.2+ is enforced on all ingress routes.",[163,401,403,405,406,408],{"className":402},[393],[395,404],{"disabled":397,"type":398}," ",[171,407,232],{}," routes are unreachable from the public internet.",[163,410,412,414],{"className":411},[393],[395,413],{"disabled":397,"type":398}," PostgreSQL and Redis are isolated on private subnets.",[163,416,418,420,421,423],{"className":417},[393],[395,419],{"disabled":397,"type":398}," Default ",[171,422,331],{}," connection and schema creation privileges are revoked on target databases.",[163,425,427,429,430,346,432,434,435,437],{"className":426},[393],[395,428],{"disabled":397,"type":398}," Runtime files (",[171,431,356],{},[171,433,375],{},") are readable only by the service account (",[171,436,360],{},").",[163,439,441,443,444,346,447,346,450,346,453,456],{"className":440},[393],[395,442],{"disabled":397,"type":398}," API keys use minimal CRUD scopes (",[171,445,446],{},"c",[171,448,449],{},"r",[171,451,452],{},"u",[171,454,455],{},"d",") restricted to specific tables where possible.",[163,458,460,462],{"className":459},[393],[395,461],{"disabled":397,"type":398}," Reverse proxies have automatic POST retries disabled.",[163,464,466,468],{"className":465},[393],[395,467],{"disabled":397,"type":398}," Dynamic SQL parameterization is strictly enforced; untrusted string concatenation is prohibited.",[163,470,472,474,475,478],{"className":471},[393],[395,473],{"disabled":397,"type":398}," Error detail exposure (",[171,476,477],{},"database.exposeErrorDetails",") is disabled in production.",[149,480],{},[152,482,484],{"id":483},"reporting-vulnerabilities","Reporting Vulnerabilities",[145,486,487],{},"If you discover a security vulnerability in HTTP PostgreSQL Gateway:",[160,489,490,495],{},[163,491,492],{},[166,493,494],{},"Do not open a public GitHub issue.",[163,496,497,498,250],{},"Disclose privately following the repository security policy by emailing ",[499,500,502],"a",{"href":501},"mailto:harsh@1st-services.com","harsh@1st-services.com",{"title":504,"searchDepth":505,"depth":505,"links":506},"",2,[507,508,509,514,515,516],{"id":154,"depth":505,"text":155},{"id":209,"depth":505,"text":210},{"id":265,"depth":505,"text":266,"children":510},[511,513],{"id":270,"depth":512,"text":271},3,{"id":312,"depth":512,"text":313},{"id":337,"depth":505,"text":338},{"id":381,"depth":505,"text":382},{"id":483,"depth":505,"text":484},"Trust boundaries, least privilege roles, credential handling, network controls, and security checklists.","md",null,{},{"icon":116},{"title":523,"description":524},"Security Hardening · HTTP PostgreSQL Gateway","Security best practices for HTTP PostgreSQL Gateway — trust models, role isolation, network boundaries, and vulnerability reporting.","_jmRXKBXWaBthObMBfRE4Po_Oyv7coSPjtCrAJRduuE",[527,529],{"title":121,"path":122,"stem":123,"description":528,"icon":124,"children":-1},"Production topology, Docker, systemd, reverse proxy configuration, graceful shutdown, and upgrades.",{"title":130,"path":131,"stem":132,"description":530,"icon":133,"children":-1},"Local development environment, project layout, design principles, and contribution workflow.",1795399273837]