Debian Codegraph @

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

raw
1 ## Test cases for authorization plugins
2
3 --source include/xplugin_preamble.inc
4 --source include/xplugin_create_user.inc
5
6 #
7 ## Setup
8 #
9
10 --write_file $MYSQL_TMP_DIR/try_login_using_memory.xpl
11 -->import connection_auth_mechanism_memory_helpers.macro
12
13 callmacro Login_ok REQUIRED plain xuser_ssl pass;
14 callmacro Login_ok REQUIRED memory xuser_ssl pass;
15 callmacro Login_failed DISABLED memory xuser_ssl pass;
16 EOF
17
18 CREATE USER xuser_ssl@localhost
19 IDENTIFIED WITH 'mysql_native_password' BY 'pass'
20 REQUIRE SSL;
21
22
23 #
24 ## Test starts here
25 #
26
27 --echo
28 --echo #######################################################################
29 --echo ## 1. Memory authentication fails on non SSL connection when account
30 --echo ## is marked that it required SSL
31 --echo ##
32 --echo ## when:
33 --echo ## * Fill the cache with the account
34 --echo ## * Use memory auth on SSL connection, expect success
35 --echo ## * Use memory auth on non SSL connection, expect failure
36 --echo ##
37 --echo ## Requirements: F6
38 --echo #
39
40 exec $MYSQLXTEST
41 --user x_root
42 --file=$MYSQL_TMP_DIR/try_login_using_memory.xpl 2>&1;
43
44
45 #
46 # Postamble
47 #
48 --source ../include/xplugin_cleanup.inc
49 DROP USER xuser_ssl@localhost;
50