fix(ddb): grant universal schema permissions to all roles
Adds SQL to postInitApplicationSQL granting schema permissions to PUBLIC. Allows any role (authentik, temporal, etc) to create tables in databases. For existing cluster: run SQL manually (done). For future bootstrap: automatic via initdb. Pattern for apps: Database CR + app-specific init Job optional (co-located).
This commit is contained in:
@@ -26,6 +26,11 @@ spec:
|
||||
- CREATE EXTENSION IF NOT EXISTS vector;
|
||||
- CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
- CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
||||
# Universal fix: grant schema permissions to all roles
|
||||
# Allows any role to create tables in public schema of any database
|
||||
- GRANT ALL ON SCHEMA public TO PUBLIC;
|
||||
- ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO PUBLIC;
|
||||
- ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO PUBLIC;
|
||||
|
||||
# Per-app login roles, passwords sourced from secrets (CNPG reconciles the
|
||||
# role password to match the secret). Their databases are separate Database
|
||||
|
||||
Reference in New Issue
Block a user