News for hackers. Stuff that matters.
Re:Scalable PostgreSQL Connection Pooler by 3np on Friday November 12, 2021 @10:35PM (#29207154)
Some questions on auth. We have one cluster with a large number of databases, all with automatically provisioned and rotating credentials for service roles using postgres password auth. Currently, clients connect directly to the db cluster (there's a tcp lb but no pgbouncer etc)

In this case, I'd like for services to continue authenticating as previously without changing authentication method, just switching address.

Should I use password_passthrough/auth_query? Does odyssey need pg credentials itself? Is storage_db referring to the db where odyssey stores internal data for itself...?

I guess I don't get why a connection pooler would need to handle auth, much like an HTTPS proxy doesn't need API tokens itself.

Re:Scalable PostgreSQL Connection Pooler by x4m on Saturday November 13, 2021 @12:26AM (#29207653)
Currently in Odyssey password_passthrough works only for cleartext auth, PAM and LDAP. Probably, we could make this for MD5 work too. And it's the whole purpose of SCRAM to defeat this feature :)

The other way to do so is auth_query - you provide a storage password to access auth data of the DB. This works for MD5 auth. When user wants to authenticate we just check credentials against what we see in the database.

Re:Scalable PostgreSQL Connection Pooler by 3np on Sunday November 14, 2021 @04:23AM (#29216217)
Thanks for the pointers! I did play around a bit but it seems to segfault and I'm not sure how to proceed.

https://github.com/yandex/odyssey/issues/361

Re:Scalable PostgreSQL Connection Pooler by x4m on Monday November 15, 2021 @06:49AM (#29226327)
It seems like there's issue when you have a user for accessing authentication table you login with the same user. It fails when due to mixing same pool for auth and for work. I'll look into differentiating these pools more closely. As a simple workaround you can setup different user for accessing password and not login into Odyssey with this user.
Re:Scalable PostgreSQL Connection Pooler by 3np on Monday November 15, 2021 @12:12PM (#29229701)
Thanks for following up. auth_query_user is not the same as the user I'm attempting to authenticate with, though. And I get the same behavior with other users, including non-existing ones.

Or are you referring to something else?