Debian Codegraph @

mysql-test/suite/x/t/connection_auth_sequence_timeout.test

raw
1 ## Test cases for authorization plugins
2
3 --source include/xplugin_preamble.inc
4 --source include/xplugin_create_user.inc
5 --source include/restart_mysqld.inc
6
7 #
8 ## Setup
9 #
10
11 call mtr.add_suppression("Maximum number of authentication attempts reached");
12
13 --write_file $MYSQL_TMP_DIR/auth_seq.xpl
14 -->import connection_auth_mechanism_memory_helpers.macro
15 -->import connection.macro
16
17 -->echo
18 -->echo #######################################################################
19 -->echo ## 3. Authentication fails, and client is idle
20 -->echo ##
21 -->echo ## * Establish a connection, try to login with invalid data, do nothing
22 -->echo ## (waiting for disconnection)
23 -->echo ## * Establish a connection, enable ssl, try to login with invalid data,
24 -->echo ## do nothing (waiting for disconnection)
25 -->echo ##
26 -->echo #
27
28 -->echo
29 -->echo #######################################################################
30 -->echo ## New connection & SSL, user is waiting for disconnection after the auth
31 -->echo ## failure
32 newsession seq -;
33 callmacro Verify_its_xprotocol_connection;
34 callmacro Enable_ssl_on_xprotocol_and_transmision_layer;
35
36 expecterror ER_ACCESS_DENIED_ERROR;
37 login xuser_native native test sha256_memory;
38
39 peerdisc 30000 30000;
40
41 -->echo
42 -->echo #######################################################################
43 -->echo ## New connection, user is waiting for disconnection after the auth
44 -->echo ## failure
45 newsession seq -;
46
47 callmacro Verify_its_xprotocol_connection;
48 expecterror ER_ACCESS_DENIED_ERROR;
49 login xuser_native native test sha256_memory;
50
51 peerdisc 30000 30000;
52 EOF
53
54 --let $MYSQLXTEST=$MYSQLXTEST -ux_root --ssl-cipher='ECDHE-RSA-AES128-GCM-SHA256'
55
56 --source ../include/create_mysql_accounts_for_xplugin_tests.inc
57
58
59 #
60 ## Test starts here
61 #
62
63 SET GLOBAL mysqlx_connect_timeout = 15;
64 exec $MYSQLXTEST --file=$MYSQL_TMP_DIR/auth_seq.xpl 2>&1;
65
66 #
67 # Postamble
68 #
69 --source ../include/remove_mysql_accounts_for_xplugin_tests.inc
70 --source ../include/xplugin_cleanup.inc
71
72 SET GLOBAL mysqlx_connect_timeout = DEFAULT;