PART 3 · ROLE MATRIX FOR A GAME PROJECT
The three roles of a healthy project: owner, app, and readonly
A clear division of responsibilities between the schema migrator, the game backend, and analytics
1. game_owner (Schema Owner)
2. game_app (Game Backend)
3. game_readonly (Analytics and BI)
Who: CI/CD Migrator, DBA
Who: API service, workers
Who: DBeaver Intern, BI
Permitted:
• Has ownership of the AUTHORIZATION game_owner schema and all tables within it
• Can execute CREATE, ALTER, and DROP TABLE statements, and create indexes and views
When connected:
• Only during release rollout (migration). Does not maintain open connections under normal circumstances.
Allowed:
• USAGE ON SCHEMA game + rights on sequences
• SELECT, INSERT, UPDATE, DELETE on operational tables (players, clans, matches)
• SELECT and INSERT ONLY on audit logs (purchases, kill_log)
Prohibited: any DDL and deletion of purchase receipts!
Allowed:
• USAGE ON SCHEMA game
• SELECT only on permitted tables and views
Prohibited:
• Any data modification (INSERT / UPDATE / DELETE) and any DDL. Safe for manual analytical queries.
Security by default: Starting with PostgreSQL 15, standard roles do not have CREATE privileges on the public schema—and we further restrict access to it using `REVOKE ALL ON SCHEMA public FROM PUBLIC`.