Use one connection only / pgAdmin and AWS RDS with IAM authentication

Поиск
Список
Период
Сортировка
От Harry Lond
Тема Use one connection only / pgAdmin and AWS RDS with IAM authentication
Дата
Msg-id EkrHPcVoA7rcJuoTEhhA4iFXd8o0i98qG9nuExnDVVWJhbK9v8t1x40umREqxGspKfp27Q-LR-8O11Hg_9bLvma0xjOojZXEoPAXqy7-1pY=@proton.me
обсуждение исходный текст
Ответы Re: Use one connection only / pgAdmin and AWS RDS with IAM authentication  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-support
Hi,

I start with the actual question: is there a way to configure pgAdmin not to open a new connection for each query? So to re-use the already opened connection that is used for the dashboard and use this one connection only? Maybe with a config parameter?

Background: we are using pgAdmin in server mode in order to connect to AWS RDS clusters with IAM authentication enabled.

In this scenario, the auth token created by 'aws rds generate-db-auth-token' is valid for 15 minutes only (no possibility to extend this).

Setup works fine for the first 15 minutes. Connection can be established, dashboard works and queries can be executed.

But while the dashboard and all query tool windows that have been opened prior to the token expiration remain useable, all new user interaction fails once the token expires.
 
Opening a new query tool window asks for the password. Querying the first 100 rows of a table (when using 'view/edit data -> first 100 rows') fails without asking for a new password (shows PAM authentication failed for user ...). No way to recover from that, then reloading the whole pgAdmin page and re-connect to the database.

We figured out that this is because of the underlying pgAdmin connection handling. All new interaction tries to open new connections, which is not possible because of the expired token.

One might say this works like designed because the token/password is no longer valid. However, from an end user perspective pgAdmin is not really useable with AWS clusters that have IAM authentication enabled right now.

That's why we had the idea to re-use the original connection that is used by the dashboard. Or is there maybe another solution for this?

Best,
Harry

В списке pgadmin-support по дате отправления:

Предыдущее
От: Marcello Z Fabila
Дата:
Сообщение: RE: pgAdmin4 Installation Issues
Следующее
От: Dave Page
Дата:
Сообщение: Re: Use one connection only / pgAdmin and AWS RDS with IAM authentication