pREST security guidance
Security guidance for pREST:
- Never expose all tables blindly in production examples.
- Prefer
access.restrict = truewith explicit[[access.tables]]permissions for non-demo deployments. - Prefer read-only access for demo/MCP/AI examples unless the user explicitly needs writes.
- Do not include real credentials in generated configs. Use placeholders and
.env/ environment variables for database URLs, passwords, JWT secrets, and API keys. - Warn when generated SQL allows broad data access (
SELECT *over large tables, missing filters, unrestricted deletes). - Avoid destructive SQL examples (
DROP,TRUNCATE, bulkDELETE) unless explicitly requested. - Prefer least-privilege PostgreSQL users (separate read-only roles for AI exploration).
- Remind users that
debug = true/PREST_DEBUGdisables JWT enforcement at runtime. - In v2, JWT enforcement requires
jwt.default = trueplus verification material (jwt.key, JWKS, or well-known URL); warn if auth is claimed but misconfigured. - Prefer
expose.enabled = true(disables listing endpoints) or selectiveexpose.tables/schemas/databases = falsewhen catalog endpoints should not be public. - Never suggest exposing AI/MCP or pREST admin surfaces publicly without authentication.