| 1 |
create function ed25519_password returns string soname "auth_ed25519.so"; |
| 2 |
select ed25519_password(); |
| 3 |
ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password() |
| 4 |
select ed25519_password(1); |
| 5 |
ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password() |
| 6 |
select ed25519_password("foo", "bar"); |
| 7 |
ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password() |
| 8 |
select ed25519_password("foo"); |
| 9 |
ERROR HY000: Can't initialize function 'ed25519_password'; Authentication plugin ed25519 is not loaded |
| 10 |
install soname 'auth_ed25519'; |
| 11 |
select ed25519_password("foo"); |
| 12 |
ed25519_password("foo") |
| 13 |
vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI |
| 14 |
select ed25519_password("foobar"); |
| 15 |
ed25519_password("foobar") |
| 16 |
qv2mG6HWCuy32Slb5xhV4THStewNz2VINVPbgk+XAJ8 |
| 17 |
select ed25519_password("foo bar"); |
| 18 |
ed25519_password("foo bar") |
| 19 |
Y5fV74JAVRMOK2cdnUsYS+WW9sXaaL/o+6WGKOgqnzc |
| 20 |
select ed25519_password(NULL); |
| 21 |
ed25519_password(NULL) |
| 22 |
NULL |
| 23 |
select * from information_schema.plugins where plugin_name='ed25519'; |
| 24 |
PLUGIN_NAME ed25519 |
| 25 |
PLUGIN_VERSION 1.1 |
| 26 |
PLUGIN_STATUS ACTIVE |
| 27 |
PLUGIN_TYPE AUTHENTICATION |
| 28 |
PLUGIN_TYPE_VERSION 2.3 |
| 29 |
PLUGIN_LIBRARY auth_ed25519.so |
| 30 |
PLUGIN_LIBRARY_VERSION 1.15 |
| 31 |
PLUGIN_AUTHOR Sergei Golubchik |
| 32 |
PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication |
| 33 |
PLUGIN_LICENSE GPL |
| 34 |
LOAD_OPTION ON |
| 35 |
PLUGIN_MATURITY Stable |
| 36 |
PLUGIN_AUTH_VERSION 1.1 |
| 37 |
create user test1@localhost identified via ed25519 using 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'; |
| 38 |
show grants for test1@localhost; |
| 39 |
Grants for test1@localhost |
| 40 |
GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY' |
| 41 |
drop user test1@localhost; |
| 42 |
create user test1@localhost identified via ed25519 using 'foo'; |
| 43 |
ERROR HY000: Password hash should be 43 characters long |
| 44 |
create user test1@localhost identified via ed25519 using '>>>1234567890123456789012345678901234567890'; |
| 45 |
ERROR HY000: Password hash should be base64 encoded |
| 46 |
create user test1@localhost identified via ed25519 using password('foo'); |
| 47 |
show grants for test1@localhost; |
| 48 |
Grants for test1@localhost |
| 49 |
GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI' |
| 50 |
select ed25519_password('foo'); |
| 51 |
ed25519_password('foo') |
| 52 |
vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI |
| 53 |
set password for test1@localhost = password('bar'); |
| 54 |
show create user test1@localhost; |
| 55 |
CREATE USER for test1@localhost |
| 56 |
CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10' |
| 57 |
select ed25519_password('bar'); |
| 58 |
ed25519_password('bar') |
| 59 |
pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10 |
| 60 |
set password for test1@localhost = 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'; |
| 61 |
show create user test1@localhost; |
| 62 |
CREATE USER for test1@localhost |
| 63 |
CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY' |
| 64 |
connect(localhost,test1,public,test,PORT,SOCKET); |
| 65 |
connect con1, localhost, test1, public; |
| 66 |
ERROR 28000: Access denied for user 'test1'@'localhost' (using password: YES) |
| 67 |
connect con1, localhost, test1, secret; |
| 68 |
select current_user(); |
| 69 |
current_user() |
| 70 |
test1@localhost |
| 71 |
disconnect con1; |
| 72 |
connection default; |
| 73 |
# Executing 'mariadb-admin' |
| 74 |
mysqld is alive |
| 75 |
create user test2@localhost identified via ed25519 using PASSWORD(''); |
| 76 |
show grants for test2@localhost; |
| 77 |
Grants for test2@localhost |
| 78 |
GRANT USAGE ON *.* TO `test2`@`localhost` IDENTIFIED VIA ed25519 USING '4LH+dBF+G5W2CKTyId8xR3SyDqZoQjUNUVNxx8aWbG4' |
| 79 |
connect con2, localhost, test2,; |
| 80 |
select current_user(); |
| 81 |
current_user() |
| 82 |
test2@localhost |
| 83 |
disconnect con2; |
| 84 |
connect(localhost,test2,wrong_pwd,test,MASTER_MYPORT,MASTER_MYSOCK); |
| 85 |
connect con3, localhost, test2, "wrong_pwd"; |
| 86 |
ERROR 28000: Access denied for user 'test2'@'localhost' (using password: YES) |
| 87 |
connection default; |
| 88 |
drop user test2@localhost; |
| 89 |
drop user test1@localhost; |
| 90 |
uninstall plugin ed25519; |
| 91 |
select ed25519_password("foo"); |
| 92 |
ERROR HY000: Can't initialize function 'ed25519_password'; Authentication plugin ed25519 is not loaded |
| 93 |
drop function ed25519_password; |