-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathconnection_auth_mechanism_memory2.result
190 lines (182 loc) · 5.15 KB
/
connection_auth_mechanism_memory2.result
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
CREATE USER xuser_cache2@'localhost'
IDENTIFIED WITH 'caching_sha2_password' BY 'cache2';
GRANT ALL ON *.* TO xuser_cache2@localhost;
#######################################################################
## 2. Memory mechanism ok after filling the cache, fails after flush
##
## when:
## * The cache is empty, the memory request is going to fail
## * plain auth is going to fill the cache (mysqlx_cache_cleaner installed)
## * The cache is filled, the memory auth request is going to be successful
## * FLUSH PRIVILEGES is going to clear the cache,
## the memory auth request is going to be successful
##
## Requirements: F2, F4, F5, CI6
#
#######################################################################
# Cache is empty, the sha256_memory request must fail
-- Expecting failure with parameters: DISABLED memory xuser_cache2 cache2
--
connecting...
Got expected error (one of: 1045 2510 )
-- Expecting failure with parameters: REQUIRED memory xuser_cache2 cache2
--
connecting...
Got expected error (one of: 1045 2510 )
Mysqlx.Ok {
msg: "bye!"
}
ok
#######################################################################
# Plain auth work as expected and it fill the cache
-- Expecting success with parameters: REQUIRED plain xuser_cache2 cache2
--
connecting...
active session is now 'sess0'
RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
user plugin
xuser_cache2 caching_sha2_password
0 rows affected
RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
Variable_name Value
Mysqlx_ssl_active ON
0 rows affected
closing session sess0
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
Mysqlx.Ok {
msg: "bye!"
}
ok
#######################################################################
# Plain filled the cache, thus auth-mech sha256_memory must be successful
-- Expecting success with parameters: DISABLED memory xuser_cache2 cache2
--
connecting...
active session is now 'sess0'
RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
user plugin
xuser_cache2 caching_sha2_password
0 rows affected
RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
Variable_name Value
Mysqlx_ssl_active OFF
0 rows affected
closing session sess0
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
-- Expecting success with parameters: REQUIRED memory xuser_cache2 cache2
--
connecting...
active session is now 'sess0'
RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
user plugin
xuser_cache2 caching_sha2_password
0 rows affected
RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
Variable_name Value
Mysqlx_ssl_active ON
0 rows affected
closing session sess0
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
Mysqlx.Ok {
msg: "bye!"
}
ok
#######################################################################
# Cache is cleared by FLUSH SQL, thus auth-mech sha256_memory must fail
FLUSH PRIVILEGES;
Warnings:
Warning 1681 'FLUSH PRIVILEGES' is deprecated and will be removed in a future release.
-- Expecting failure with parameters: DISABLED memory xuser_cache2 cache2
--
connecting...
Got expected error (one of: 1045 2510 )
-- Expecting failure with parameters: REQUIRED memory xuser_cache2 cache2
--
connecting...
Got expected error (one of: 1045 2510 )
Mysqlx.Ok {
msg: "bye!"
}
ok
#######################################################################
## 3. Memory mechanism fails after uninstall plugin
##
## when:
## * plain auth is going to fill the cache
## * uninstall plugin mysqlx_cache_cleaner, disables the cache
##
## Requirements: F1
#
#######################################################################
# Plain auth work as expected and it fill the cache
-- Expecting success with parameters: REQUIRED plain xuser_cache2 cache2
--
connecting...
active session is now 'sess0'
RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
user plugin
xuser_cache2 caching_sha2_password
0 rows affected
RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
Variable_name Value
Mysqlx_ssl_active ON
0 rows affected
closing session sess0
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
Mysqlx.Ok {
msg: "bye!"
}
ok
#######################################################################
# Plain filled the cache, thus auth-mech sha256_memory must be successful
-- Expecting success with parameters: DISABLED memory xuser_cache2 cache2
--
connecting...
active session is now 'sess0'
RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
user plugin
xuser_cache2 caching_sha2_password
0 rows affected
RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
Variable_name Value
Mysqlx_ssl_active OFF
0 rows affected
closing session sess0
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
-- Expecting success with parameters: REQUIRED memory xuser_cache2 cache2
--
connecting...
active session is now 'sess0'
RUN SELECT user, plugin FROM mysql.user WHERE user = REPLACE(USER(), '@localhost', '')
user plugin
xuser_cache2 caching_sha2_password
0 rows affected
RUN SHOW STATUS LIKE 'Mysqlx_ssl_active'
Variable_name Value
Mysqlx_ssl_active ON
0 rows affected
closing session sess0
Mysqlx.Ok {
msg: "bye!"
}
switched to session default
Mysqlx.Ok {
msg: "bye!"
}
ok
DROP USER xuser_cache2@'localhost';