| 1 |
Preamble |
| 2 |
SET GLOBAL mysqlx_connect_timeout = 300; |
| 3 |
call mtr.add_suppression("Unsuccessful login attempt"); |
| 4 |
|
| 5 |
## Non-SSL connection testing for mysqlxtest |
| 6 |
RUN CREATE USER user1_mysqlx@localhost |
| 7 |
IDENTIFIED WITH 'mysql_native_password' BY 'auth_string1' |
| 8 |
|
| 9 |
0 rows affected |
| 10 |
RUN CREATE USER user2_mysqlx@localhost |
| 11 |
IDENTIFIED WITH 'mysql_native_password' BY 'auth_string2' |
| 12 |
PASSWORD EXPIRE |
| 13 |
|
| 14 |
0 rows affected |
| 15 |
RUN CREATE USER user3_mysqlx@localhost |
| 16 |
IDENTIFIED WITH 'mysql_native_password' BY 'auth_string3' |
| 17 |
REQUIRE CIPHER "ECDHE-RSA-AES128-GCM-SHA256" AND |
| 18 |
SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client" |
| 19 |
ISSUER "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=CA" |
| 20 |
PASSWORD EXPIRE NEVER |
| 21 |
|
| 22 |
0 rows affected |
| 23 |
RUN CREATE USER user4_mysqlx@localhost REQUIRE SSL ACCOUNT LOCK |
| 24 |
|
| 25 |
0 rows affected |
| 26 |
RUN CREATE USER user5_mysqlx@localhost |
| 27 |
IDENTIFIED WITH 'mysql_native_password' BY 'auth_string' |
| 28 |
REQUIRE SSL |
| 29 |
|
| 30 |
0 rows affected |
| 31 |
RUN CREATE USER user6_mysqlx@localhost |
| 32 |
IDENTIFIED WITH 'mysql_native_password' BY 'dwh@#ghd' |
| 33 |
REQUIRE X509 |
| 34 |
|
| 35 |
0 rows affected |
| 36 |
RUN GRANT ALL ON *.* TO user1_mysqlx@localhost |
| 37 |
|
| 38 |
0 rows affected |
| 39 |
RUN GRANT ALL ON *.* TO user2_mysqlx@localhost |
| 40 |
|
| 41 |
0 rows affected |
| 42 |
RUN GRANT ALL ON *.* TO user3_mysqlx@localhost |
| 43 |
|
| 44 |
0 rows affected |
| 45 |
RUN GRANT ALL ON *.* TO user4_mysqlx@localhost |
| 46 |
|
| 47 |
0 rows affected |
| 48 |
RUN GRANT ALL ON *.* TO user5_mysqlx@localhost |
| 49 |
|
| 50 |
0 rows affected |
| 51 |
RUN GRANT ALL ON *.* TO user6_mysqlx@localhost |
| 52 |
|
| 53 |
0 rows affected |
| 54 |
Mysqlx.Ok { |
| 55 |
msg: "bye!" |
| 56 |
} |
| 57 |
ok |
| 58 |
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query' |
| 59 |
CONNECTION_TYPE |
| 60 |
TCP/IP |
| 61 |
0 rows affected |
| 62 |
RUN show status like 'Mysqlx_ssl_version' |
| 63 |
Variable_name Value |
| 64 |
Mysqlx_ssl_version |
| 65 |
0 rows affected |
| 66 |
Mysqlx.Ok { |
| 67 |
msg: "bye!" |
| 68 |
} |
| 69 |
ok |
| 70 |
Application terminated with expected error: Your password has expired. To log in you must change it using a client that supports expired passwords. (code 1862) |
| 71 |
ok |
| 72 |
NOTICE: Account password expired |
| 73 |
RUN ALTER USER USER() IDENTIFIED BY 'alter-new-auth' |
| 74 |
|
| 75 |
0 rows affected |
| 76 |
Mysqlx.Ok { |
| 77 |
msg: "bye!" |
| 78 |
} |
| 79 |
ok |
| 80 |
ALTER USER user2_mysqlx@localhost PASSWORD EXPIRE; |
| 81 |
NOTICE: Account password expired |
| 82 |
RUN SET PASSWORD='set-new-auth' |
| 83 |
|
| 84 |
0 rows affected |
| 85 |
Mysqlx.Ok { |
| 86 |
msg: "bye!" |
| 87 |
} |
| 88 |
ok |
| 89 |
RUN SELECT CONNECTION_TYPE from performance_schema.threads where processlist_command='Query' |
| 90 |
CONNECTION_TYPE |
| 91 |
TCP/IP |
| 92 |
0 rows affected |
| 93 |
RUN show status like 'Mysqlx_ssl_version' |
| 94 |
Variable_name Value |
| 95 |
Mysqlx_ssl_version |
| 96 |
0 rows affected |
| 97 |
Mysqlx.Ok { |
| 98 |
msg: "bye!" |
| 99 |
} |
| 100 |
ok |
| 101 |
Application terminated with expected error: Capability prepare failed for 'tls' (code 5001) |
| 102 |
ok |
| 103 |
RUN SET PASSWORD='set-new-auth' |
| 104 |
|
| 105 |
0 rows affected |
| 106 |
Mysqlx.Ok { |
| 107 |
msg: "bye!" |
| 108 |
} |
| 109 |
ok |
| 110 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 111 |
ok |
| 112 |
Application terminated with expected error: Access denied for user 'user4_mysqlx'@'localhost'. Account is locked. (code 3118) |
| 113 |
ok |
| 114 |
ALTER USER user4_mysqlx@localhost ACCOUNT UNLOCK; |
| 115 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 116 |
ok |
| 117 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 118 |
ok |
| 119 |
Application terminated with expected error: Authentication failed, check username and password or try a secure connection (code 2510) |
| 120 |
ok |
| 121 |
DROP USER user1_mysqlx@localhost, user2_mysqlx@localhost, user3_mysqlx@localhost, |
| 122 |
user4_mysqlx@localhost, user5_mysqlx@localhost, user6_mysqlx@localhost; |
| 123 |
SET GLOBAL mysqlx_connect_timeout= DEFAULT; |