1
###############################################################################
3
# Authorization and authentication of the key-value pair shared between #
4
# the server and the client when server is started without SSL and client #
5
# is connected without SSL #
8
# Creation Date: 2012-12-26 #
9
# Author : Tanjot Singh Uppal #
12
# Description:Test Cases of validates the authentication of the handshake #
13
# information when server started without SSL and client started without SSL #
15
###############################################################################
17
--source include/not_embedded.inc
18
#--source include/not_ssl.inc
19
#--source include/not_openssl.inc
20
--source include/not_sha256_rsa_auth.inc
22
# This test will intentionally generate errors in the server error log
23
# when a broken password is inserted into the mysql.user table.
24
# The below suppression is to clear those errors.
27
call mtr.add_suppression(".*Password salt for user.*");
31
call mtr.add_suppression(".*SSL.*");
35
# The default authentication plugin at the server side is mysql_native_password
39
--echo ======================================================================================
40
--echo Checking the user access with SSL through user created with mysql_old_password plugin
41
--echo ======================================================================================
44
# Creating a user at localhost with mysql_old_password plugin
46
--echo Creating a user with the mysql_old_plugin
48
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_old_password';
50
set @@session.old_passwords=1;
52
set password for 'Tanjotuser1'@'localhost' = password('abc');
55
# Trying connecting the client with the mysql_old_password user with out the SSL credentials with secure auth enabled.
57
--echo The client should not connect with secure auth enabled.
59
select @@global.secure_auth;
62
--echo **** connecting client using the ssl credentials
64
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth -e "select @@Global.old_passwords;select @@session.old_passwords"
66
--echo **** connecting client using the ssl credentials
68
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
70
--echo **** connecting client using the ssl credentials
72
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
74
--echo **** connecting client using the ssl credentials
76
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
80
# Trying connecting the client with the mysql_old_password user with out the SSL credentials with secure auth disabled.
82
--echo The client should connect with secure auth disabled.
85
set @@global.secure_auth=0;
89
--echo **** connecting client using the ssl credentials
90
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth -e "select @@Global.old_passwords;select @@session.old_passwords"
91
--echo 0 for GLOBAL Expected
92
--echo 1 for SESSION Expected
95
--echo **** connecting client using the ssl credentials
96
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
97
--echo 0 for GLOBAL Expected
98
--echo 1 for SESSION Expected
101
--echo **** connecting client using the ssl credentials
102
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
103
--echo 0 for GLOBAL Expected
104
--echo 1 for SESSION Expected
107
--echo **** connecting client using the ssl credentials
108
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
109
--echo 0 for GLOBAL Expected
110
--echo 1 for SESSION Expected
114
# Trying connecting the client with the mysql_old_password user with out the SSL credentials with secure auth disabled at the server side but enabled at the client side.
116
--echo The mysql_old_password plugin client should not connect with secure auth enabled at the client side.
118
select @@global.secure_auth;
122
--echo **** connecting client using the ssl credentials
124
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
126
--echo **** connecting client using the ssl credentials
128
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
130
--echo **** connecting client using the ssl credentials
132
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
134
--echo **** connecting client using the ssl credentials
136
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
139
# Dropping the created users
141
DROP USER 'Tanjotuser1'@'localhost';
146
--echo ======================================================================================
147
--echo Checking the user access with SSL through user created with mysql_native_password plugin
148
--echo ======================================================================================
151
# Creating a user at localhost with mysql_native_password plugin
153
--echo Creating a user with the mysql_old_plugin
155
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
157
set @@session.old_passwords=0;
159
set password for 'Tanjotuser1'@'localhost' = password('abc');
162
# Trying connecting the client with the mysql_native_password user with out the SSL credentials with secure auth enabled.
164
--echo The client should connect with secure auth enabled.
166
select @@global.secure_auth;
169
--echo **** connecting client using the ssl credentials
170
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
171
--echo 0 for GLOBAL Expected
172
--echo 0 for SESSION Expected
175
--echo **** connecting client using the ssl credentials
176
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
177
--echo 0 for GLOBAL Expected
178
--echo 0 for SESSION Expected
181
--echo **** connecting client using the ssl credentials
182
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
183
--echo 0 for GLOBAL Expected
184
--echo 0 for SESSION Expected
187
--echo **** connecting client using the ssl credentials
188
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
189
--echo 0 for GLOBAL Expected
190
--echo 0 for SESSION Expected
194
# Trying connecting the client with the mysql_native_password user with out the SSL credentials with secure auth disabled.
196
--echo The client should connect with secure auth disabled.
199
set @@global.secure_auth=0;
202
--echo **** connecting client using the ssl credentials
203
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
204
--echo 0 for GLOBAL Expected
205
--echo 0 for SESSION Expected
208
--echo **** connecting client using the ssl credentials
209
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
210
--echo 0 for GLOBAL Expected
211
--echo 0 for SESSION Expected
213
--echo **** connecting client using the ssl credentials
214
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
215
--echo 0 for GLOBAL Expected
216
--echo 0 for SESSION Expected
219
--echo **** connecting client using the ssl credentials
220
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
221
--echo 0 for GLOBAL Expected
222
--echo 0 for SESSION Expected
225
# Trying connecting the client with the mysql_native_password user with out the SSL credentials with secure auth disabled at the server side but enabled at the client side.
227
--echo The mysql_native_password plugin client should connect with secure auth enabled at the client side.
229
select @@global.secure_auth;
233
--echo **** connecting client using the ssl credentials
234
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth -e "select @@Global.old_passwords;select @@session.old_passwords"
235
--echo 0 for GLOBAL Expected
236
--echo 0 for SESSION Expected
239
--echo **** connecting client using the ssl credentials
240
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
241
--echo 0 for GLOBAL Expected
242
--echo 0 for SESSION Expected
245
--echo **** connecting client using the ssl credentials
246
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
247
--echo 0 for GLOBAL Expected
248
--echo 0 for SESSION Expected
251
--echo **** connecting client using the ssl credentials
252
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
253
--echo 0 for GLOBAL Expected
254
--echo 0 for SESSION Expected
257
# Dropping the created users
259
DROP USER 'Tanjotuser1'@'localhost';
265
--echo ======================================================================================
266
--echo Checking the user access with SSL through user created with sha256_password plugin
267
--echo ======================================================================================
270
# Creating a user at localhost with sha256_password plugin
272
--echo Creating a user with the mysql_old_plugin
274
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'sha256_password';
276
set @@session.old_passwords=2;
278
set password for 'Tanjotuser1'@'localhost' = password('abc');
281
# Trying connecting the client with the sha256_password user with out the SSL credentials with secure auth enabled.
283
--echo The client should connect with secure auth enabled.
285
select @@global.secure_auth;
288
--echo **** connecting client using the ssl credentials
290
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
293
--echo **** connecting client using the ssl credentials
295
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
298
--echo **** connecting client using the ssl credentials
300
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
303
--echo **** connecting client using the ssl credentials
305
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
308
# Trying connecting the client with the sha256_password user with out the SSL credentials with secure auth disabled.
310
--echo The client should connect with secure auth disabled.
313
set @@global.secure_auth=0;
316
--echo **** connecting client using the ssl credentials
318
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
321
--echo **** connecting client using the ssl credentials
323
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
325
--echo **** connecting client using the ssl credentials
327
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
330
--echo **** connecting client using the ssl credentials
332
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
335
# Trying connecting the client with the mysql_native_password user with out the SSL credentials with secure auth disabled at the server side but enabled at the client side.
337
--echo The mysql_native_password plugin client should connect with secure auth enabled at the client side.
339
select @@global.secure_auth;
343
--echo **** connecting client using the ssl credentials
345
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth -e "select @@Global.old_passwords;select @@session.old_passwords"
348
--echo **** connecting client using the ssl credentials
350
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
353
--echo **** connecting client using the ssl credentials
355
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
358
--echo **** connecting client using the ssl credentials
360
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
363
# Dropping the created users
365
DROP USER 'Tanjotuser1'@'localhost';
371
--echo =================================================================================================
372
--echo Starting the server with the default authentication sha256_password
373
--echo =================================================================================================
376
--echo # Restart server with default-authentication-plugin=sha256_password;
378
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
379
--exec echo "wait" > $restart_file
381
--source include/wait_until_disconnected.inc
382
-- exec echo "restart:--default-authentication-plugin=sha256_password " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
384
-- source include/wait_until_connected_again.inc
390
--echo ======================================================================================
391
--echo Checking the user access with SSL through user created with mysql_old_password plugin
392
--echo ======================================================================================
395
# Creating a user at localhost with mysql_old_password plugin
397
--echo Creating a user with the mysql_old_plugin
399
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_old_password';
401
set @@session.old_passwords=1;
403
set password for 'Tanjotuser1'@'localhost' = password('abc');
406
# Trying connecting the client with the mysql_old_password user with out the SSL credentials with secure auth enabled.
408
--echo The client should not connect with secure auth enabled.
410
select @@global.secure_auth;
413
--echo **** connecting client using the ssl credentials
415
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth -e "select @@Global.old_passwords;select @@session.old_passwords"
417
--echo **** connecting client using the ssl credentials
419
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
421
--echo **** connecting client using the ssl credentials
423
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
425
--echo **** connecting client using the ssl credentials
427
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
431
# Trying connecting the client with the mysql_old_password user with out the SSL credentials with secure auth disabled.
433
--echo The client should connect with secure auth disabled.
436
set @@global.secure_auth=0;
440
--echo **** connecting client using the ssl credentials
441
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth -e "select @@Global.old_passwords;select @@session.old_passwords"
442
--echo 2 for GLOBAL Expected
443
--echo 1 for SESSION Expected
446
--echo **** connecting client using the ssl credentials
447
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
448
--echo 2 for GLOBAL Expected
449
--echo 1 for SESSION Expected
452
--echo **** connecting client using the ssl credentials
453
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
454
--echo 2 for GLOBAL Expected
455
--echo 1 for SESSION Expected
458
--echo **** connecting client using the ssl credentials
460
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --skip-secure-auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
461
--echo 2 for GLOBAL Expected
462
--echo 1 for SESSION Expected
466
# Trying connecting the client with the mysql_old_password user with out the SSL credentials with secure auth disabled at the server side but enabled at the client side.
468
--echo The mysql_old_password plugin client should not connect with secure auth enabled at the client side.
470
select @@global.secure_auth;
474
--echo **** connecting client using the ssl credentials
476
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
478
--echo **** connecting client using the ssl credentials
480
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
482
--echo **** connecting client using the ssl credentials
484
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
486
--echo **** connecting client using the ssl credentials
488
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
491
# Dropping the created users
493
DROP USER 'Tanjotuser1'@'localhost';
498
--echo ======================================================================================
499
--echo Checking the user access with SSL through user created with mysql_native_password plugin
500
--echo ======================================================================================
503
# Creating a user at localhost with mysql_native_password plugin
505
--echo Creating a user with the mysql_old_plugin
507
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'mysql_native_password';
509
set @@session.old_passwords=0;
511
set password for 'Tanjotuser1'@'localhost' = password('abc');
514
# Trying connecting the client with the mysql_native_password user with out the SSL credentials with secure auth enabled.
516
--echo The client should connect with secure auth enabled.
518
select @@global.secure_auth;
521
--echo **** connecting client using the ssl credentials
522
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
523
--echo 2 for GLOBAL Expected
524
--echo 0 for SESSION Expected
527
--echo **** connecting client using the ssl credentials
528
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
529
--echo 2 for GLOBAL Expected
530
--echo 0 for SESSION Expected
533
--echo **** connecting client using the ssl credentials
534
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
535
--echo 2 for GLOBAL Expected
536
--echo 0 for SESSION Expected
539
--echo **** connecting client using the ssl credentials
541
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
542
--echo 2 for GLOBAL Expected
543
--echo 0 for SESSION Expected
547
# Trying connecting the client with the mysql_native_password user with out the SSL credentials with secure auth disabled.
549
--echo The client should connect with secure auth disabled.
552
set @@global.secure_auth=0;
555
--echo **** connecting client using the ssl credentials
556
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
557
--echo 2 for GLOBAL Expected
558
--echo 0 for SESSION Expected
561
--echo **** connecting client using the ssl credentials
562
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
563
--echo 2 for GLOBAL Expected
564
--echo 0 for SESSION Expected
566
--echo **** connecting client using the ssl credentials
567
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
568
--echo 2 for GLOBAL Expected
569
--echo 0 for SESSION Expected
572
--echo **** connecting client using the ssl credentials
574
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
575
--echo 2 for GLOBAL Expected
576
--echo 0 for SESSION Expected
579
# Trying connecting the client with the mysql_native_password user without the SSL credentials with secure auth disabled at the server side but enabled at the client side.
581
--echo The mysql_native_password plugin client should connect with secure auth enabled at the client side.
583
select @@global.secure_auth;
587
--echo **** connecting client using the ssl credentials
588
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth -e "select @@Global.old_passwords;select @@session.old_passwords"
589
--echo 2 for GLOBAL Expected
590
--echo 0 for SESSION Expected
593
--echo **** connecting client using the ssl credentials
594
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
595
--echo 2 for GLOBAL Expected
596
--echo 0 for SESSION Expected
599
--echo **** connecting client using the ssl credentials
600
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
601
--echo 2 for GLOBAL Expected
602
--echo 0 for SESSION Expected
605
--echo **** connecting client using the ssl credentials
607
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
608
--echo 2 for GLOBAL Expected
609
--echo 0 for SESSION Expected
612
# Dropping the created users
614
DROP USER 'Tanjotuser1'@'localhost';
620
--echo ======================================================================================
621
--echo Checking the user access with SSL through user created with sha256_password plugin
622
--echo ======================================================================================
625
# Creating a user at localhost with sha256_password plugin
627
--echo Creating a user with the sha256_plugin
629
CREATE USER 'Tanjotuser1'@'localhost' IDENTIFIED WITH 'sha256_password';
631
set @@session.old_passwords=2;
633
set password for 'Tanjotuser1'@'localhost' = password('abc');
635
GRANT ALL on *.* to 'Tanjotuser1'@'localhost';
637
# Trying connecting the client with the sha256_password user without the SSL credentials with secure auth enabled.
639
--echo The client should connect with secure auth enabled.
641
select @@global.secure_auth;
644
--echo **** connecting client using the ssl credentials
646
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
649
--echo **** connecting client using the ssl credentials
651
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
654
--echo **** connecting client using the ssl credentials
656
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
659
--echo **** connecting client using the ssl credentials
661
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
664
# Trying connecting the client with the sha256_password user without the SSL credentials with secure auth disabled.
666
--echo The client should connect with secure auth disabled.
669
set @@global.secure_auth=0;
672
--echo **** connecting client using the ssl credentials
674
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc -e "select @@Global.old_passwords;select @@session.old_passwords"
677
--echo **** connecting client using the ssl credentials
679
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
681
--echo **** connecting client using the ssl credentials
683
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
686
--echo **** connecting client using the ssl credentials
688
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
690
# Trying connecting the client with the mysql_native_password user without the SSL credentials with secure auth disabled at the server side but enabled at the client side.
692
--echo The mysql_native_password plugin client should connect with secure auth enabled at the client side.
694
select @@global.secure_auth;
698
--echo **** connecting client using the ssl credentials
700
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth -e "select @@Global.old_passwords;select @@session.old_passwords"
703
--echo **** connecting client using the ssl credentials
705
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_old_password -e "select @@Global.old_passwords;select @@session.old_passwords"
708
--echo **** connecting client using the ssl credentials
710
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=mysql_native_password -e "select @@Global.old_passwords;select @@session.old_passwords"
713
--echo **** connecting client using the ssl credentials
715
--exec $MYSQL -uTanjotuser1 -hlocalhost -pabc --secure_auth --default_auth=sha256_password -e "select @@Global.old_passwords;select @@session.old_passwords"
717
# Dropping the created users
719
DROP USER 'Tanjotuser1'@'localhost';
721
set @@global.secure_auth=default;
722
set @@session.old_passwords=default;