Commit Graph

9 Commits

Author SHA1 Message Date
fad37adfbf Added comments for gw_mysql_do_authentication 2013-06-14 18:39:42 +02:00
aa006a9406 gw_mysql_do_authentication puts user, db, and client_sha1 in the (MYSQL_session *) session->data of client DCB.
gw_mysql_connect can now access this session->data for transparent authentication
2013-06-14 18:27:43 +02:00
a5e1441cb8 Some fprintf removed.
Fixed an if statement without brackets
2013-06-13 18:38:03 +02:00
269bef8280 Authentication FAILED triggers client and backend connection close.
mysqlslap tests show some memory is nod deallocated, probably some gwbuffer incorrect use or the error handling is not triggering any consume action on buffers.
2013-06-13 18:09:14 +02:00
a89c2bc1c0 Added gw_mysql_do_authentication() for checking authentication.
I uses the mysql protocol 4.1 authentication method.

The actual implementation requires the password is excatly equal to the username.

The client sends user: "user" and the password must be "user"

The gateway converts "user" in SHA1(SHA1("user") and then using the algorithm check all the data.

if the clients sends anything else than "user" the password algorithm check will fail.

IN the next release we must load into memory the content of mysql.user table, with fields user and password in memory.

The gateway will then find the HEX(SHA1(SHA1(real_password))) fro tahta table and check the incoming data.

Please note that real_password is not stored in any place: not in mysql db nor in the gateway.
2013-06-13 14:34:37 +02:00
732ff1732f Added username detection ofr authentication 2013-06-13 10:32:42 +02:00
e31957f2d1 Initial work on local authentication 2013-06-13 10:12:50 +02:00
a9bcc3841a Converted mysql_send_ok and MySQLSendHandshake to use the new buffer management
Also added the -p option to set listener port. This is a short term measure for testing only
until we have the proper configuration in place.
2013-06-12 17:13:04 +01:00
e820e36aa3 Updated structure and added makefile 2013-06-11 14:58:21 +01:00