Skip to content
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

auth query cache issue #541

Open
evkuzin opened this issue Nov 13, 2023 · 3 comments
Open

auth query cache issue #541

evkuzin opened this issue Nov 13, 2023 · 3 comments

Comments

@evkuzin
Copy link

evkuzin commented Nov 13, 2023

Authorisation is failing if multiple users are trying to connect with auth_query.

for u in canary_{ro,rw,adm}
do 
    for host in 127.0.0.1 $(hostname)
    do
        psql -p 5432 -U $u -h $host postgres -c "select user"
    done
done

   user
-----------
 canary_ro
(1 row)

   user
-----------
 canary_ro
(1 row)

psql: error: connection to server at "127.0.0.1", port 5432 failed: ERROR:  odyssey: cf668a34aaafa: incorrect password
password retrieved from file "/var/lib/postgresql/.pgpass"
connection to server at "127.0.0.1", port 5432 failed: ERROR:  odyssey: c45eb813ef0ce: incorrect password
password retrieved from file "/var/lib/postgresql/.pgpass"
psql: error: connection to server at "shapgsyscanary15bull01" (10.20.84.143), port 5432 failed: ERROR:  odyssey: c7e575b2472f5: incorrect password
password retrieved from file "/var/lib/postgresql/.pgpass"
connection to server at "shapgsyscanary15bull01" (10.20.84.143), port 5432 failed: ERROR:  odyssey: cd633cf53c437: incorrect password
password retrieved from file "/var/lib/postgresql/.pgpass"
psql: error: connection to server at "127.0.0.1", port 5432 failed: ERROR:  odyssey: c70f05a370682: incorrect password
password retrieved from file "/var/lib/postgresql/.pgpass"
connection to server at "127.0.0.1", port 5432 failed: ERROR:  odyssey: ca9012054a92b: incorrect password
password retrieved from file "/var/lib/postgresql/.pgpass"
psql: error: connection to server at "shapgsyscanary15bull01" (10.20.84.143), port 5432 failed: ERROR:  odyssey: ceda1f10e736b: incorrect password
password retrieved from file "/var/lib/postgresql/.pgpass"
connection to server at "shapgsyscanary15bull01" (10.20.84.143), port 5432 failed: ERROR:  odyssey: cb08ac144a237: incorrect password
password retrieved from file "/var/lib/postgresql/.pgpass"

if set a delay between logins it works:

for u in canary_{ro,rw,adm}
do
    for host in 127.0.0.1 $(hostname)
    do 
        psql -p 5432 -U $u -h $host postgres -c "select user"
    done
    sleep 10 
done


   user
-----------
 canary_ro
(1 row)

   user
-----------
 canary_ro
(1 row)

   user
-----------
 canary_rw
(1 row)

   user
-----------
 canary_rw
(1 row)

    user
------------
 canary_adm
(1 row)

    user
------------
 canary_adm
(1 row)
@evkuzin
Copy link
Author

evkuzin commented Nov 13, 2023

@reshke 🙏

@x4m
Copy link
Collaborator

x4m commented Nov 19, 2023

Looks like a bug, thanks for the reproduction! I'll check this out soon

@reshke reshke mentioned this issue Nov 22, 2023
@x4m
Copy link
Collaborator

x4m commented Nov 23, 2023

@evkuzin we think that the problem is fixed. Please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants