Haas: Surviving Without A Superuser - Part One
Consider, for example, the case of a service provider who would like to support a database with multiple customers as tenants. The customers will naturally want to feel as if they have the powers of a true superuser, with the ability to do things like create new roles, drop old ones, change permissions on objects that they don't own, and generally enjoy the freedom to bypass permission checks at the SQL level which superusers enjoy. The service provider, who is the true superuser, also wants this, but does not want the customers to be able to do the really scary things that a superuser can do, like changing archive_command to rm -rf / or deleting the entire contents of pg_proc so that the system crashes and the database in which the operation was performed is permanently ruined.
Posted Dec 10, 2021 11:49 UTC (Fri)
by martin.langhoff (guest, #61417)
[Link] (11 responses)
In 2021 we have so many good tools for container/OS/VM level segregation, it's just not worth it.
Posted Dec 10, 2021 13:52 UTC (Fri)
by dskoll (subscriber, #1630)
[Link] (1 responses)
Yes, I agree. It seems like a whole lot of work followed by a whole lot of vulnerability-patching to achieve something that can already be done fairly easily with techniques that have been scrutinized for vulnerabilities already.
Posted Dec 10, 2021 20:36 UTC (Fri)
by Vipketsh (guest, #134480)
[Link]
There may be good reasons to do this on a database level. The same as, say, why you would want to run a container instead of a full VM.
Posted Dec 11, 2021 4:04 UTC (Sat)
by bartoc (guest, #124262)
[Link] (2 responses)
Posted Dec 12, 2021 1:24 UTC (Sun)
by bjartur (guest, #67801)
[Link] (1 responses)
Posted Dec 12, 2021 23:38 UTC (Sun)
by bartoc (guest, #124262)
[Link]
Posted Dec 12, 2021 13:01 UTC (Sun)
by kleptog (subscriber, #1183)
[Link] (3 responses)
Containerising databases isn't really ideal, because there is so much benefit to large buffer caches and actual hardware. Containers are ideally stateless, and databases are basically only state.
Here we've dealt with the problem by creating a trusted service which the components connect to to create/manage databases and users. Standard roles/rights in Postgres prevent the applications accidentally stomping on each other. The idea of tenants is interesting, but eventually only a small part of the puzzle.
Posted Dec 12, 2021 14:38 UTC (Sun)
by Wol (subscriber, #4433)
[Link]
Until the regulators get involved ...
Cheers,
Posted Dec 12, 2021 16:55 UTC (Sun)
by NYKevin (subscriber, #129325)
[Link] (1 responses)
Well, you say that...
The reality is that it depends. In some cases, perhaps even most cases, this simplification is perfectly sensible. But if you're going to worry about nation-state adversaries, then you have to make some far more pessimistic assumptions. For example:
* Our adversaries will attempt to install persistent threats and move laterally through our network and other systems.
As a result, a model in which some subsystems are treated as untrusted may be a necessary component of defense-in-depth, if your adversaries really do have nation-state capabilities.
Posted Dec 12, 2021 22:09 UTC (Sun)
by kleptog (subscriber, #1183)
[Link]
That is why I said it depended on your threat model. If you care about nation state adversaries then anything cloud related is off the table. If it's not in a private bunker with an armed guard out the front then you may as well give up.
There is always a trade-off between the costs of implementing security and the benefits. In the large number of cases the costs of protecting against a nation state actor are far more than the value of the data. At that point you just have to accept the risk and get on with doing actual work and protecting against the threats you can afford to.
Posted Dec 12, 2021 14:16 UTC (Sun)
by epa (subscriber, #39769)
[Link]
Posted Dec 14, 2021 8:35 UTC (Tue)
by taladar (subscriber, #68407)
[Link]
Posted Dec 16, 2021 7:27 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
This is a somewhat overlooked scenario, when you want to add one more security barrier in case you code gets compromised.
Posted Dec 16, 2021 10:53 UTC (Thu)
by nye (subscriber, #51576)
[Link] (1 responses)
What sorts of things are you thinking of here? Things like updating the software version? Or more like data version migrations (whether schema updates or pure data)?
Posted Dec 16, 2021 19:14 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link]
It's all fixable of course, just kinda clumsy with multiple schemas.
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Wol
Haas: Surviving Without A Superuser - Part One
* Our adversaries will try to get us to hire sleeper agents. They may already have succeeded at this.
* Our adversaries might serve a secret warrant/NSL on one of our employees, demanding their cooperation with some purported investigation, without our knowledge.
* Our adversaries could potentially know almost all security-relevant properties of our systems, either through regulation or espionage.
* Our adversaries can pass laws, which (within their jurisdiction) we have to obey. Such laws are subject to geopolitical considerations, which is why this is not an instant win condition for our adversaries.
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
Haas: Surviving Without A Superuser - Part One
