Debian Codegraph @

mysql-test/suite/plugins/r/simple_password_check.result

raw
1 install soname "simple_password_check";
2 select * from information_schema.plugins where plugin_name='simple_password_check';
3 PLUGIN_NAME simple_password_check
4 PLUGIN_VERSION 1.0
5 PLUGIN_STATUS ACTIVE
6 PLUGIN_TYPE PASSWORD VALIDATION
7 PLUGIN_TYPE_VERSION 1.1
8 PLUGIN_LIBRARY simple_password_check.so
9 PLUGIN_LIBRARY_VERSION 1.15
10 PLUGIN_AUTHOR Sergei Golubchik
11 PLUGIN_DESCRIPTION Simple password strength checks
12 PLUGIN_LICENSE GPL
13 LOAD_OPTION ON
14 PLUGIN_MATURITY Stable
15 PLUGIN_AUTH_VERSION 1.0
16 select * from information_schema.system_variables where variable_name like 'simple_password_check%' order by 1;
17 VARIABLE_NAME SIMPLE_PASSWORD_CHECK_DIGITS
18 SESSION_VALUE NULL
19 GLOBAL_VALUE 1
20 GLOBAL_VALUE_ORIGIN COMPILE-TIME
21 DEFAULT_VALUE 1
22 VARIABLE_SCOPE GLOBAL
23 VARIABLE_TYPE INT UNSIGNED
24 VARIABLE_COMMENT Minimal required number of digits
25 NUMERIC_MIN_VALUE 0
26 NUMERIC_MAX_VALUE 1000
27 NUMERIC_BLOCK_SIZE 1
28 ENUM_VALUE_LIST NULL
29 READ_ONLY NO
30 COMMAND_LINE_ARGUMENT REQUIRED
31 GLOBAL_VALUE_PATH NULL
32 VARIABLE_NAME SIMPLE_PASSWORD_CHECK_LETTERS_SAME_CASE
33 SESSION_VALUE NULL
34 GLOBAL_VALUE 1
35 GLOBAL_VALUE_ORIGIN COMPILE-TIME
36 DEFAULT_VALUE 1
37 VARIABLE_SCOPE GLOBAL
38 VARIABLE_TYPE INT UNSIGNED
39 VARIABLE_COMMENT Minimal required number of letters of the same letter case.This limit is applied separately to upper-case and lower-case letters
40 NUMERIC_MIN_VALUE 0
41 NUMERIC_MAX_VALUE 1000
42 NUMERIC_BLOCK_SIZE 1
43 ENUM_VALUE_LIST NULL
44 READ_ONLY NO
45 COMMAND_LINE_ARGUMENT REQUIRED
46 GLOBAL_VALUE_PATH NULL
47 VARIABLE_NAME SIMPLE_PASSWORD_CHECK_MINIMAL_LENGTH
48 SESSION_VALUE NULL
49 GLOBAL_VALUE 8
50 GLOBAL_VALUE_ORIGIN COMPILE-TIME
51 DEFAULT_VALUE 8
52 VARIABLE_SCOPE GLOBAL
53 VARIABLE_TYPE INT UNSIGNED
54 VARIABLE_COMMENT Minimal required password length
55 NUMERIC_MIN_VALUE 0
56 NUMERIC_MAX_VALUE 1000
57 NUMERIC_BLOCK_SIZE 1
58 ENUM_VALUE_LIST NULL
59 READ_ONLY NO
60 COMMAND_LINE_ARGUMENT REQUIRED
61 GLOBAL_VALUE_PATH NULL
62 VARIABLE_NAME SIMPLE_PASSWORD_CHECK_OTHER_CHARACTERS
63 SESSION_VALUE NULL
64 GLOBAL_VALUE 1
65 GLOBAL_VALUE_ORIGIN COMPILE-TIME
66 DEFAULT_VALUE 1
67 VARIABLE_SCOPE GLOBAL
68 VARIABLE_TYPE INT UNSIGNED
69 VARIABLE_COMMENT Minimal required number of other (not letters or digits) characters
70 NUMERIC_MIN_VALUE 0
71 NUMERIC_MAX_VALUE 1000
72 NUMERIC_BLOCK_SIZE 1
73 ENUM_VALUE_LIST NULL
74 READ_ONLY NO
75 COMMAND_LINE_ARGUMENT REQUIRED
76 GLOBAL_VALUE_PATH NULL
77 create user foo1 identified by 'pwd';
78 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
79 show warnings;
80 Level Code Message
81 Warning 1819 simple_password_check: Too short password (< 8)
82 Warning 1819 simple_password_check: Not enough upper case letters (< 1)
83 Warning 1819 simple_password_check: Not enough digits (< 1)
84 Warning 1819 simple_password_check: Not enough special characters (< 1)
85 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
86 Error 1396 Operation CREATE USER failed for 'foo1'@'%'
87 create user foo1;
88 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
89 show warnings;
90 Level Code Message
91 Warning 1819 simple_password_check: The password equal to the user name
92 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
93 Error 1396 Operation CREATE USER failed for 'foo1'@'%'
94 grant select on *.* to foo1 identified by 'pwd';
95 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
96 show warnings;
97 Level Code Message
98 Warning 1819 simple_password_check: Too short password (< 8)
99 Warning 1819 simple_password_check: Not enough upper case letters (< 1)
100 Warning 1819 simple_password_check: Not enough digits (< 1)
101 Warning 1819 simple_password_check: Not enough special characters (< 1)
102 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
103 grant select on *.* to `FooBar1!` identified by 'FooBar1!';
104 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
105 show warnings;
106 Level Code Message
107 Warning 1819 simple_password_check: The password equal to the user name
108 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
109 grant select on *.* to `BarFoo1!` identified by 'FooBar1!';
110 drop user `BarFoo1!`;
111 create user foo1 identified by 'aA.12345';
112 grant select on *.* to foo1;
113 drop user foo1;
114 set global simple_password_check_digits=3;
115 set global simple_password_check_letters_same_case=3;
116 Warnings:
117 Warning 1292 Adjusted the value of simple_password_check_minimal_length from 8 to 10
118 set global simple_password_check_other_characters=3;
119 Warnings:
120 Warning 1292 Adjusted the value of simple_password_check_minimal_length from 10 to 12
121 show variables like 'simple_password_check_%';
122 Variable_name Value
123 simple_password_check_digits 3
124 simple_password_check_letters_same_case 3
125 simple_password_check_minimal_length 12
126 simple_password_check_other_characters 3
127 create user foo1 identified by '123:qwe:ASD!';
128 drop user foo1;
129 create user foo1 identified by '-23:qwe:ASD!';
130 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
131 show warnings;
132 Level Code Message
133 Warning 1819 simple_password_check: Not enough digits (< 3)
134 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
135 Error 1396 Operation CREATE USER failed for 'foo1'@'%'
136 create user foo1 identified by '123:4we:ASD!';
137 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
138 show warnings;
139 Level Code Message
140 Warning 1819 simple_password_check: Not enough lower case letters (< 3)
141 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
142 Error 1396 Operation CREATE USER failed for 'foo1'@'%'
143 create user foo1 identified by '123:qwe:4SD!';
144 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
145 show warnings;
146 Level Code Message
147 Warning 1819 simple_password_check: Not enough upper case letters (< 3)
148 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
149 Error 1396 Operation CREATE USER failed for 'foo1'@'%'
150 create user foo1 identified by '123:qwe:ASD4';
151 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
152 show warnings;
153 Level Code Message
154 Warning 1819 simple_password_check: Not enough special characters (< 3)
155 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
156 Error 1396 Operation CREATE USER failed for 'foo1'@'%'
157 create user foo1 identified by '123:qwe:ASD!';
158 set password for foo1 = password('qwe:-23:ASD!');
159 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
160 show warnings;
161 Level Code Message
162 Warning 1819 simple_password_check: Not enough digits (< 3)
163 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
164 set password for foo1 = old_password('4we:123:ASD!');
165 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
166 set password for foo1 = password('qwe:123:4SD!');
167 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
168 show warnings;
169 Level Code Message
170 Warning 1819 simple_password_check: Not enough upper case letters (< 3)
171 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
172 set password for foo1 = old_password('qwe:123:ASD4');
173 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
174 show warnings;
175 Level Code Message
176 Warning 1819 simple_password_check: Not enough special characters (< 3)
177 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
178 set password for foo1 = password('qwe:123:ASD!');
179 select @@strict_password_validation;
180 @@strict_password_validation
181 1
182 set password for foo1 = '';
183 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
184 show warnings;
185 Level Code Message
186 Warning 1819 simple_password_check: The password equal to the user name
187 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
188 set password for foo1 = '2222222222222222';
189 ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
190 set password for foo1 = '11111111111111111111111111111111111111111';
191 ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
192 create user foo2 identified by password '11111111111111111111111111111111111111111';
193 ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
194 grant select on *.* to foo2 identified by password '2222222222222222';
195 ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
196 create user foo2 identified with mysql_native_password using '11111111111111111111111111111111111111111';
197 ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
198 grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222';
199 ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
200 create user foo2 identified with mysql_native_password using '';
201 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
202 show warnings;
203 Level Code Message
204 Warning 1819 simple_password_check: The password equal to the user name
205 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
206 Error 1396 Operation CREATE USER failed for 'foo2'@'%'
207 grant select on *.* to foo2 identified with mysql_old_password using '';
208 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
209 grant select on *.* to foo2 identified with mysql_old_password;
210 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
211 update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'xxx') where user='foo1';
212 set global strict_password_validation=0;
213 set password for foo1 = '';
214 ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
215 show warnings;
216 Level Code Message
217 Warning 1819 simple_password_check: The password equal to the user name
218 Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
219 set password for foo1 = '2222222222222222';
220 set password for foo1 = '11111111111111111111111111111111111111111';
221 create user foo2 identified by password '11111111111111111111111111111111111111111';
222 drop user foo2;
223 grant select on *.* to foo2 identified by password '2222222222222222';
224 drop user foo2;
225 create user foo2 identified with mysql_native_password using '11111111111111111111111111111111111111111';
226 drop user foo2;
227 grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222';
228 drop user foo2;
229 set global strict_password_validation=1;
230 drop user foo1;
231 create role r1;
232 drop role r1;
233 flush privileges;
234 uninstall plugin simple_password_check;
235 create user foo1 identified by 'pwd';
236 drop user foo1;
237 #
238 # MDEV-26650: Failed ALTER USER/GRANT statement removes the
239 # password from the cache
240 #
241 create user foo1@localhost identified by '<GDFH:3ghj';
242 show grants for foo1@localhost;
243 Grants for foo1@localhost
244 GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
245 install soname "simple_password_check";
246 ALTER USER foo1@localhost identified by 'foo1';
247 ERROR HY000: Operation ALTER USER failed for 'foo1'@'localhost'
248 show grants for foo1@localhost;
249 Grants for foo1@localhost
250 GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
251 flush privileges;
252 show grants for foo1@localhost;
253 Grants for foo1@localhost
254 GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
255 drop user foo1@localhost;
256 uninstall plugin simple_password_check;
257 #
258 # MDEV-22418 mysqladmin wrong error with simple_password_check
259 #
260 install soname "simple_password_check";
261 MARIADB-ADMIN: unable to change password; error: 'The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement'
262 # All done
263 uninstall plugin simple_password_check;
264 # End of 10.4 tests
265 #
266 # MDEV-30190 Password check plugin prevents changing grants for CURRENT_USER
267 #
268 select priv into @old_priv from mysql.global_priv where user='root' and host='localhost';
269 install soname "simple_password_check";
270 grant all on db1.* to current_user;
271 select current_user;
272 current_user
273 root@localhost
274 show grants;
275 Grants for root@localhost
276 GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
277 GRANT ALL PRIVILEGES ON `db1`.* TO `root`@`localhost`
278 GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
279 revoke all on db1.* from current_user;
280 uninstall plugin simple_password_check;
281 update mysql.global_priv set priv=@old_priv where user='root' and host='localhost';
282 # End of 10.11 tests