Replies: 3 comments
|
Supabase documents this exact custom-role/password-rotation case: a The useful discriminator is a direct connection with the same custom role and new password, bypassing
Those steps come from Supabase's password-rotation guide. I would not treat |
|
A couple of concrete checks, in the order I'd run them: 1. Check the username you're sending to the pooler. With Supavisor the username isn't just the role name, it's 2. Use the direct connection as the discriminator (same password, bare role name,
3. On the refresh step: there's no manual "purge the pooler cache" option on Free. After a rotation, the practical refresh is to drop existing connections and open a completely fresh one (restart the client/pool) — a new connection forces a fresh credential lookup instead of reusing what the pooler already has. If a brand-new connection with the right username format still fails while direct works, that's the evidence worth adding to your support case, ideally with timestamps of the attempts. 4. ONE_OFF_AUTH_QUERY: on its own it doesn't narrow it down much. It tells you the attempt went through an auth lookup and failed at the credential check, which PASSWORD_AUTHENTICATION_FAILED already says. It doesn't distinguish "wrong parameter" from "stale cache" — the direct-connection test in step 2 is what actually separates those. And no, none of this needs broader memberships: a least-privilege LOGIN role is fully supported by the pooler, and the role's grants don't affect whether authentication itself succeeds. |
|
Adding to @fathiranugrahh's reply, since you asked how to tell a credential problem from a pooler-cache problem. The error text already tells you, and the pooler's behaviour after a rotation is specific enough to test for. This is from reading Supavisor's current 1. 28P01 vs EAUTHSECRETS is the discriminator
With 28P01 the role is visible to the pooler and stored as SCRAM; the only question is which secret it compared against. 2. What the pooler does after you change the password (client_authentication.ex)
There is no user-facing refresh step; this is the whole mechanism. 3. I could not find that string in the public code. The nearest thing is the log line 4. Sequence that separates the two
|
Uh oh!
There was an error while loading. Please reload this page.
Hi, I'm trying to connect a server-side Node.js app to a Supabase Free test project through the shared session pooler, using a restricted custom PostgreSQL LOGIN role.
The connection is rejected with 28P01 / password authentication failed, even after resetting the role's password. In the latest test, login was enabled for the test window, and the corresponding server-side diagnostics were classified as ONE_OFF_AUTH_QUERY and PASSWORD_AUTHENTICATION_FAILED. The test only attempted authentication, with no application queries or persistent writes.
I haven't confirmed that the same credentials work through a direct database connection, so I'm not assuming this is a pooler bug. I've also submitted a private support request and am waiting for a response.
I found a similar report in #51929. What's the recommended way to tell whether this is a role/credential or connection-parameter issue, versus an upstream auth-query or cached-credential issue in the shared pooler? Does ONE_OFF_AUTH_QUERY help narrow that down?
I'd like to keep the role least-privileged rather than grant it broader memberships just to get the connection working. If there's a supported check or refresh step after rotating a custom role's password, I'd appreciate a pointer. I can share sanitized client settings if useful, but have left project identifiers and credentials out of this post. Thanks!
All reactions