Subprocess generated password

2022-10-10 Thread Elias Bergquist
Hi,

I have been hacking on a feature that instead of using a static password when 
connecting to the psql server executes a subprocess which prints a temporary 
auth token to stdout.

This is to make the workflow more bearable when using AWS RDS with iam 
authentication.

aws-iam auth tokens are generated with the ASW cli, used as sql password, and 
expires after 15 minutes. That means that any reconnects after that time will 
fail – and not in a way that spawns any password dialog (“FATAL: PAM 
authentication failed”).

I’m thinking of the feature like an addition to “passfile”, lets call it 
“passexec”.

2 new (advanced?) server settings:
* passexec cmd line
* passexec expiry minutes

If last passexec is older than expiry, a new invocation result is used – 
basically an expiring cache.

I think this would benefit the pgadmin community – would you be interested in a 
PR?

/Elias


Re: Subprocess generated password

2022-10-10 Thread Khushboo Vashi
Hi,

On Mon, Oct 10, 2022 at 1:38 PM Elias Bergquist  wrote:

> Hi,
>
>
>
> I have been hacking on a feature that instead of using a static password
> when connecting to the psql server executes a subprocess which prints a
> temporary auth token to stdout.
>
>
>
> This is to make the workflow more bearable when using AWS RDS with iam
> authentication.
>
>
>
> aws-iam auth tokens are generated with the ASW cli, used as sql password,
> and expires after 15 minutes. That means that any reconnects after that
> time will fail – and not in a way that spawns any password dialog (“FATAL:
> PAM authentication failed”).
>
>
>
> I’m thinking of the feature like an addition to “passfile”, lets call it
> “passexec”.
>
>
>
> 2 new (advanced?) server settings:
>
> * passexec cmd line
>
> * passexec expiry minutes
>
>
>
To support this, AWS cli should be installed on the pgAdmin server. So, in
the desktop mode, if the user has installed it, it will work. For the web
mode, (server mode), what is your proposal ?

> If last passexec is older than expiry, a new invocation result is used –
> basically an expiring cache.
>
>
>
> I think this would benefit the pgadmin community – would you be interested
> in a PR?
>
>
>
> /Elias
>


Re: Subprocess generated password

2022-10-10 Thread Aditya Toshniwal
And this looks similar to -
https://github.com/pgadmin-org/pgadmin4/issues/3491

On Tue, Oct 11, 2022 at 10:27 AM Khushboo Vashi <
[email protected]> wrote:

> Hi,
>
> On Mon, Oct 10, 2022 at 1:38 PM Elias Bergquist 
> wrote:
>
>> Hi,
>>
>>
>>
>> I have been hacking on a feature that instead of using a static password
>> when connecting to the psql server executes a subprocess which prints a
>> temporary auth token to stdout.
>>
>>
>>
>> This is to make the workflow more bearable when using AWS RDS with iam
>> authentication.
>>
>>
>>
>> aws-iam auth tokens are generated with the ASW cli, used as sql password,
>> and expires after 15 minutes. That means that any reconnects after that
>> time will fail – and not in a way that spawns any password dialog (“FATAL:
>> PAM authentication failed”).
>>
>>
>>
>> I’m thinking of the feature like an addition to “passfile”, lets call it
>> “passexec”.
>>
>>
>>
>> 2 new (advanced?) server settings:
>>
>> * passexec cmd line
>>
>> * passexec expiry minutes
>>
>>
>>
> To support this, AWS cli should be installed on the pgAdmin server. So, in
> the desktop mode, if the user has installed it, it will work. For the web
> mode, (server mode), what is your proposal ?
>
>> If last passexec is older than expiry, a new invocation result is used –
>> basically an expiring cache.
>>
>>
>>
>> I think this would benefit the pgadmin community – would you be
>> interested in a PR?
>>
>>
>>
>> /Elias
>>
>

-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*

"Don't Complain about Heat, Plant a TREE"


[pgadmin-org/pgadmin4] b100df: Fixed an issue where the password recovery link wa...

2022-10-10 Thread Pravesh Sharma
  Branch: refs/heads/master
  Home:   https://github.com/pgadmin-org/pgadmin4
  Commit: b100df3160f82e5422c86fb08b8271b08c4eb7b9
  
https://github.com/pgadmin-org/pgadmin4/commit/b100df3160f82e5422c86fb08b8271b08c4eb7b9
  Author: Pravesh Sharma 
  Date:   2022-10-11 (Tue, 11 Oct 2022)

  Changed paths:
M web/pgadmin/browser/__init__.py

  Log Message:
  ---
  Fixed an issue where the password recovery link was not working. #5397






[pgadmin-org/pgadmin4] 19f967: Ensure that the scroll position should be preserve...

2022-10-10 Thread Nikhil Mohite
  Branch: refs/heads/master
  Home:   https://github.com/pgadmin-org/pgadmin4
  Commit: 19f96799df3f012cd59ca5e8254429777de87e1e
  
https://github.com/pgadmin-org/pgadmin4/commit/19f96799df3f012cd59ca5e8254429777de87e1e
  Author: Nikhil Mohite 
  Date:   2022-10-11 (Tue, 11 Oct 2022)

  Changed paths:
M web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx
M web/pgadmin/tools/sqleditor/static/js/components/QueryToolConstants.js
M web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx

  Log Message:
  ---
  Ensure that the scroll position should be preserved for the result set in the 
query tool on tab change. #5296






[pgadmin-org/pgadmin4] 5b0912: Update release notes.

2022-10-10 Thread Akshay Joshi
  Branch: refs/heads/master
  Home:   https://github.com/pgadmin-org/pgadmin4
  Commit: 5b0912267660d718ed32e04e7a893ea33f45ff96
  
https://github.com/pgadmin-org/pgadmin4/commit/5b0912267660d718ed32e04e7a893ea33f45ff96
  Author: Akshay Joshi 
  Date:   2022-10-11 (Tue, 11 Oct 2022)

  Changed paths:
M docs/en_US/release_notes_6_15.rst

  Log Message:
  ---
  Update release notes.