Password management

Open
#21 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
go, postgres

Research direction

Start by reviewing the existing process for seeding initial credentials and the current PostgreSQL CLI entry points. Resolve which privilege model is intended, then define the scope of the password-management command and document what credentials and roles it must protect; completion depends on agreement because the issue leaves several approaches open.

Written by the indexing model from the issue text.

Description

Discussion

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 the ALTER USER command. If this is used to change the flypgadmin, repluser or the postgres 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:

  1. We provide superuser privileges and accept the possibility that people inadvertently break their cluster.
  2. We provide a normal user by default, which has privileges to create databases, roles, login, etc. and document how to access the superuser if required for their use-case.
  3. We restrict PG clusters to normal users and superusers are reserved for internal administration.
  4. ?

I would love peoples thoughts on this.

Dominant language
Go
Stars
332
Forks
123
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fly-apps/postgres-ha

All issues in fly-apps/postgres-ha

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.