Re: [GENERAL] pgAdmin4 needs information of v10 SCRAM authentication

Поиск
Список
Период
Сортировка
От Akshay Joshi
Тема Re: [GENERAL] pgAdmin4 needs information of v10 SCRAM authentication
Дата
Msg-id CANxoLDcWkwwz30hs2vXAJTxzoa-i_mmJfr5s5=4WwE_Uu0rt0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] pgAdmin4 needs information of v10 SCRAM authentication  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [GENERAL] pgAdmin4 needs information of v10 SCRAM authentication  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general
Hi Michael

On Fri, Apr 21, 2017 at 12:07 PM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Fri, Apr 21, 2017 at 3:27 PM, Akshay Joshi
<akshay.joshi@enterprisedb.com> wrote:
> 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.

Here you go:
https://www.postgresql.org/message-id/76ac7e67-4e3a-f4df-e087-fbac90151907@iki.fi

   I have gone through this, but still facing issue to encrypt/change the database server password. In pgAdmin4 we have "Change Password" feature where user will enter the old and new password for the database server, now we will have to encrypt it (in Python) as per SCRAM standards and set it to the database.

  The example you have given in https://www.postgresql.org/message-id/76ac7e67-4e3a-f4df-e087-fbac90151907@iki.fi I have below questions:
  • To encode the password you already have entry from pg_authid table which won't be possible for non superuser to access that table. How we can get that value from pg_authid table or do we have any other solution to this.
  • For constructing  the whole client-final-message, we need to calculate  ClientSignature and ClientProof, which depend on the nonces, and is  therefore different on every authentication exchange. How to calculate ClientSignature and ClientProof?
  Can you please guide me here, how can we achieve that in python. 

--
Michael



--
Akshay Joshi
Principal Software Engineer 


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

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] Strange Issue between PSQL 9.3 and Label Zebra Printer?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [GENERAL] pgAdmin4 needs information of v10 SCRAM authentication