railiance-platform/helm/apps-pg-consumer-controls.sql
codex cb321deeab
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Finish RPF-WP-0019 apps-pg controls and recovery
2026-08-20 22:58:45 +02:00

15 lines
967 B
SQL

-- Idempotent controls not expressible in the installed CNPG managed.roles CRD.
-- Apply as the controlled apps-pg cluster administrator only after notifying
-- both consumers of the published limits in docs/s3-consumer-interfaces.md.
ALTER ROLE vergabe SET statement_timeout = '15s';
ALTER ROLE vergabe SET idle_in_transaction_session_timeout = '15s';
ALTER ROLE coulomb_social SET statement_timeout = '15s';
ALTER ROLE coulomb_social SET idle_in_transaction_session_timeout = '15s';
-- PostgreSQL grants CONNECT and TEMPORARY to PUBLIC by default. A database per
-- consumer is not an isolation boundary until those defaults are removed.
REVOKE CONNECT, TEMPORARY ON DATABASE apps_meta FROM PUBLIC;
REVOKE CONNECT, TEMPORARY ON DATABASE vergabe_db FROM PUBLIC;
REVOKE CONNECT, TEMPORARY ON DATABASE coulomb_social_db FROM PUBLIC;
GRANT CONNECT, TEMPORARY ON DATABASE vergabe_db TO vergabe;
GRANT CONNECT, TEMPORARY ON DATABASE coulomb_social_db TO coulomb_social;