Documentation
¶
Overview ¶
Package dbproxy proxies database queries on the gateway side, enforcing allowlists and row limits before any SQL hits the customer DB.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Allowlist ¶
type Allowlist struct {
Tables []string // FQNs: "schema.table"
BlockedColumns []string // FQNs: "table.column"
ReadOnly bool
}
Allowlist filters SQL by table FQN and blocked column references.
func (*Allowlist) Check ¶
Check returns nil if the SQL is admissible, or an error describing the violation.
Rules:
- Only SELECT (and CTEs whose top-level is SELECT) are allowed when ReadOnly.
- Every table reference must be in Tables (matched as schema.table or table).
- No column reference may match a BlockedColumns entry.
Click to show internal directories.
Click to hide internal directories.