Commit 4231cf6d authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-32617 deprecate secure_auth=0

parent c2a5d935
set global secure_auth=0;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
create user test_nopw;
grant select on test.* to test_nopw;
create user test_oldpw identified by password "09301740536db389";
......@@ -90,6 +92,8 @@ NULL
FLUSH STATUS;
Value of com_select did not change
set global secure_auth=default;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
set timestamp=unix_timestamp('2010-10-10 10:10:10');
select now();
now()
......
SET global secure_auth=0;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
connect con1,localhost,root,,mysql;
show tables;
Tables_in_mysql
......@@ -412,6 +414,8 @@ test
test
drop procedure p1;
SET global secure_auth=default;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
#
# MDEV-19282: Log more specific warning with log_warnings=2 if
# connection is aborted prior to authentication
......
set global secure_auth=0;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
create user natauth@localhost identified via 'mysql_native_password' using '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
create user invalidauth@localhost identified via 'mysql_native_password' using 'invalid';
create user newpass@localhost identified by password '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
......@@ -186,6 +188,8 @@ drop user natauth@localhost, newpass@localhost, newpassnat@localhost;
drop user invalidauth@localhost, invalidpass@localhost, invalidpassnat@localhost,invalidmysql57auth@localhost;
drop user oldauth@localhost, oldpass@localhost, oldpassold@localhost;
set global secure_auth=default;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
# switching from mysql.global_priv to mysql.user
create user foo@localhost identified with mysql_native_password;
update mysql.user set authentication_string=password('foo'), plugin='mysql_native_password' where user='foo' and host='localhost';
......
......@@ -9,6 +9,8 @@ SET GLOBAL old_passwords = TRUE;
SET SESSION old_passwords = TRUE;
CREATE USER 'userOldPass'@'localhost' IDENTIFIED BY 'pass3';
SET GLOBAL secure_auth = FALSE;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
connect con1,localhost,userNewPass1,pass1,;
SELECT CURRENT_USER();
CURRENT_USER()
......@@ -30,6 +32,8 @@ disconnect con2;
disconnect con3;
'#------------------------FN_DYNVARS_115_02---------------------------#'
SET GLOBAL secure_auth = TRUE;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
connect con1,localhost,userNewPass1,pass1,;
SELECT CURRENT_USER();
CURRENT_USER()
......@@ -55,3 +59,5 @@ DROP USER 'userOldPass'@'localhost';
SET @@GLOBAL.old_passwords = @global_old_passwords;
SET @@SESSION.old_passwords = @session_old_passwords;
SET @@GLOBAL.secure_auth = @global_secure_auth;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
......@@ -4,7 +4,11 @@ SELECT @global_start_value;
1
'#--------------------FN_DYNVARS_143_01------------------------#'
SET @@global.secure_auth = 1;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SET @@global.secure_auth = DEFAULT;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
1
......@@ -17,15 +21,21 @@ SELECT @@secure_auth;
SELECT global.secure_auth;
ERROR 42S02: Unknown table 'global' in field list
SET global secure_auth = 1;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
1
'#--------------------FN_DYNVARS_143_03------------------------#'
SET @@global.secure_auth = 0;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
0
SET @@global.secure_auth = 1;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
1
......@@ -83,23 +93,33 @@ VARIABLE_VALUE
ON
'#---------------------FN_DYNVARS_143_08-------------------------#'
SET @@global.secure_auth = OFF;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
0
SET @@global.secure_auth = ON;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
1
'#---------------------FN_DYNVARS_143_09----------------------#'
SET @@global.secure_auth = TRUE;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
1
SET @@global.secure_auth = FALSE;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
0
SET @@global.secure_auth = @global_start_value;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SELECT @@global.secure_auth;
@@global.secure_auth
1
......@@ -8,6 +8,8 @@ SELECT @@GLOBAL.secure_auth;
1 / ON Expected
'#--------------------FN_DYNVARS_144_02-------------------------#'
SET GLOBAL secure_auth = OFF;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
CREATE USER 'testUser'@'localhost' IDENTIFIED BY 'newpass';
connect con_user1,localhost,testUser,newpass,;
connection default;
......@@ -16,6 +18,8 @@ connect con_user2,localhost,testUser,newpass,;
connection default;
'#--------------------FN_DYNVARS_144_03-------------------------#'
SET GLOBAL secure_auth = ON;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SET PASSWORD FOR 'testUser'@'localhost' = PASSWORD('newpass');
connect con_user3,localhost,testUser,newpass,;
connection default;
......@@ -27,6 +31,8 @@ SET PASSWORD FOR 'testUser'@'localhost' = PASSWORD('newpass');
connect con_user4,localhost,testUser,newpass,;
connection default;
SET GLOBAL secure_auth = @old_secure_auth;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
disconnect con_user1;
disconnect con_user2;
disconnect con_user3;
......
......@@ -23,6 +23,8 @@ GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL secure_auth=1;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SET secure_auth=1;
ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION secure_auth=1;
......@@ -36,6 +38,8 @@ GRANT SUPER ON *.* TO user1@localhost;
connect user1,localhost,user1,,;
connection user1;
SET GLOBAL secure_auth=1;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
SET secure_auth=1;
ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
SET SESSION secure_auth=1;
......@@ -44,3 +48,5 @@ disconnect user1;
connection default;
DROP USER user1@localhost;
SET @@global.secure_auth=@global;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
......@@ -7978,6 +7978,9 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument,
test_flags= argument ? ((uint) atoi(argument) & ~TEST_BLOCKING) : 0;
opt_endinfo=1;
break;
case OPT_SECURE_AUTH:
WARN_DEPRECATED_NO_REPLACEMENT(NULL, "--secure-auth");
break;
case OPT_THREAD_CONCURRENCY:
WARN_DEPRECATED_NO_REPLACEMENT(NULL, "THREAD_CONCURRENCY");
break;
......
......@@ -828,7 +828,7 @@ enum options_mysqld
OPT_WSREP_SYNC_WAIT,
#endif /* WITH_WSREP */
OPT_MYSQL_COMPATIBILITY,
OPT_TLS_VERSION,
OPT_TLS_VERSION, OPT_SECURE_AUTH,
OPT_MYSQL_TO_BE_IMPLEMENTED,
OPT_which_is_always_the_last
};
......
......@@ -3226,8 +3226,9 @@ Sys_secure_auth(
"secure_auth",
"Disallow authentication for accounts that have old (pre-4.1) "
"passwords",
GLOBAL_VAR(opt_secure_auth), CMD_LINE(OPT_ARG),
DEFAULT(TRUE));
GLOBAL_VAR(opt_secure_auth), CMD_LINE(OPT_ARG, OPT_SECURE_AUTH),
DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0),
DEPRECATED("")); // since 10.6.17
static bool check_require_secure_transport(sys_var *self, THD *thd, set_var *var)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment