-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Password management #21
Comments
For just the SU password, I'm ok with ignoring this until it becomes a problem. People can poke around and f'up their clusters, that's totally fine and I bet it's pretty rare. We should definitely give everyone admin permissions! Reduced permissions don't make a lot of sense (they can SSH to their Postgres and do what they want already) More generally, though, giving people easy ways to manage DB users, create read only users, is useful. This gets complicated because of linked apps. It would be nice to be able to rotate DB permissions for linked apps, but we'd need to add a new user, update the linked app secret, let it deploy, then remove the old user to make it work. |
Yeah... I think the general procedure seems straight forward, however, monitoring the entire process and knowing when it's actually safe to yank the original credentials seems a bit harder. |
If that user account can create roles etc, what's the difference to being
I for one create roles and update their passwords as part of my schema migration mechanism. You can't take away that power, or your PG app becomes less useful. Perhaps a thing to consider instead is, what's the route to recovery if and when someone does change one of the passwords used by fly infrastructure. Can the user obtain the "supposed value" and set it back to that (are the secrets visible anywhere)? If you don't want to make them visible, you could detect a "bad password" error from Postgres and guide the user to an Now, should |
This issue is quite old and hasn't really been thought about since. :D. Some password rotation tooling could still be useful, but it's certainly not high on our priority list.
In short,
We have no intention of forcing a particular process for app specific credentials. There are three different credentials outlined in the README that need to be handled in a specific manor, but you're free to manage other roles/passwords however you see fit. We provide PG utility commands in an effort to make life easier, but users are by no means bound to the tooling we provide.
The credentials outlined within the README can be viewed within the PG environment and are pretty easy to correct. The
We started out having a non-superuser as the default, but it ended up causing too much friction for some users based on their use-case. Users just want things to work and typically don't want to spend too much time fiddling with permissions. |
We need to provide some basic tooling surrounding password management. We have a decent process in place for seeding the initial credentials, but the process for managing these credentials long-term is still a little hairy.
I think one simple thing we could do is provide an
fly postgres changepassword <user> <password>
command that streamlines the change password process for users and ensures it's performed in a safe manor.One big question is whether or not it makes sense to provide everyone
superuser
privileges, by default?When a new PG cluster is created, users are required to specify their credentials via secrets. Once the provision has completed, users are supplied with a
postgres
user with superuser privileges. The problem is that once users connect, they have the ability to delete users and change passwords via theALTER USER
command. If this is used to change theflypgadmin
,repluser
or thepostgres
user credentials, it will create a disconnect between the supplied secrets and the actual credentials used by PG. This could inadvertently bring down their cluster.We have quite a few different routes we could potentially take here:
superuser
privileges and accept the possibility that people inadvertently break their cluster.superuser
if required for their use-case.superusers
are reserved for internal administration.I would love peoples thoughts on this.
The text was updated successfully, but these errors were encountered: