I use a single #Postgres instance in my #k8s clusters, with separate users, passwords, and databases in that instance for each application. It’s simpler to manage and reduces complexity, and my databases don’t benefit from being spread across nodes (they’re small and place few demands on the system). So the same instance hosts the databases for synapse and diaspora, for example.
Today I discovered that objects in the public
schema of each database (which is where they’re created by default) are accessible to all users on the database, unless they’re specifically revoked. So the system wasn’t as secure as I thought it was.
You can change this behavior with REVOKE ALL ON DATABASE <name> FROM PUBLIC;
. Then only users granted access (or the owner) will have access. You can also create objects in non-public schemas, but that can be challenging.
One more thing to automate.