porsager / porsager/postgres

Feature request: dynamic username support for credential rotation

Open
#881 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
8.7k
Forks
374
Avg merge
11d 16h
Merged PRs (30d)
1

Description

Greetings!

I have noticed that the password option can be set to a function, allowing for a seamless way to reconnect when credentials are rotated. In my current workflow, we also rotate usernames. For example, we use user_1 and user_2, but only one of them is allowed to log in at a given time (let's say it's user_1).

When we need to rotate credentials, we generate a random password for user_2 and enable it for login. We then update the secrets with username = user_2 and the new password, notifying applications of the credential change. After a brief grace period, user_1 is disabled until the next rotation.

My issue is that while the password can be dynamically set, the username cannot. Is there a workaround for this, or could support for a dynamic username option be implemented? This feature would greatly enhance the flexibility and security of our credential management process.

Thank you for considering this request.

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.

Research direction

Start by locating the existing handling for the password option and how reconnects obtain credentials. Determine how a dynamic username should be evaluated during credential rotation, then verify that reconnects use the updated username and password without breaking static username behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, postgresql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.