Req #80344 [Opn->Ana]: mysqlnd support for SASL SCRAM-SHA-1 and SCRAM-SHA-256 authentication

From: Date: Mon, 09 Nov 2020 15:39:35 +0000
Subject: Req #80344 [Opn->Ana]: mysqlnd support for SASL SCRAM-SHA-1 and SCRAM-SHA-256 authentication
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230235@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80344&edit=1 ID: 80344 Updated by: fjanisze@php.net Reported by: fjanisze@php.net Summary: mysqlnd support for SASL SCRAM-SHA-1 and SCRAM-SHA-256 authentication -Status: Open +Status: Analyzed Type: Feature/Change Request Package: MySQL related Operating System: any PHP Version: 7.4.12 -Assigned To: +Assigned To: fjanisze Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-11-09 15:39:02] fjanisze@php.net Description: ------------ The authentication methods SCRAM-SHA-1 and SCRAM-SHA-256 have to be supported, this issue is about adding support for them in mysqlnd. Test script: --------------- <?php $link = mysqli_connect("127.0.0.1", "user", "pass"); // Check connection if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } // Print host information echo "Connect Successfully. Host info: " . mysqli_get_host_info($link) . PHP_EOL; if ($result = $link->query("SHOW DATABASES")) { echo "Returned rows are: " . $result->num_rows . PHP_EOL; // Free the result set $result->free_result(); } ?> Expected result: ---------------- Given the script and assuming that 127.0.0.1 runs a mysql server configured with LDAP SASL and auth method SCRAM-SHA-1 or SCRAM-SHA-256 for the user "user", the script succeeds and the query works. Actual result: -------------- The connection will fail since mysqlnd is not able to authenticate, at the moment LDAP SASL is not supported in the client but the server does support those methods. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80344&edit=1

« previous php.bugs (#230235) next »