Debian Codegraph @

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

raw
1 CREATE USER xuser_native@'localhost'
2 IDENTIFIED WITH 'mysql_native_password' BY 'native';
3 CREATE USER xuser_sha256@'localhost'
4 IDENTIFIED WITH 'sha256_password' BY 'sha256';
5 CREATE USER xuser_cache2@'localhost'
6 IDENTIFIED WITH 'caching_sha2_password' BY 'cache2';
7 GRANT ALL ON *.* TO xuser_native@localhost;
8 GRANT ALL ON *.* TO xuser_sha256@localhost;
9 GRANT ALL ON *.* TO xuser_cache2@localhost;
10
11 #######################################################################
12 ## 2. Memory mechanism ok after filling the cache, fails after flush
13 ##
14 ## when:
15 ## * The cache is empty, the memory request is going to fail
16 ## * plain auth is going to fill the cache (mysqlx_cache_cleaner installed)
17 ## * The cache is filled, the memory auth request is going to be successful
18 ## * FLUSH PRIVILEGES is going to clear the cache,
19 ## the memory auth request is going to be successful
20 ##
21 ## Requirements: F2, F4, F5, CI6
22 #
23
24 #######################################################################
25 # Cache is empty, the sha256_memory request must fail
26 -- Expecting failure with parameters: DISABLED memory xuser_native native
27 --
28 connecting...
29 Got expected error (one of: 1045 2510 )
30 -- Expecting failure with parameters: DISABLED memory xuser_sha256 sha256
31 --
32 connecting...
33 Got expected error (one of: 1045 2510 )
34 -- Expecting failure with parameters: DISABLED memory xuser_cache2 cache2
35 --
36 connecting...
37 Got expected error (one of: 1045 2510 )
38 -- Expecting failure with parameters: REQUIRED memory xuser_native native
39 --
40 connecting...
41 Got expected error (one of: 1045 2510 )
42 -- Expecting failure with parameters: REQUIRED memory xuser_sha256 sha256
43 --
44 connecting...
45 Got expected error (one of: 1045 2510 )
46 -- Expecting failure with parameters: REQUIRED memory xuser_cache2 cache2
47 --
48 connecting...
49 Got expected error (one of: 1045 2510 )
50 Mysqlx.Ok {
51 msg: "bye!"
52 }
53 ok
54
55 #######################################################################
56 # Plain auth work as expected and it fill the cache
57 -- Expecting success with parameters: REQUIRED plain xuser_native native
58 --
59 connecting...
60 active session is now 'sess0'
61 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
62 user plugin
63 xuser_native mysql_native_password
64 0 rows affected
65 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
66 Variable_name Value
67 Mysqlx_ssl_active ON
68 0 rows affected
69 closing session sess0
70 Mysqlx.Ok {
71 msg: "bye!"
72 }
73 switched to session default
74 -- Expecting success with parameters: REQUIRED plain xuser_sha256 sha256
75 --
76 connecting...
77 active session is now 'sess0'
78 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
79 user plugin
80 xuser_sha256 sha256_password
81 0 rows affected
82 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
83 Variable_name Value
84 Mysqlx_ssl_active ON
85 0 rows affected
86 closing session sess0
87 Mysqlx.Ok {
88 msg: "bye!"
89 }
90 switched to session default
91 -- Expecting success with parameters: REQUIRED plain xuser_cache2 cache2
92 --
93 connecting...
94 active session is now 'sess0'
95 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
96 user plugin
97 xuser_cache2 caching_sha2_password
98 0 rows affected
99 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
100 Variable_name Value
101 Mysqlx_ssl_active ON
102 0 rows affected
103 closing session sess0
104 Mysqlx.Ok {
105 msg: "bye!"
106 }
107 switched to session default
108 Mysqlx.Ok {
109 msg: "bye!"
110 }
111 ok
112
113 #######################################################################
114 # Plain filled the cache, thus auth-mech sha256_memory must be successful
115 -- Expecting success with parameters: DISABLED memory xuser_native native
116 --
117 connecting...
118 active session is now 'sess0'
119 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
120 user plugin
121 xuser_native mysql_native_password
122 0 rows affected
123 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
124 Variable_name Value
125 Mysqlx_ssl_active OFF
126 0 rows affected
127 closing session sess0
128 Mysqlx.Ok {
129 msg: "bye!"
130 }
131 switched to session default
132 -- Expecting success with parameters: DISABLED memory xuser_sha256 sha256
133 --
134 connecting...
135 active session is now 'sess0'
136 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
137 user plugin
138 xuser_sha256 sha256_password
139 0 rows affected
140 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
141 Variable_name Value
142 Mysqlx_ssl_active OFF
143 0 rows affected
144 closing session sess0
145 Mysqlx.Ok {
146 msg: "bye!"
147 }
148 switched to session default
149 -- Expecting success with parameters: DISABLED memory xuser_cache2 cache2
150 --
151 connecting...
152 active session is now 'sess0'
153 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
154 user plugin
155 xuser_cache2 caching_sha2_password
156 0 rows affected
157 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
158 Variable_name Value
159 Mysqlx_ssl_active OFF
160 0 rows affected
161 closing session sess0
162 Mysqlx.Ok {
163 msg: "bye!"
164 }
165 switched to session default
166 -- Expecting success with parameters: REQUIRED memory xuser_native native
167 --
168 connecting...
169 active session is now 'sess0'
170 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
171 user plugin
172 xuser_native mysql_native_password
173 0 rows affected
174 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
175 Variable_name Value
176 Mysqlx_ssl_active ON
177 0 rows affected
178 closing session sess0
179 Mysqlx.Ok {
180 msg: "bye!"
181 }
182 switched to session default
183 -- Expecting success with parameters: REQUIRED memory xuser_sha256 sha256
184 --
185 connecting...
186 active session is now 'sess0'
187 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
188 user plugin
189 xuser_sha256 sha256_password
190 0 rows affected
191 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
192 Variable_name Value
193 Mysqlx_ssl_active ON
194 0 rows affected
195 closing session sess0
196 Mysqlx.Ok {
197 msg: "bye!"
198 }
199 switched to session default
200 -- Expecting success with parameters: REQUIRED memory xuser_cache2 cache2
201 --
202 connecting...
203 active session is now 'sess0'
204 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
205 user plugin
206 xuser_cache2 caching_sha2_password
207 0 rows affected
208 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
209 Variable_name Value
210 Mysqlx_ssl_active ON
211 0 rows affected
212 closing session sess0
213 Mysqlx.Ok {
214 msg: "bye!"
215 }
216 switched to session default
217 Mysqlx.Ok {
218 msg: "bye!"
219 }
220 ok
221
222 #######################################################################
223 # Cache is cleared by FLUSH SQL, thus auth-mech sha256_memory must fail
224 FLUSH PRIVILEGES;
225 -- Expecting failure with parameters: DISABLED memory xuser_native native
226 --
227 connecting...
228 Got expected error (one of: 1045 2510 )
229 -- Expecting failure with parameters: DISABLED memory xuser_sha256 sha256
230 --
231 connecting...
232 Got expected error (one of: 1045 2510 )
233 -- Expecting failure with parameters: DISABLED memory xuser_cache2 cache2
234 --
235 connecting...
236 Got expected error (one of: 1045 2510 )
237 -- Expecting failure with parameters: REQUIRED memory xuser_native native
238 --
239 connecting...
240 Got expected error (one of: 1045 2510 )
241 -- Expecting failure with parameters: REQUIRED memory xuser_sha256 sha256
242 --
243 connecting...
244 Got expected error (one of: 1045 2510 )
245 -- Expecting failure with parameters: REQUIRED memory xuser_cache2 cache2
246 --
247 connecting...
248 Got expected error (one of: 1045 2510 )
249 Mysqlx.Ok {
250 msg: "bye!"
251 }
252 ok
253
254 #######################################################################
255 ## 3. Memory mechanism fails after uninstall plugin
256 ##
257 ## when:
258 ## * plain auth is going to fill the cache
259 ## * uninstall plugin mysqlx_cache_cleaner, disables the cache
260 ##
261 ## Requirements: F1
262 #
263
264 #######################################################################
265 # Plain auth work as expected and it fill the cache
266 -- Expecting success with parameters: REQUIRED plain xuser_native native
267 --
268 connecting...
269 active session is now 'sess0'
270 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
271 user plugin
272 xuser_native mysql_native_password
273 0 rows affected
274 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
275 Variable_name Value
276 Mysqlx_ssl_active ON
277 0 rows affected
278 closing session sess0
279 Mysqlx.Ok {
280 msg: "bye!"
281 }
282 switched to session default
283 -- Expecting success with parameters: REQUIRED plain xuser_sha256 sha256
284 --
285 connecting...
286 active session is now 'sess0'
287 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
288 user plugin
289 xuser_sha256 sha256_password
290 0 rows affected
291 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
292 Variable_name Value
293 Mysqlx_ssl_active ON
294 0 rows affected
295 closing session sess0
296 Mysqlx.Ok {
297 msg: "bye!"
298 }
299 switched to session default
300 -- Expecting success with parameters: REQUIRED plain xuser_cache2 cache2
301 --
302 connecting...
303 active session is now 'sess0'
304 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
305 user plugin
306 xuser_cache2 caching_sha2_password
307 0 rows affected
308 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
309 Variable_name Value
310 Mysqlx_ssl_active ON
311 0 rows affected
312 closing session sess0
313 Mysqlx.Ok {
314 msg: "bye!"
315 }
316 switched to session default
317 Mysqlx.Ok {
318 msg: "bye!"
319 }
320 ok
321
322 #######################################################################
323 # Plain filled the cache, thus auth-mech sha256_memory must be successful
324 -- Expecting success with parameters: DISABLED memory xuser_native native
325 --
326 connecting...
327 active session is now 'sess0'
328 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
329 user plugin
330 xuser_native mysql_native_password
331 0 rows affected
332 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
333 Variable_name Value
334 Mysqlx_ssl_active OFF
335 0 rows affected
336 closing session sess0
337 Mysqlx.Ok {
338 msg: "bye!"
339 }
340 switched to session default
341 -- Expecting success with parameters: DISABLED memory xuser_sha256 sha256
342 --
343 connecting...
344 active session is now 'sess0'
345 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
346 user plugin
347 xuser_sha256 sha256_password
348 0 rows affected
349 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
350 Variable_name Value
351 Mysqlx_ssl_active OFF
352 0 rows affected
353 closing session sess0
354 Mysqlx.Ok {
355 msg: "bye!"
356 }
357 switched to session default
358 -- Expecting success with parameters: DISABLED memory xuser_cache2 cache2
359 --
360 connecting...
361 active session is now 'sess0'
362 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
363 user plugin
364 xuser_cache2 caching_sha2_password
365 0 rows affected
366 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
367 Variable_name Value
368 Mysqlx_ssl_active OFF
369 0 rows affected
370 closing session sess0
371 Mysqlx.Ok {
372 msg: "bye!"
373 }
374 switched to session default
375 -- Expecting success with parameters: REQUIRED memory xuser_native native
376 --
377 connecting...
378 active session is now 'sess0'
379 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
380 user plugin
381 xuser_native mysql_native_password
382 0 rows affected
383 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
384 Variable_name Value
385 Mysqlx_ssl_active ON
386 0 rows affected
387 closing session sess0
388 Mysqlx.Ok {
389 msg: "bye!"
390 }
391 switched to session default
392 -- Expecting success with parameters: REQUIRED memory xuser_sha256 sha256
393 --
394 connecting...
395 active session is now 'sess0'
396 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
397 user plugin
398 xuser_sha256 sha256_password
399 0 rows affected
400 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
401 Variable_name Value
402 Mysqlx_ssl_active ON
403 0 rows affected
404 closing session sess0
405 Mysqlx.Ok {
406 msg: "bye!"
407 }
408 switched to session default
409 -- Expecting success with parameters: REQUIRED memory xuser_cache2 cache2
410 --
411 connecting...
412 active session is now 'sess0'
413 RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
414 user plugin
415 xuser_cache2 caching_sha2_password
416 0 rows affected
417 RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
418 Variable_name Value
419 Mysqlx_ssl_active ON
420 0 rows affected
421 closing session sess0
422 Mysqlx.Ok {
423 msg: "bye!"
424 }
425 switched to session default
426 Mysqlx.Ok {
427 msg: "bye!"
428 }
429 ok
430 DROP USER xuser_native@'localhost';
431 DROP USER xuser_sha256@'localhost';
432 DROP USER xuser_cache2@'localhost';