pgAdmin4 needs information of v10 SCRAM authentication

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: pgAdmin4 needs information of v10 SCRAM authentication
Date: 2017-04-21 06:27:49
Message-ID: CANxoLDfiukemGoJ69ti38-N4BKouxqzEnj26j6zMWaWWNPG7fQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgsql-general

Hi All

We are into development phase where we are trying to incorporate the v10
changes into pgAdmin4. v10 added support for the SCRAM authentication into
database server, so pgAdmin4 needs to incorporate that feature(for 'Change
Password'). Now problem I am facing is, unable to find correct set of
python api's which I can use to perform SCRAM encryption/decryption through
pgAdmin4 (Most of you already know that pgAdmin4 is re-written in Python
and Web technologies).

I have googled for how to encrypt password for scram and found https://
passlib.readthedocs.io/en/1.6.2/lib/passlib.hash.scram.html?highlight=scram#
passlib.hash.scram . I have tried below logic to encrypt the password:

- from passlib.hash import scram
- hash = scram.encrypt(data['newPassword']) -- This function
provide password for all the supported digest like [md5, sha-1,
sha-256, sha-512]. Didn't work I have tried with all the passwords.
- test = scram.extract_digest_info(hash, "sha-256") -- This
function extract info for specified digest "sha-256". I have retrieve
the password which was in hexadecimal. Didn't work as well.

Now I am stuck here and no clue how to encrypt/decrypt the password
for SCRAM authentication. Can someone guide me out here.

--
*Akshay Joshi*
*Principal Software Engineer *

*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-04-21 06:37:50 Re: [GENERAL] pgAdmin4 needs information of v10 SCRAM authentication
Previous Message Murtuza Zabuawala 2017-04-21 05:35:58 Re: [pgAdmin4][PATCH] To fix the issue with displaying bigint[] values in query tool

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2017-04-21 06:37:50 Re: [GENERAL] pgAdmin4 needs information of v10 SCRAM authentication
Previous Message David G. Johnston 2017-04-21 00:04:32 Re: why isn't this subquery wrong?