Debian Codegraph @

mysql-test/suite/x/r/connection_auth_sequence.result

raw
1 call mtr.add_suppression("Maximum number of authentication attempts reached");
2 call mtr.add_suppression("Access denied for user .*");
3 CREATE USER user_to_lock@localhost IDENTIFIED WITH 'caching_sha2_password' BY 'xxx';
4 GRANT ALL ON *.* TO user_to_lock@localhost;
5 RUN select 1
6
7 1
8 1
9 0 rows affected
10 Mysqlx.Ok {
11 msg: "bye!"
12 }
13 ALTER USER user_to_lock@localhost ACCOUNT LOCK;
14 Application terminated with expected error: Access denied for user 'user_to_lock'@'localhost'. Account is locked. (code 3118)
15 Got expected error: Access denied for user 'locked_user pass test sha256_memory'@'localhost' (using password: NO) (code 1045)
16 Got expected error: Access denied for user 'locked_user pass test mysql41'@'localhost' (using password: NO) (code 1045)
17 ok
18 CREATE USER xuser_native@'localhost'
19 IDENTIFIED WITH 'mysql_native_password' BY 'native';
20 CREATE USER xuser_sha256@'localhost'
21 IDENTIFIED WITH 'sha256_password' BY 'sha256';
22 CREATE USER xuser_cache2@'localhost'
23 IDENTIFIED WITH 'caching_sha2_password' BY 'cache2';
24 #
25 ## Try to authenticate two times, last one succesfull
26 #
27 connecting...
28 active session is now 'seq'
29 send Mysqlx.Connection.CapabilitiesSet {
30 capabilities {
31 capabilities {
32 name: "tls"
33 value {
34 type: SCALAR
35 scalar {
36 type: V_BOOL
37 v_bool: true
38 }
39 }
40 }
41 }
42 }
43
44 Mysqlx.Ok {
45 }
46
47 Got expected error: Access denied for user 'xuser_native'@'localhost' (using password: YES) (code 1045)
48 Login OK
49 closing session seq
50 Mysqlx.Ok {
51 msg: "bye!"
52 }
53 switched to session default
54 #
55 ## 1. User must be able to perform authentication sequence with different mechanism
56 ##
57 ## * Try to authenticate three times, last one succesfull
58 ##
59 ## Requirements: PROTO1
60 #
61
62 connecting...
63 active session is now 'seq'
64 send Mysqlx.Connection.CapabilitiesSet {
65 capabilities {
66 capabilities {
67 name: "tls"
68 value {
69 type: SCALAR
70 scalar {
71 type: V_BOOL
72 v_bool: true
73 }
74 }
75 }
76 }
77 }
78
79 Mysqlx.Ok {
80 }
81
82 Got expected error: Access denied for user 'xuser_sha256'@'localhost' (using password: YES) (code 1045)
83 Got expected error: Access denied for user 'xuser_sha256'@'localhost' (using password: YES) (code 1045)
84 Login OK
85 closing session seq
86 Mysqlx.Ok {
87 msg: "bye!"
88 }
89 switched to session default
90 #
91 ## 2. Server must disconnect user that tries too many authentications
92 ##
93 ## * Try to authenticate three times, after last error connection is disconnected
94 ##
95 ## Requirements: PROTO2
96 #
97
98 connecting...
99 active session is now 'seq'
100 send Mysqlx.Connection.CapabilitiesSet {
101 capabilities {
102 capabilities {
103 name: "tls"
104 value {
105 type: SCALAR
106 scalar {
107 type: V_BOOL
108 v_bool: true
109 }
110 }
111 }
112 }
113 }
114
115 Mysqlx.Ok {
116 }
117
118 Got expected error: Access denied for user 'xuser_cache2'@'localhost' (using password: YES) (code 1045)
119 Got expected error: Access denied for user 'xuser_cache2'@'localhost' (using password: YES) (code 1045)
120 Got expected error: Access denied for user 'xuser_cache2'@'localhost' (using password: YES) (code 1045)
121 closing session seq
122 switched to session default
123
124 #######################################################################
125 ## 3. After succesfull authentication, user must be able to reset session and use
126 ## authentication sequence
127 ##
128 ## * Establish a session, reset it, try to do the sequence ending succesful
129 ## * Establish a session, reset it, try to do the sequence ending with failure
130 ##
131 ## Requirements: PROTO3
132 #
133
134 #######################################################################
135 # Sequence succesfull
136 connecting...
137 active session is now 'seq'
138 send Mysqlx.Connection.CapabilitiesSet {
139 capabilities {
140 capabilities {
141 name: "tls"
142 value {
143 type: SCALAR
144 scalar {
145 type: V_BOOL
146 v_bool: true
147 }
148 }
149 }
150 }
151 }
152
153 Mysqlx.Ok {
154 }
155
156 Login OK
157 send Mysqlx.Session.Reset {
158 }
159
160 Mysqlx.Ok {
161 }
162
163 Got expected error: Access denied for user 'xuser_sha256'@'localhost' (using password: YES) (code 1045)
164 Login OK
165 closing session seq
166 Mysqlx.Ok {
167 msg: "bye!"
168 }
169 switched to session default
170
171 #######################################################################
172 # Sequence failed
173 connecting...
174 active session is now 'seq'
175 send Mysqlx.Connection.CapabilitiesSet {
176 capabilities {
177 capabilities {
178 name: "tls"
179 value {
180 type: SCALAR
181 scalar {
182 type: V_BOOL
183 v_bool: true
184 }
185 }
186 }
187 }
188 }
189
190 Mysqlx.Ok {
191 }
192
193 Login OK
194 send Mysqlx.Session.Reset {
195 }
196
197 Mysqlx.Ok {
198 }
199
200 Got expected error: Access denied for user 'xuser_sha256'@'localhost' (using password: YES) (code 1045)
201 Got expected error: Access denied for user 'xuser_sha256'@'localhost' (using password: YES) (code 1045)
202 Got expected error: Access denied for user 'xuser_sha256'@'localhost' (using password: YES) (code 1045)
203 closing session seq
204 switched to session default
205 Mysqlx.Ok {
206 msg: "bye!"
207 }
208 ok
209 DROP USER xuser_native@'localhost';
210 DROP USER xuser_sha256@'localhost';
211 DROP USER xuser_cache2@'localhost';
212 DROP USER user_to_lock@localhost;