-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
Added support for preparing the encrypted password (PQencryptPasswordConn) #576
Conversation
password using the libpq functions - 'PQencryptPasswordConn', and 'PQencryptPassword'.
Python string to make it Python 3 compatible.
…edError' (not, psycopg2.ProgrammingError).
server version >= 10, when compiled using libpq version < 10, when no algorithm is specified.
Hi, thank you for this MR, I'll take a look at it. |
Just a gentle reminder! |
@asheshv the fact this MR is required for pgAdmin 4 support of PG 10 is something I'm learning just now: wouldn't be the case of being more explicit about your goals? I know pgAdmin now depends on psycopg: I'm very honoured about this and I'm happy to support the project responsibly, but I have to know things, in order to act. I didn't consider merging this in a bugfix release. If you say it has some importance we can discuss about that. But please speak. The ML is the most appropriate place to discuss about new features and the timeline to push them. |
@dvarrazzo - Totally agree with you. Thanks for your quick reply, and support. |
psycopgmodule, and exported it from psycopg2.extensions as per review comments.
@dvarrazzo - Would you please review, and commit it? |
There are several point of my previous review that have not been addressed, but appear outdated because you moved the code into a different file. |
As per the feedback:
Hence - I've moved the code such that we can export it through the 'psycopg2.extensions'. You also said:
Would you please point that out? -- Thanks, Ashesh |
I've added a punctual review, no? |
Did you mean?
To be honest, I am not right person to answer that. |
@dvarrazzo Do you have any thoughts on when this might be merged and 2.8 released? PostgreSQL 10 has been out for ~6 months now and we're still unable to support SCRAM. Thanks! |
Fixed several shortcomings highlighted in psycopg#576 and not fixed as requested. Also fixed broken behaviour of ignoring the algorithm if the connection is missing.
Added tests to check bad types, which discovered the above problem: on type error we would have decref'd on exit something that was only borrowed (because we wouldn't have performed matching increfs).
Sorry if it took longer than expected to merge, but the code had several shortcomings highlighted in the merge request that hadn't been addressed. I'll look what I'll be realistically able to merge for 2.8 and try to release it in a not too distant future. |
Adding support for preparing the encrypted password using the libpq functions - 'PQencryptPasswordConn', and 'PQencryptPassword'.
This will allow the psycopg2 application to prepare the encrypted form of Password based on the current password encryption algorithm.